
/* Mobile auth buttons (inside hamburger menu) */
.mobile-auth {
    display: none;
}
/* ==========================================================================
   BASE.CSS - novanime.com
   Variables, Reset, Layout, Header, Nav, Search, Dropdown, Sidebar
   Foundation layer: loaded FIRST (sync).
   Do NOT add component/page styles here - use their respective files.
   ========================================================================== */

/* 1. CSS Custom Properties */
:root {
    --primary-red: #c80000;
    --primary-red-darker: #a00000;
    --bg-body: #0d0d0d;
    --bg-card: #1a1a1a;
    --text-primary: #e0e0e0;
    --text-secondary: #9ca3af;
    --text-muted: #666;
    --border-color: #333;
    --main-black: #0d0d0d;
    --sidebar-card: #1a1a1a;
    --sidebar-border: #333;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --main-red-hover: #a00000;
    --border-light: #333333;
    --gray-dark: #2a2a2a;
    --light-gray: #c9d1d9;
    --primary-color: var(--primary-red);
    --success: #198754;
    --main-dark: var(--main-black);
    --blue-primary: #3b82f6;
    --focus-outline: #ffffff66;
    --bg-premium-black: #0d0d0d;
    --bs-gray-700: #495057;
    --space-1: .25rem;
    --space-2: .5rem;
    --space-3: .75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
}

/* 2. Reset */
*,*::before,*::after { box-sizing: border-box; }
html,body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
body {
    color: var(--text-primary);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-body);
    background-image: url("/static/img/bg-circuit.b584bdc54474.svg");
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* 3. Layout */
.layout {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 15px;
    width: 100%;
    align-items: flex-start;
}
main {
    flex: 1 1 calc(100% - 380px);
    min-width: 300px;
    max-width: calc(100% - 380px);
}
aside {
    flex: 0 0 320px;
    width: 320px;
    max-width: 320px;
    min-width: 0;
}

/* 4. Header */
.site-header {
    background-color: var(--bg-card);
    border-bottom: 2px solid var(--primary-red);
    margin-bottom: 0;
}
.header-inner, .nv-header__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: .5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.header-left, .nv-header__left {
    display: flex;
    align-items: center;
    gap: 20px;
}
.header-right, .nv-header__right {
    display: flex;
    align-items: center;
    gap: 15px;
}
.brand, .nv-header__brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.brand-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
}
.brand-red { color: var(--primary-red); }

/* 5. Navigation */
.main-nav, .nv-header__nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.main-nav a, .nv-nav__link {
    color: #9ca3af;
    font-weight: 700;
    text-transform: uppercase;
    font-size: .85rem;
    text-decoration: none;
}
.main-nav a:hover, .main-nav a.active, .nv-nav__link:hover, .nv-nav__link.active {
    color: var(--primary-red);
}

/* 6. Nav Toggle (hamburger) */
.nav-toggle, .nv-nav__toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: var(--radius-sm);
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.nav-toggle:focus-visible, .nv-nav__toggle:focus-visible {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}
.nav-toggle__icon {
    width: 18px;
    height: 2px;
    background: #fff;
    position: relative;
    display: block;
    border-radius: 2px;
}
.nav-toggle__icon::before, .nav-toggle__icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}
.nav-toggle__icon::before { top: -6px; }
.nav-toggle__icon::after { top: 6px; }

/* 7. Search */
.search { display: flex; align-items: stretch; gap: 0; }
.search-input {
    background-color: #1a1a1a;
    border: 1px solid #30363d;
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    color: #fff;
    font-size: .9rem;
    outline: none;
    padding: .5rem .75rem;
    height: 44px;
}
.search-input:focus { border-color: var(--primary-red); }
.btn-search, .form__submit {
    background-color: var(--primary-red);
    color: #fff;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--primary-red);
    border-left: none;
}
.btn-search .icon-sm { width: 20px; height: 20px; }

/* 8. Dropdown / User Menu */
.user-menu, .nv-user-menu, .dropdown { position: relative; }
.user-trigger, .dropdown__trigger {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: var(--main-black);
    border: 1px solid #333;
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s ease;
}
.dropdown__trigger:hover { border-color: var(--primary-red); }
.dropdown__trigger::after {
    content: '';
    margin-left: 8px;
    border: 5px solid transparent;
    border-top-color: #888;
    transition: transform 0.2s ease;
}
.dropdown__trigger:hover::after { border-top-color: var(--primary-red); }
.dropdown__trigger:focus-visible {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-red);
}
.user-dropdown, .nv-user-dropdown, .site-header .dropdown__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 200px;
    background-color: var(--bg-card);
    border: 1px solid var(--primary-red);
    border-radius: .25rem;
    padding: .5rem 0;
    display: none;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    list-style: none;
    padding-left: 0;
}
.user-dropdown.show, .nv-user-dropdown.show, .site-header .dropdown__menu.show { display: block; }
.user-dropdown-item, .nv-user-dropdown__item, .dropdown__item {
    display: block;
    width: 100%;
    padding: .75rem 1rem;
    color: #fff;
    text-decoration: none;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    font-size: .9rem;
    transition: background-color .2s;
}
.user-dropdown-item:hover, .nv-user-dropdown__item:hover, .dropdown__item:hover {
    background-color: var(--primary-red);
    color: #fff;
}

/* 9. Sidebar */
.sidebar-container, .sidebar { width: 100%; }
.sidebar-block, .sidebar__block {
    background: var(--sidebar-card);
    border: 1px solid var(--sidebar-border);
    margin-bottom: 20px;
    border-radius: 4px;
    overflow: hidden;
}
.sidebar-header, .sidebar__header {
    background: linear-gradient(135deg, var(--primary-red) 0%, #8b0000 100%);
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    color: white;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    min-height: 44px;
}
.sidebar-list-item, .sidebar__item {
    padding: 10px 15px;
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-secondary);
}
.sidebar-list-item:last-child, .sidebar__item:last-child { border-bottom: none; }
.update-thumb {
    width: 40px;
    height: 40px;
    border-radius: 3px;
    object-fit: cover;
    border: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}

/* 10. Utility */
.fs-3 { font-size: 1.75rem; line-height: 1.2; }

/* 11. Modal close */
.modal .btn-close {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
    position: relative;
}
.modal .btn-close::before, .modal .btn-close::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 2px;
    background: #fff;
    transform-origin: center;
}
.modal .btn-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.modal .btn-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.modal .btn-close:hover { background: rgba(255,255,255,.1); }

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

@media (max-width: 991px) {
    body { background-attachment: scroll; background-size: auto; }
    .layout { flex-direction: column; gap: 25px; padding: 15px; }
    main { max-width: 100% !important; flex: 1 1 auto !important; min-width: 100% !important; }
    aside { flex: 0 0 auto; width: 100%; max-width: 100%; }

    /* Hide desktop auth buttons + search on mobile */
    .header-right .user-menu { display: none; }
    .header-right .search { display: none; }
    .header-right { gap: 0; }

    /* Mobile nav */
    .nav-toggle, .nv-nav__toggle { display: inline-flex; }
    .main-nav, .nv-header__nav {
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: opacity .2s ease, transform .2s ease, visibility .2s;
        position: fixed;
        left: 0; right: 0; top: 56px;
        background-color: var(--bg-card);
        border-bottom: 2px solid var(--primary-red);
        padding: .75rem 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: .5rem;
        z-index: 3000;
        width: 100%;
    }
    .main-nav.open, .nv-header__nav.open {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
    .mobile-auth {
        display: flex;
        gap: 10px;
        padding-top: 10px;
        border-top: 1px solid var(--border-color);
        margin-top: 10px;
    }
    .header-left, .nv-header__left { position: relative; }
    .header-right, .nv-header__right { gap: 10px; }
    .search-input { width: 160px; }
}

@media (max-width: 576px) {
    .header-inner, .nv-header__inner { padding: .5rem; }
    .header-left, .nv-header__left { gap: 10px; }
    .header-right, .nv-header__right { gap: 8px; }
    .search { flex: 1; }
    .search-input { width: 100%; font-size: 1rem; }
    .btn-search, .form__submit { width: 44px; height: 44px; }
    .brand-title { font-size: 1.25rem; }
    .user-trigger, .dropdown__trigger { padding: 6px 10px; font-size: .85rem; }
    .avatar { width: 28px; height: 28px; }
}
