:root {
    --bg-page: #121212;
    --bg-card: #1a1a1a;
    --bg-card-hover: #1e1e1e;
    --bg-input: #1e1e1e;
    --bg-button: #2a2a2a;
    --bg-badge: #333333;
    --bg-navbar: #1a1a1a;

    --border-default: #2a2a2a;
    --border-input: #333333;
    --border-subtle: #444444;

    --text-primary: #f5f5f5;
    --text-secondary: #e0e0e0;
    --text-muted: #9e9e9e;
    --text-hint: #757575;
    --text-disabled: #616161;

    --accent-green: #66bb6a;
    --accent-green-dark: #43a047;
    --accent-gold: #f5c518;
    --accent-yellow: #fdd835;

    --cat-pink: #e91e63;
    --cat-cyan: #4dd0e1;
    --cat-yellow: #fdd835;
    --cat-gray: #bdbdbd;
    --cat-purple: #ba68c8;
    --cat-green: #66bb6a;
    --cat-orange: #ff7043;
    --cat-blue: #42a5f5;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-pill: 16px;
    --radius-circle: 50%;

    --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 12px;
    --font-size-sm: 13px;
    --font-size-base: 14px;
    --font-size-md: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 24px;
    --font-size-2xl: 32px;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --line-height: 1.55;

    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    --max-width: 1280px;
    --navbar-height: 56px;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height);
    color: var(--text-secondary);
    background-color: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== ONION BAR ========== */

.onion-bar {
    background-color: var(--accent-green-dark);
    width: 100%;
    z-index: 1001;
}

.onion-bar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-sm) var(--space-lg);
    min-height: 40px;
}

.onion-bar-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    white-space: nowrap;
    flex-shrink: 0;
}

.onion-bar-url {
    color: #ffffff;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    user-select: all;
    -webkit-user-select: all;
}

.onion-bar-copy {
    flex-shrink: 0;
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-md);
    padding: 4px 14px;
    font-family: var(--font-family);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.onion-bar-copy:hover {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.onion-bar-copy.copied {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: #ffffff;
}

.onion-bar-copy.copied::after {
    content: ' ';
}

/* ========== NAVBAR ========== */

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bg-navbar);
    border-bottom: 1px solid var(--border-default);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    height: var(--navbar-height);
    overflow: visible;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.02em;
    transition: color 0.2s;
}

.nav-logo {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    filter: invert(1);
}

.nav-brand a:hover {
    color: var(--accent-green);
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: var(--space-xs);
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--text-muted);
    text-decoration: none;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    border-radius: var(--radius-md);
    transition: color 0.2s, background-color 0.2s;
}

.nav-menu li a:hover {
    color: var(--text-primary);
    background-color: var(--bg-button);
}

.nav-menu li a.active {
    color: var(--accent-green);
    background-color: rgba(102, 187, 106, 0.08);
}

/* ========== HAMBURGER ========== */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-md);
    transition: background-color 0.2s;
}

.hamburger:hover {
    background-color: var(--bg-button);
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-muted);
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ========== MAIN ========== */

main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg) var(--space-2xl);
}

/* ========== HERO ========== */

.hero {
    padding: var(--space-2xl) 0;
    border-bottom: 1px solid var(--border-default);
    margin-bottom: var(--space-xl);
}

.hero h1 {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: var(--space-md);
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--accent-green);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-lg);
}

.hero > p:last-child {
    font-size: var(--font-size-md);
    color: var(--text-muted);
    max-width: 820px;
    line-height: 1.7;
}

/* ========== ACCESS BUTTON ========== */

.btn-access {
    display: inline-block;
    margin-top: var(--space-lg);
    padding: 14px 36px;
    background-color: var(--accent-green-dark);
    color: #ffffff !important;
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    border: none;
    border-bottom: none !important;
    border-radius: var(--radius-md);
    transition: background-color 0.2s, transform 0.15s;
    letter-spacing: 0.01em;
}

.btn-access:hover {
    background-color: var(--accent-green);
    color: #ffffff !important;
    border-bottom: none !important;
    transform: translateY(-1px);
}

/* ========== SECTIONS ========== */

section,
article {
    padding: var(--space-xl) 0;
    border-bottom: 1px solid var(--border-default);
}

section:last-child,
article:last-child {
    border-bottom: none;
}

h2 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-lg);
    line-height: 1.2;
}

h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
    line-height: 1.25;
}

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
    line-height: var(--line-height);
}

p:last-child {
    margin-bottom: 0;
}

section > p:last-child,
article > p:last-child {
    margin-bottom: 0;
}

/* ========== LINKS ========== */

a {
    color: var(--accent-green);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-gold);
}

main a {
    border-bottom: 1px solid transparent;
}

main a:hover {
    border-bottom-color: var(--accent-gold);
}

/* ========== LISTS ========== */

ul, ol {
    margin-bottom: var(--space-lg);
    padding-left: var(--space-lg);
}

li {
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
    line-height: var(--line-height);
}

li a {
    font-weight: var(--font-weight-medium);
}

/* ========== CODE ========== */

code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: var(--font-size-sm);
    color: var(--accent-green);
    background-color: var(--bg-button);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
}

/* ========== MIRROR BLOCK ========== */

.mirrors-block {
    background-color: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin: var(--space-lg) 0;
    min-height: 120px;
}

.mirror-status-info {
    background-color: rgba(102, 187, 106, 0.06);
    border: 1px solid rgba(102, 187, 106, 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
}

.mirror-status-info p {
    color: var(--accent-green);
    font-size: var(--font-size-sm);
    margin: 0;
}

.mirror-entry {
    background-color: var(--bg-card-hover);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-md);
}

.mirror-entry:last-child {
    margin-bottom: 0;
}

.mirror-entry-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    flex-wrap: wrap;
}

.mirror-badge {
    font-size: 11px;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.mirror-badge-active {
    background-color: rgba(102, 187, 106, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(102, 187, 106, 0.3);
}

.mirror-badge-verified {
    background-color: rgba(245, 197, 24, 0.1);
    color: var(--accent-gold);
    border: 1px solid rgba(245, 197, 24, 0.25);
}

.mirror-label {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-left: auto;
}

.mirror-entry-url {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background-color: var(--bg-page);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
}

.mirror-url-text {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: var(--font-size-sm);
    color: var(--accent-green);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
    user-select: all;
    -webkit-user-select: all;
}

.mirror-copy-btn {
    flex-shrink: 0;
    background-color: var(--bg-button);
    color: var(--text-secondary);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
    padding: 6px 14px;
    font-family: var(--font-family);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.mirror-copy-btn:hover {
    background-color: var(--border-input);
    border-color: var(--border-subtle);
    color: var(--text-primary);
}

.mirror-copy-btn.copied {
    background-color: var(--accent-green-dark);
    border-color: var(--accent-green);
    color: #ffffff;
}

.mirror-verification {
    margin-top: var(--space-xl);
}

.mirror-verification ol {
    counter-reset: none;
}

.mirror-verification li {
    margin-bottom: var(--space-md);
}

/* ========== VIDEO GRID ========== */

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-lg) 0;
}

.video-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.2s;
}

.video-item:hover {
    border-color: var(--border-subtle);
}

.video-item iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    border: none;
}

.video-item p {
    padding: var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin: 0;
}

/* ========== GALLERY ========== */

.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    margin: var(--space-lg) 0;
}

.gallery-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.3s, transform 0.3s;
}

.gallery-item:hover {
    border-color: var(--accent-green);
    transform: translateY(-2px);
}

.gallery-link {
    display: block;
    overflow: hidden;
    border-bottom: none !important;
}

.gallery-link:hover {
    border-bottom: none !important;
}

.gallery-link img,
.gallery-item > img {
    width: 100%;
    aspect-ratio: 1920 / 1207;
    object-fit: cover;
    display: block;
    transition: transform 0.4s, filter 0.4s;
    filter: brightness(0.85);
}

.gallery-item:hover .gallery-link img,
.gallery-item:hover > img {
    transform: scale(1.03);
    filter: brightness(1);
}

.gallery-item p {
    padding: var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin: 0;
    border-top: 1px solid var(--border-default);
}

/* ========== LIGHTBOX ========== */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.92);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: var(--space-xl);
    cursor: zoom-out;
}

.lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-lg);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 36px;
    cursor: pointer;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-circle);
    transition: color 0.2s, background-color 0.2s;
}

.lightbox-close:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.08);
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    object-fit: contain;
}

.lightbox-caption {
    margin-top: var(--space-md);
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    text-align: center;
    max-width: 600px;
}

/* ========== FOOTER ========== */

footer {
    background-color: var(--bg-navbar);
    border-top: 1px solid var(--border-default);
    margin-top: var(--space-2xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-xl);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
}

.footer-col h3 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: var(--space-md);
}

.footer-col p {
    font-size: var(--font-size-sm);
    color: var(--text-hint);
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: var(--space-sm);
}

.footer-col ul li a {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    font-weight: var(--font-weight-normal);
    border-bottom: none;
}

.footer-col ul li a:hover {
    color: var(--accent-green);
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-lg);
    border-top: 1px solid var(--border-default);
    text-align: center;
}

.footer-bottom p {
    font-size: var(--font-size-xs);
    color: var(--text-hint);
    margin-bottom: var(--space-xs);
}

.footer-bottom p:last-child {
    margin-bottom: 0;
    color: var(--text-disabled);
}

/* ========== RESPONSIVE ========== */

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .onion-bar-inner {
        padding: var(--space-sm) var(--space-md);
        gap: var(--space-xs);
    }

    .onion-bar-label {
        display: none;
    }

    .onion-bar-url {
        font-size: 11px;
    }

    .onion-bar-copy {
        padding: 4px 10px;
        font-size: 11px;
    }

    nav {
        padding: 0 var(--space-md);
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: var(--bg-navbar);
        border-bottom: 1px solid var(--border-default);
        padding: var(--space-sm);
        gap: 0;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-menu li a {
        padding: var(--space-md);
        border-radius: var(--radius-md);
    }

    main {
        padding: var(--space-lg) var(--space-md) var(--space-xl);
    }

    .hero {
        padding: var(--space-xl) 0;
    }

    h2 {
        font-size: var(--font-size-xl);
    }

    h3 {
        font-size: var(--font-size-lg);
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        padding: var(--space-xl) var(--space-md);
    }

    .mirrors-block {
        padding: var(--space-md);
    }

    .mirror-entry {
        padding: var(--space-md);
    }

    .mirror-label {
        margin-left: 0;
    }

    .mirror-entry-url {
        padding: var(--space-sm);
    }

    .mirror-url-text {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    :root {
        --navbar-height: 50px;
    }

    .nav-brand a {
        font-size: var(--font-size-md);
    }

    .hero h1 {
        font-size: 24px;
    }

    .hero-subtitle {
        font-size: var(--font-size-base);
    }

    main {
        padding: var(--space-md) var(--space-md) var(--space-xl);
    }

    section,
    article {
        padding: var(--space-lg) 0;
    }
}
