:root {
    --bg: #0a0a0c;
    --surface: #111116;
    --surface2: #18181f;
    --border: rgba(255, 255, 255, 0.07);
    --accent: #e8b84b;
    --accent2: #c0392b;
    --text: #e8e4da;
    --muted: #7a7668;
    --card-w: 220px;
    --radius: 4px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: 18px;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* grain overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px;
    z-index: 9999;
}

/* =====================
   POPCORN INTRO (unchanged)
===================== */
#intro-screen {
    position: fixed;
    inset: 0;
    background: #0a0a0c;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#intro-screen.hiding {
    animation: fadeOutScreen 0.7s ease forwards;
}

@keyframes fadeOutScreen {
    to {
        opacity: 0;
        pointer-events: none;
    }
}

#popcorn-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    pointer-events: none;
}

.bucket-container {
    position: relative;
    z-index: 10002;
    animation: popIn 0.5s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes popIn {
    from {
        transform: scale(0) translateY(80px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.bucket-container svg {
    width: 100px;
    animation: shake 0.2s 1.6s ease 4 alternate;
}

@keyframes shake {
    from {
        transform: rotate(-7deg) scale(1.05);
    }

    to {
        transform: rotate(7deg) scale(1.05);
    }
}

#intro-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3rem, 14vw, 7rem);
    letter-spacing: 0.15em;
    color: var(--accent);
    z-index: 10002;
    white-space: nowrap;
    opacity: 0;
    text-shadow: 0 0 80px rgba(232, 184, 75, 0.5);
    animation: revealLogo 0.55s 2.5s ease forwards;
}

#intro-title span {
    color: var(--text);
}

@keyframes revealLogo {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* =====================
   HEADER
===================== */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 48px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 12, 0.88);
    backdrop-filter: blur(12px);
}

.logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 0.18em;
    color: var(--accent);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--text);
}

.logo-dot {
    width: 8px;
    height: 8px;
    background: var(--accent2);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .4;
        transform: scale(.7);
    }
}

/* header right side - auth buttons */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* sign in button (logged out state) */
#auth-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    font-family: 'DM Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

#auth-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* user menu (logged in state) */
#user-menu {
    display: none;
    align-items: center;
    gap: 8px;
    position: relative;
}

.user-avatar {
    width: 34px;
    height: 34px;
    background: var(--accent);
    color: #0a0a0c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
}

#user-greeting {
    font-family: 'DM Mono', monospace;
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.08em;
    cursor: pointer;
}

/* dropdown menu */
#user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 160px;
    overflow: hidden;
    z-index: 200;
}

#user-dropdown.open {
    display: block;
    animation: dropIn 0.15s ease;
}

@keyframes dropIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-family: 'DM Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--text);
    cursor: pointer;
    transition: background 0.12s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--surface2);
}

.dropdown-item.danger {
    color: #e05a4e;
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* =====================
   HERO / SEARCH
===================== */
#hero {
    padding: 80px 48px 60px;
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
    transition: padding .4s ease;
}

#hero.compact {
    padding: 32px 48px 24px;
}

.hero-eyebrow {
    font-family: 'DM Mono', monospace;
    font-size: .72rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeUp .6s .1s forwards;
}

.hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3.2rem, 9vw, 7rem);
    line-height: .95;
    letter-spacing: .04em;
    color: var(--text);
    opacity: 0;
    animation: fadeUp .6s .2s forwards;
}

.hero-title em {
    color: var(--accent);
    font-style: normal;
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--muted);
    font-style: italic;
    margin-top: 14px;
    opacity: 0;
    animation: fadeUp .6s .35s forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* search wrap */
.search-wrap {
    margin-top: 40px;
    opacity: 0;
    animation: fadeUp .6s .45s forwards;
    position: relative;
    z-index: 10;
}

.search-row {
    display: flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: visible;
    /* need visible for the autocomplete dropdown */
    transition: border-color .2s, box-shadow .2s;
    position: relative;
}

.search-row:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232, 184, 75, .12);
}

/* wrap input + dropdown together */
.search-input-wrap {
    flex: 1;
    position: relative;
}

#q {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: 'Crimson Pro', serif;
    font-size: 1.15rem;
    padding: 14px 20px;
}

#q::placeholder {
    color: var(--muted);
}

/* =====================
   AUTOCOMPLETE DROPDOWN
===================== */
/* #autocomplete-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    overflow: hidden;
    z-index: 300;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
} */

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.1s;
}

.suggestion-item:hover,
.suggestion-item.highlighted {
    background: var(--surface2);
}

.suggestion-poster {
    width: 32px;
    height: 46px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.suggestion-poster-empty {
    background: var(--surface2);
    border: 1px solid var(--border);
}

.suggestion-info {
    flex: 1;
    overflow: hidden;
    text-align: left;
}

.suggestion-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-meta {
    font-family: 'DM Mono', monospace;
    font-size: 0.6rem;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 2px;
}

/* filters */
.filters {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px 12px;
}

.filter-group label {
    font-family: 'DM Mono', monospace;
    font-size: .65rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
}

.filter-group select {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: 'Crimson Pro', serif;
    font-size: .95rem;
    cursor: pointer;
}

.filter-group select option {
    background: var(--surface2);
}

/* search button */
#btn-search {
    background: var(--accent);
    color: #0a0a0c;
    border: none;
    padding: 0 28px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: .1em;
    cursor: pointer;
    transition: background .18s;
    white-space: nowrap;
    border-radius: 0 var(--radius) var(--radius) 0;
    flex-shrink: 0;
}

#btn-search:hover {
    background: #f5cc6a;
}

#btn-search:active {
    background: #d4a43a;
}

/* =====================
   TOP 10 SLIDER
===================== */
#top10-section {
    padding: 0 0 60px;
    overflow: hidden;
    position: relative;
}

.top10-label {
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0 48px;
    margin-bottom: 20px;
}

/* the slider itself */
.slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.slider-wrapper:hover .slider-arrow {
    opacity: 1;
}

#slider-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform;
}

/* individual slide */
.slide {
    min-width: 100%;
    height: 420px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
}

/* blurred background poster */
.slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 20%;
    background-color: var(--surface2);
    transform: scale(1.05);
    transition: transform 6s ease;
    filter: blur(2px);
}

.slide:hover .slide-bg {
    transform: scale(1.08);
}

/* dark gradient over it */
.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right,
            rgba(10, 10, 12, 0.95) 0%,
            rgba(10, 10, 12, 0.7) 50%,
            rgba(10, 10, 12, 0.2) 100%);
}

/* text content */
.slide-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 80px 40px 60px;
    max-width: 620px;
}

.slide-rank {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 10px;
}

.slide-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}

.slide-meta {
    display: flex;
    gap: 16px;
    font-family: 'DM Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.slide-rating {
    color: var(--accent);
}

.slide-plot {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(232, 228, 218, 0.7);
    margin-bottom: 22px;
    font-style: italic;
}

.slide-btn {
    display: inline-block;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.12em;
    padding: 10px 24px;
    cursor: pointer;
    border-radius: var(--radius);
    transition: background 0.15s, color 0.15s;
    width: fit-content;
}

.slide-btn:hover {
    background: var(--accent);
    color: #0a0a0c;
}

/* prev / next arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10, 10, 12, 0.6);
    border: 1px solid var(--border);
    color: var(--text);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s, background 0.15s;
}

.slider-arrow:hover {
    background: rgba(10, 10, 12, 0.9);
}

.slider-arrow.prev {
    left: 16px;
}

.slider-arrow.next {
    right: 16px;
}

/* dots */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 0 48px;
}

.slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--muted);
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    padding: 0;
}

.slider-dot.active {
    background: var(--accent);
    transform: scale(1.4);
}

/* =====================
   RESULTS AREA (unchanged)
===================== */
#results-section {
    padding: 0 48px 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.results-header {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
}

.results-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    letter-spacing: .1em;
    color: var(--text);
}

.results-count {
    font-family: 'DM Mono', monospace;
    font-size: .7rem;
    color: var(--muted);
    letter-spacing: .1em;
}

#grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-w), 1fr));
    gap: 24px;
}

/* =====================
   MOVIE CARD (unchanged)
===================== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform .22s ease, border-color .22s, box-shadow .22s;
    animation: cardIn .4s ease both;
}

.card:hover {
    transform: translateY(-5px) scale(1.015);
    border-color: rgba(232, 184, 75, .35);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
    background: var(--surface2);
}

.card-poster-fallback {
    width: 100%;
    aspect-ratio: 2/3;
    background: var(--surface2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--muted);
}

.card-poster-fallback svg {
    opacity: .3;
}

.card-poster-fallback span {
    font-family: 'DM Mono', monospace;
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.card-body {
    padding: 14px 16px 16px;
}

.card-year {
    font-family: 'DM Mono', monospace;
    font-size: .65rem;
    color: var(--accent);
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.card-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.15rem;
    letter-spacing: .06em;
    line-height: 1.15;
    color: var(--text);
}

.card::before {
    content: attr(data-type);
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(10, 10, 12, .7);
    color: var(--muted);
    font-family: 'DM Mono', monospace;
    font-size: .6rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    padding: 3px 7px;
    border-radius: 2px;
    backdrop-filter: blur(4px);
}

/* =====================
   DETAIL MODAL
===================== */
#modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, .75);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#modal-overlay.open {
    display: flex;
    animation: fadeIn .2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 860px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp .3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#modal::-webkit-scrollbar {
    width: 4px;
}

#modal::-webkit-scrollbar-track {
    background: var(--surface2);
}

#modal::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.modal-inner {
    display: grid;
    grid-template-columns: 260px 1fr;
}

/* POSTER FIX - was breaking on some images */
.modal-poster-col {
    position: relative;
    width: 260px;
    min-height: 420px;
}

.modal-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.modal-poster-fallback {
    position: absolute;
    inset: 0;
    background: var(--surface2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}

.modal-content {
    padding: 36px 32px 32px;
    min-width: 0;
    /* prevent overflow */
}

.modal-meta-top {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.pill {
    font-family: 'DM Mono', monospace;
    font-size: .65rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 2px;
    border: 1px solid var(--border);
    color: var(--muted);
}

.pill.accent {
    border-color: var(--accent);
    color: var(--accent);
}

/* don't show empty pills */
.pill:empty {
    display: none;
}

.modal-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1;
    letter-spacing: .06em;
    margin-bottom: 6px;
}

.modal-plot {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #c4bfb2;
    margin-bottom: 28px;
    border-left: 2px solid var(--accent);
    padding-left: 16px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.detail-label {
    font-family: 'DM Mono', monospace;
    font-size: .62rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 3px;
}

.detail-value {
    font-size: 1rem;
    color: var(--text);
    font-weight: 600;
}

.ratings-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    margin-bottom: 24px;
}

.rating-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rating-source {
    font-family: 'DM Mono', monospace;
    font-size: .6rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
}

.rating-val {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: .06em;
    color: var(--accent);
}

/* watchlist / watched action buttons inside modal */
.modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.action-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 9px 18px;
    cursor: pointer;
    border-radius: var(--radius);
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.action-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.action-btn.active {
    background: rgba(232, 184, 75, 0.12);
    border-color: var(--accent);
    color: var(--accent);
}

/* close button */
#btn-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(10, 10, 12, .7);
    border: 1px solid var(--border);
    color: var(--text);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background .15s;
}

#btn-close:hover {
    background: var(--accent2);
}

/* =====================
   MY LISTS MODAL
===================== */
#lists-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, .75);
    backdrop-filter: blur(8px);
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
}

#lists-modal.open {
    display: flex;
    animation: fadeIn .2s ease;
}

.lists-modal-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 900px;
    position: relative;
    animation: slideUp .3s ease;
}

.lists-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
}

.lists-modal-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    letter-spacing: 0.1em;
}

.lists-close-btn {
    background: rgba(10, 10, 12, .7);
    border: 1px solid var(--border);
    color: var(--text);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

.lists-close-btn:hover {
    background: var(--accent2);
}

/* tabs */
.lists-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
}

.list-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-family: 'DM Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 14px 16px;
    cursor: pointer;
    transition: color 0.15s;
    margin-bottom: -1px;
}

.list-tab:hover {
    color: var(--text);
}

.list-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* content area */
#lists-content {
    padding: 28px;
    min-height: 300px;
}

.lists-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 60px 20px;
    text-align: center;
}

.lists-empty span {
    font-size: 2.5rem;
}

.lists-empty p {
    color: var(--muted);
    font-style: italic;
}

.lists-empty-sub {
    font-size: 0.9rem;
}

.lists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.list-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform 0.18s, border-color 0.18s;
}

.list-card:hover {
    transform: translateY(-3px);
    border-color: rgba(232, 184, 75, .3);
}

.list-card-poster {
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: var(--surface);
}

.list-card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.list-card-info {
    padding: 10px 12px 12px;
}

.list-card-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    line-height: 1.2;
    margin-bottom: 2px;
}

.list-card-year {
    font-family: 'DM Mono', monospace;
    font-size: 0.6rem;
    color: var(--muted);
    letter-spacing: 0.1em;
}

.list-card-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    background: rgba(10, 10, 12, 0.8);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--muted);
    font-size: 0.65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s;
}

.list-card:hover .list-card-remove {
    opacity: 1;
}

.list-card-remove:hover {
    background: var(--accent2);
    color: white;
}

/* =====================
   AUTH MODAL
===================== */
#auth-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 600;
    background: rgba(0, 0, 0, .8);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#auth-modal.open {
    display: flex;
    animation: fadeIn .2s ease;
}

.auth-modal-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 400px;
    padding: 36px 32px;
    position: relative;
    animation: slideUp .3s ease;
}

.auth-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.15s;
}

.auth-close-btn:hover {
    color: var(--text);
}

.auth-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 0.1em;
    margin-bottom: 28px;
}

.auth-error {
    background: rgba(192, 57, 43, 0.15);
    border-left: 3px solid var(--accent2);
    color: #ee9988;
    font-family: 'DM Mono', monospace;
    font-size: 0.72rem;
    padding: 10px 14px;
    border-radius: 2px;
    margin-bottom: 20px;
}

.auth-field {
    margin-bottom: 18px;
}

.auth-field label {
    display: block;
    font-family: 'DM Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}

.auth-field input {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: 'Crimson Pro', serif;
    font-size: 1rem;
    padding: 11px 14px;
    outline: none;
    transition: border-color 0.15s;
}

.auth-field input:focus {
    border-color: var(--accent);
}

.auth-submit-btn {
    width: 100%;
    background: var(--accent);
    color: #0a0a0c;
    border: none;
    border-radius: var(--radius);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    padding: 13px;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.15s;
}

.auth-submit-btn:hover {
    background: #f5cc6a;
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.auth-switch {
    text-align: center;
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: 20px;
}

.auth-link-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: inherit;
    text-decoration: underline;
    padding: 0;
}

/* =====================
   UI STATES 
===================== */
#state-area {
    padding: 80px 48px;
    text-align: center;
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.state-error,
.state-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: fadeUp 0.4s ease both;
}

.state-icon {
    font-size: 3.5rem;
    margin-bottom: 8px;
    display: block;
}

.state-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: .08em;
    margin-bottom: 4px;
}

.state-sub {
    color: var(--muted);
    font-style: italic;
    font-size: 1rem;
    max-width: 420px;
    line-height: 1.6;
}

.state-error .state-title {
    color: #e05a4e;
}

/* Arama kutusuna geri dön butonu */
.state-retry-btn {
    margin-top: 20px;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.1em;
    padding: 10px 28px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.state-retry-btn:hover {
    background: var(--accent);
    color: #0a0a0c;
}

.loader {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.loader span {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: bounce 1.1s infinite ease-in-out;
}

.loader span:nth-child(2) {
    animation-delay: .18s;
}

.loader span:nth-child(3) {
    animation-delay: .36s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: .3;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* =====================
   PAGINATION (unchanged)
===================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pg-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: 'DM Mono', monospace;
    font-size: .72rem;
    letter-spacing: .1em;
    padding: 8px 18px;
    cursor: pointer;
    border-radius: var(--radius);
    transition: border-color .18s, color .18s;
}

.pg-btn:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}

.pg-btn:disabled {
    opacity: .35;
    cursor: default;
}

.pg-info {
    font-family: 'DM Mono', monospace;
    font-size: .68rem;
    color: var(--muted);
    letter-spacing: .1em;
}

/* =====================
   FOOTER
===================== */
.footer {
    font-family: 'DM Mono', monospace;
    font-size: .68rem;
    color: var(--muted);
    letter-spacing: .12em;
    text-transform: uppercase;
    text-align: center;
    padding: 20px 0;
    margin-top: 10px;
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 768px) {
    header {
        padding: 16px 20px;
    }

    #hero,
    #results-section {
        padding-left: 20px;
        padding-right: 20px;
    }

    #hero {
        padding-top: 48px;
        padding-bottom: 36px;
    }

    #hero.compact {
        padding-top: 20px;
        padding-bottom: 16px;
    }

    .slide {
        height: 340px;
    }

    .slide-content {
        padding: 30px 20px;
    }

    .slide-plot {
        display: none;
    }

    /* too cramped on mobile */

    .top10-label,
    .slider-dots {
        padding: 0 20px;
    }

    .modal-inner {
        grid-template-columns: 1fr;
    }

    /* on mobile the poster goes on top, full width */
    .modal-poster-col {
        width: 100%;
    }

    .modal-poster {
        width: 100%;
        height: 260px;
        min-height: unset;
        object-fit: cover;
        object-position: center 15%;
    }

    .modal-content {
        padding: 24px 20px 28px;
    }

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

    .lists-modal-box {
        max-width: 100%;
    }

    .lists-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .top10-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    :root {
        --card-w: 150px;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .slide {
        height: 280px;
    }

    .slide-title {
        font-size: 1.6rem;
    }

    #auth-btn span {
        display: none;
    }

    .top10-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 20px;
    }

    /* just show icon on tiny screens */
}


/* AUTOCOMPLETE FIX */
#autocomplete-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    z-index: 300;
}

/* TOP10 GRID */
.top10-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding: 0 48px;
}

.top-card {
    position: relative;
    cursor: pointer;
}

.top-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 4px;
}

.rank {
    position: absolute;
    top: 6px;
    left: 6px;
    background: black;
    color: white;
    font-size: 12px;
    padding: 4px 6px;
}

/* RESPONSIVE FIX */
.card img,
.modal-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Top card fallback (posteri olmayan filmler için) */
.top-card-fallback {
    width: 100%;
    aspect-ratio: 2/3;
    background: var(--surface2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}

.top-card.no-poster {
    background: var(--surface2);
    border-radius: 4px;
    aspect-ratio: 2/3;
}

/* Top series label spacing */
#top-series-label {
    margin-top: 40px;
}