/* ==========================================================================
   LBXD Stats Generator — Complete Cinematic Design System
   Inspired by Letterboxd — Dark, Emerald Accent, High Legibility & Mobile Ready
   ========================================================================== */

:root,
[data-theme="dark"] {
    --bg: #14181C;
    --pn: #1B2228;
    --surface: #202830;
    --surface-hover: #293440;
    --bd: #2C3440;
    --bd-light: #3D4857;
    --tx: #FFFFFF;
    --mut: #99AABB;
    --dim: #667788;
    --g: #00E054;
    --gd: #006B35;
    --g-subtle: rgba(0, 224, 84, 0.12);
    --g-glow: rgba(0, 224, 84, 0.35);
    --o: #FF8000;
    --o-subtle: rgba(255, 128, 0, 0.14);
    --b: #40BCF4;
    --red: #FF5A5F;
    --serif: 'Fraunces', Georgia, serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

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

html {
    -webkit-text-size-adjust: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--bd) var(--bg);
    overflow-x: hidden;
}

body {
    background: var(--bg);
    color: var(--tx);
    font-family: var(--sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Global Cinematic Dark Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--bd);
    border-radius: 4px;
    border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bd-light);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

#root {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

button,
select,
input {
    font: inherit;
    color: inherit;
    outline: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.work-correction-box {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.work-correction-input {
    width: 100%;
    border: 1px solid var(--bd);
    border-radius: 6px;
    background: var(--surface);
    padding: 7px 8px;
    font-size: 11px;
}

.work-correction-results {
    display: grid;
    gap: 3px;
    max-height: 180px;
    overflow-y: auto;
}

.work-correction-result {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: var(--surface);
    padding: 6px 7px;
    text-align: left;
    cursor: pointer;
    font-size: 11px;
}

.work-correction-result:hover {
    border-color: var(--g);
}

.work-correction-result small,
.work-correction-status,
.work-correction-error {
    color: var(--mut);
    font-size: 10px;
}

.work-correction-error {
    color: var(--red);
}

.profile-overview-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 1fr);
    gap: 18px 28px;
    margin: 28px 0;
    padding: 22px 24px;
    border: 1px solid var(--bd);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pn), var(--surface));
}

.profile-overview-heading {
    min-width: 0;
}

.profile-overview-label {
    margin-bottom: 5px;
    color: var(--tx);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.profile-overview-kicker {
    color: var(--g);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.profile-overview-card h2 {
    margin-top: 3px;
    font-family: var(--serif);
    font-size: 25px;
}

.profile-overview-bio {
    grid-column: 1 / -1;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--bd);
    color: var(--mut);
    font-size: 13px;
    line-height: 1.65;
}

.profile-overview-bio blockquote {
    border-left: 3px solid var(--g);
    margin: 0;
    padding: 8px 0 8px 14px;
    color: var(--tx);
    font-family: var(--serif);
    font-size: 15px;
    font-style: italic;
}

.profile-overview-meta {
    display: grid;
    align-content: start;
    gap: 7px;
    color: var(--mut);
    font-size: 12px;
}

.profile-overview-meta strong,
.profile-favorites strong {
    color: var(--tx);
}

.profile-overview-meta a,
.profile-favorites a {
    color: var(--g);
}

.profile-favorites {
    grid-column: 1 / -1;
    margin-top: 2px;
    padding-top: 17px;
    border-top: 1px solid var(--bd);
    color: var(--mut);
    font-size: 12px;
}

.profile-favorites-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 13px;
    color: var(--tx);
    font-size: 13px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.profile-favorites-icon {
    color: var(--o);
    font-size: 18px;
    line-height: 1;
}

.profile-favorites-rule {
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, var(--o), transparent);
}

.profile-favorite-posters {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}

.profile-favorite-item {
    position: relative;
    min-width: 0;
    padding: 10px 10px 12px;
    border: 1px solid rgba(255, 128, 0, .35);
    border-radius: 9px;
    background: linear-gradient(165deg, rgba(255, 128, 0, .12), var(--surface));
    box-shadow: 0 5px 16px rgba(0, 0, 0, .22);
}

.profile-favorite-item .film-card {
    min-width: 0;
}

.profile-favorite-number {
    width: 24px;
    height: 24px;
    margin: -4px 0 5px -4px;
    border-radius: 50%;
    background: var(--o);
    color: #1b1208;
    font-size: 12px;
    font-weight: 900;
    line-height: 24px;
    text-align: center;
}

.profile-favorite-item .film-title-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--tx);
    font-weight: 700;
}

.profile-favorite-item .film-poster-wrap {
    aspect-ratio: 2 / 3;
}

.profile-favorite-item .film-info-bar {
    display: flex;
    padding-top: 7px;
}

.person-year-filter {
    max-width: 150px;
    border: 1px solid var(--bd);
    border-radius: 5px;
    background: var(--surface);
    padding: 5px 7px;
    color: var(--tx);
    font-size: 11px;
}

@media (max-width: 700px) {
    .info-modal {
        max-height: 88vh;
        padding: 24px 17px 17px;
        border-radius: 11px;
    }

    .info-modal-header {
        gap: 11px;
    }

    .info-modal-icon {
        flex-basis: 45px;
        width: 45px;
        height: 45px;
        border-radius: 12px;
        font-size: 22px;
    }

    .info-modal-body {
        font-size: 13px;
    }

    .info-modal-footer {
        align-items: flex-end;
    }

    .profile-overview-card {
        grid-template-columns: 1fr;
    }

    .profile-favorites {
        grid-column: auto;
    }

    .profile-favorite-posters {
        gap: 8px;
    }

    .profile-favorite-item {
        padding: 7px 7px 9px;
    }

    .profile-favorite-item .film-title-text {
        font-size: 11px;
    }
}

/* ==========================================================================
   Splash / Welcome Loading Screen
   ========================================================================== */

.splash-overlay {
    position: fixed;
    inset: 0;
    background: #0E1215;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: splashFadeIn 0.3s ease-out;
}

@keyframes splashFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.splash-content {
    text-align: center;
    max-width: 440px;
}

.splash-film-reel {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    border: 3px solid rgba(0, 224, 84, 0.2);
    border-top-color: var(--g);
    animation: reelSpin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    position: relative;
    box-shadow: 0 0 24px var(--g-glow);
}

.splash-film-reel::after {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.2);
}

@keyframes reelSpin {
    to {
        transform: rotate(360deg);
    }
}

.splash-logo {
    font-family: var(--serif);
    font-size: 52px;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--g);
    margin-bottom: 6px;
    text-shadow: 0 0 30px var(--g-glow);
}

.splash-tagline {
    font-family: var(--serif);
    font-style: italic;
    font-size: 19px;
    color: #FFFFFF;
    margin-bottom: 24px;
}

.splash-progress-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
}

.splash-progress-bar {
    height: 100%;
    background: var(--g);
    border-radius: 2px;
    transition: width 0.25s ease;
    box-shadow: 0 0 10px var(--g);
}

.splash-status-text {
    font-size: 13px;
    color: var(--mut);
    letter-spacing: 0.02em;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(20, 24, 28, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--bd);
    transition: background-color 0.2s;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 58px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--serif);
    font-weight: 900;
    font-size: 25px;
    letter-spacing: -0.03em;
    color: var(--g);
    cursor: pointer;
    user-select: none;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-logo-img {
    height: 28px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.brand-badge {
    font-size: 10px;
    font-family: var(--sans);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--surface);
    color: var(--mut);
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid var(--bd);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
    height: 100%;
}

.header-nav::-webkit-scrollbar {
    display: none;
}

.nav-link {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0 13px;
    height: 100%;
    color: var(--mut);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s, border-color 0.15s;
}

.nav-link:hover {
    color: var(--tx);
}

.nav-link.active {
    color: var(--tx);
    border-bottom-color: var(--g);
    font-weight: 600;
}

.nav-link.graphed-pill {
    color: var(--g);
    font-weight: 600;
}

.nav-link.graphed-pill.active {
    border-bottom-color: var(--g);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

/* ==========================================================================
   Buttons & Badges
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: none;
    border-radius: 6px;
    padding: 9px 18px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s, filter 0.15s;
    user-select: none;
    text-decoration: none;
    line-height: 1.2;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--g);
    color: #0A170E;
}

.btn-primary:hover {
    filter: brightness(1.1);
}

.btn-ghost {
    background: transparent;
    color: var(--tx);
    border: 1px solid var(--bd);
}

.btn-ghost:hover {
    background: var(--surface);
    border-color: var(--mut);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 6px;
    background: transparent;
    border: 1px solid var(--bd);
    color: var(--mut);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.btn-icon:hover {
    background: var(--surface);
    color: var(--tx);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12.5px;
    border-radius: 4px;
}

.btn-lg {
    padding: 13px 26px;
    font-size: 15px;
    border-radius: 8px;
}

/* ==========================================================================
   Cinematic Hero Section (Letterboxd Style)
   ========================================================================== */

.hero-dashboard {
    position: relative;
    background: linear-gradient(180deg, var(--pn) 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--bd);
    padding: 40px 0 32px;
    margin-bottom: 24px;
    overflow: hidden;
}

.hero-backdrop-collage {
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background-size: cover;
    background-position: center;
    filter: grayscale(40%) contrast(1.1);
    pointer-events: none;
}

.hero-dashboard-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 36px;
    align-items: center;
}

.hero-welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--g);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.hero-welcome-title {
    font-family: var(--serif);
    font-size: clamp(34px, 4.5vw, 56px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--tx);
    margin-bottom: 10px;
}

.hero-welcome-sub {
    font-size: 16px;
    color: var(--mut);
    line-height: 1.55;
    max-width: 48ch;
    margin-bottom: 24px;
}

.hero-actions-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-side-poster-fan {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    padding-right: 20px;
}

.hero-poster-card-stack {
    width: 140px;
    aspect-ratio: 2/3;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--bd);
    box-shadow: var(--shadow-lg);
    background: var(--surface);
    transition: transform 0.25s ease;
}

.hero-poster-card-stack:nth-child(1) {
    transform: rotate(-7deg) translateX(24px) scale(0.92);
    z-index: 1;
}

.hero-poster-card-stack:nth-child(2) {
    transform: rotate(0deg) scale(1);
    z-index: 2;
    border-color: var(--g);
}

.hero-poster-card-stack:nth-child(3) {
    transform: rotate(7deg) translateX(-24px) scale(0.92);
    z-index: 1;
}

.hero-poster-card-stack:hover {
    transform: translateY(-8px) scale(1.05);
    z-index: 4;
}

/* ==========================================================================
   Media Filter Bar (All / Movies / Series)
   ========================================================================== */

.media-filter-pills {
    display: inline-flex;
    background: var(--surface);
    border: 1px solid var(--bd);
    border-radius: 30px;
    padding: 3px;
    gap: 2px;
}

.media-filter-btn {
    background: transparent;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--mut);
    cursor: pointer;
    transition: all 0.15s ease;
}

.media-filter-btn:hover {
    color: var(--tx);
}

.media-filter-btn.active {
    background: var(--g);
    color: #0A170E;
    font-weight: 700;
}

/* ==========================================================================
   Movie & TV Posters (Letterboxd Ratio 2:3)
   ========================================================================== */

.poster-shelf-container {
    margin: 28px 0;
}

.poster-shelf-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}

.poster-shelf-title {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--tx);
}

.poster-shelf-count {
    font-size: 13px;
    color: var(--mut);
}

.poster-shelf {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-top: 24px;
    padding-bottom: 16px;
    margin-top: -16px;
    scrollbar-width: thin;
    scrollbar-color: var(--bd) transparent;
}

.poster-shelf::-webkit-scrollbar {
    height: 6px;
}

.poster-shelf::-webkit-scrollbar-thumb {
    background: var(--bd);
    border-radius: 3px;
}

.poster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
    gap: 16px;
    padding-top: 20px;
    margin: 4px 0 24px;
}

.film-card {
    width: 135px;
    flex: 0 0 135px;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-top: 10px;
    margin-top: 0;
    transition: z-index 0.15s ease;
}

.film-card:hover {
    z-index: 10;
}

.poster-grid .film-card {
    width: 100%;
    flex: none;
}

.film-poster-wrap {
    aspect-ratio: 2/3;
    border-radius: 6px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--bd);
    position: relative;
    box-sizing: border-box;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.film-card:hover .film-poster-wrap {
    transform: translateY(-4px);
    border-color: var(--g);
    box-shadow: 0 0 0 1px var(--g), 0 10px 24px rgba(0, 0, 0, 0.7);
}

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

.film-poster-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 10px;
    background: linear-gradient(160deg, #1C2720, #0E1210);
    font-family: var(--serif);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    color: #E2ECE5;
}

.film-poster-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 8px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.film-card:hover .film-poster-overlay {
    opacity: 1;
}

.overlay-stars {
    color: var(--g);
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
}

.overlay-year {
    font-size: 11px;
    color: #C8D6E5;
    margin-top: 2px;
}

.film-info-bar {
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 12px;
}

.film-stars {
    color: var(--g);
    font-size: 12px;
    letter-spacing: -0.5px;
}

.film-year {
    color: var(--mut);
    font-size: 11px;
}

.film-title-text {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--tx);
    line-height: 1.35;
    margin-top: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    min-height: 34px;
    transition: color 0.15s ease;
}

.film-card:hover .film-title-text {
    color: var(--g);
}

.film-tv-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(64, 188, 244, 0.9);
    color: #061520;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 2px 5px;
    border-radius: 3px;
    z-index: 2;
    text-transform: uppercase;
}

.film-heart-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    color: var(--o);
    font-size: 14px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
    z-index: 2;
}

/* ==========================================================================
   Person Cards (Directors, Actors, Actresses, Creators)
   ========================================================================== */

.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.person-card {
    text-align: center;
    background: var(--pn);
    border: 1px solid var(--bd);
    border-radius: 8px;
    padding: 18px 12px;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.person-card:hover {
    border-color: var(--g);
    transform: translateY(-3px);
}

.person-photo-circle {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    margin: 0 auto 12px;
    overflow: hidden;
    background: var(--surface);
    border: 2px solid var(--bd);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--mut);
}

.person-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--tx);
    line-height: 1.25;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    min-height: 34px;
}

.person-count {
    font-size: 12px;
    color: var(--mut);
}

.person-avg-rating {
    font-size: 12px;
    color: var(--g);
    margin-top: 3px;
    font-weight: 600;
}

/* ==========================================================================
   Modals: Film Detail & Person Detail
   ========================================================================== */

.modal-backdrop-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.15s ease-out;
    overflow-y: auto;
    overflow-x: hidden;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.film-detail-modal,
.person-detail-modal,
.info-modal {
    background: var(--pn);
    border: 1px solid var(--bd);
    border-radius: 14px;
    max-width: 860px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: scaleUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    scrollbar-width: thin;
    scrollbar-color: var(--bd) transparent;
}

.info-modal-overlay {
    padding: 16px;
}

.info-modal {
    max-width: 640px;
    max-height: min(760px, 90vh);
    padding: 30px 34px 22px;
    background:
        radial-gradient(circle at 0% 0%, rgba(0, 224, 84, .1), transparent 34%),
        linear-gradient(145deg, #1d272d, var(--pn) 55%);
    overflow-y: auto;
}

.info-modal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-right: 28px;
}

.info-modal-icon {
    display: grid;
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 1px solid rgba(0, 224, 84, .35);
    border-radius: 15px;
    background: rgba(0, 224, 84, .1);
    box-shadow: inset 0 0 24px rgba(0, 224, 84, .06);
    font-size: 27px;
}

.info-modal-eyebrow {
    margin-bottom: 5px;
    color: var(--g);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.info-modal h2 {
    margin: 0;
    color: var(--tx);
    font-family: var(--serif);
    font-size: clamp(25px, 5vw, 36px);
    line-height: 1.1;
}

.info-modal-divider {
    height: 1px;
    margin: 24px 0 21px;
    background: linear-gradient(90deg, var(--g), rgba(0, 224, 84, 0));
    opacity: .65;
}

.info-modal-body {
    color: var(--mut);
    font-size: 14px;
    line-height: 1.7;
}

.info-modal-body p + p {
    margin-top: 14px;
}

.info-modal-body strong {
    color: var(--tx);
}

.info-modal-body p {
    margin: 0;
    padding: 13px 15px;
    border: 1px solid rgba(61, 72, 87, .8);
    border-radius: 9px;
    background: rgba(20, 24, 28, .34);
}

.info-modal-links {
    display: grid;
    gap: 9px;
    margin-top: 20px;
}

.info-modal-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--bd);
    border-radius: 7px;
    padding: 10px 12px;
    color: var(--g);
    background: rgba(32, 40, 48, .72);
    transition: border-color .15s ease, transform .15s ease, background .15s ease;
}

.info-modal-links a:hover {
    border-color: var(--g);
    background: rgba(0, 224, 84, .08);
    transform: translateX(2px);
}

.info-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 26px;
    padding-top: 17px;
    border-top: 1px solid var(--bd);
    color: var(--dim);
    font-size: 11px;
}

.info-modal-close {
    margin: 0;
    white-space: nowrap;
}

.film-detail-modal::-webkit-scrollbar,
.person-detail-modal::-webkit-scrollbar {
    width: 6px;
}

.film-detail-modal::-webkit-scrollbar-track,
.person-detail-modal::-webkit-scrollbar-track {
    background: transparent;
}

.film-detail-modal::-webkit-scrollbar-thumb,
.person-detail-modal::-webkit-scrollbar-thumb {
    background: var(--bd);
    border-radius: 4px;
}

@keyframes scaleUp {
    from {
        transform: scale(0.96) translateY(8px);
        opacity: 0;
    }

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

.modal-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 17px;
    transition: background 0.15s;
}

.modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.95);
}

.modal-backdrop-header {
    height: 250px;
    position: relative;
    background: var(--surface);
    overflow: hidden;
}

.modal-backdrop-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-backdrop-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(20, 24, 28, 0.25) 0%, var(--pn) 100%);
}

.modal-content-grid {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 24px;
    padding: 0 28px 28px;
    margin-top: -90px;
    position: relative;
    z-index: 2;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

.modal-content-grid>* {
    min-width: 0;
}

.modal-poster-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-body-col {
    min-width: 0;
}

.modal-poster-box {
    aspect-ratio: 2/3;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--bd);
    box-shadow: var(--shadow-md);
    background: var(--surface);
}

.modal-poster-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-title-row {
    margin-bottom: 6px;
}

.modal-film-title {
    font-family: var(--serif);
    font-size: 30px;
    font-weight: 800;
    color: var(--tx);
    line-height: 1.15;
}

.modal-orig-title {
    color: var(--mut);
    font-size: 14px;
    margin-top: 2px;
}

.modal-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    font-size: 14px;
    color: var(--mut);
}

.modal-user-rating {
    color: var(--g);
    font-size: 18px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.modal-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.modal-pill {
    background: var(--surface);
    border: 1px solid var(--bd);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 12px;
    color: var(--mut);
}

.modal-overview {
    color: var(--tx);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 18px;
}

.modal-stats-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
    min-width: 0;
}

.modal-stat-box {
    background: var(--surface);
    border: 1px solid var(--bd);
    border-radius: 6px;
    padding: 10px;
    text-align: center;
}

.modal-stat-box-val {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--tx);
}

.modal-stat-box-lbl {
    font-size: 11px;
    color: var(--mut);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.modal-people-section {
    margin-top: 14px;
}

.modal-people-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mut);
    margin-bottom: 8px;
    font-weight: 600;
}

.modal-people-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 2px 0 6px;
    max-width: 100%;
    overflow-x: hidden;
}

.modal-person-mini {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--bd);
    border-radius: 20px;
    padding: 4px 12px 4px 4px;
    font-size: 12.5px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    max-width: 100%;
}

.modal-person-mini:hover {
    border-color: var(--g);
    background: var(--surface-hover);
}

.modal-person-mini-img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bd);
}

.modal-review-box {
    background: var(--surface);
    border-left: 3px solid var(--g);
    padding: 14px 18px;
    border-radius: 0 8px 8px 0;
    margin: 14px 0;
    font-size: 14px;
    color: var(--tx);
    line-height: 1.55;
    word-break: break-word;
}

.modal-review-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--tx);
    word-break: break-word;
}

.modal-review-text p {
    margin: 0 0 10px;
}

.modal-review-text p:last-child {
    margin-bottom: 0;
}

.modal-review-text b,
.modal-review-text strong {
    font-weight: 700;
    color: #FFFFFF;
}

.modal-review-text i,
.modal-review-text em {
    font-style: italic;
    color: var(--tx);
}

.modal-review-text a {
    color: var(--g);
    text-decoration: underline;
}

.modal-review-text blockquote {
    border-left: 3px solid var(--g);
    margin: 8px 0;
    padding-left: 12px;
    color: var(--mut);
    font-style: italic;
}

/* Person Detail Modal Specific */
.person-header-banner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px;
    border-bottom: 1px solid var(--bd);
    background: linear-gradient(180deg, var(--surface) 0%, var(--pn) 100%);
}

.person-portrait-big {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--g);
    box-shadow: 0 0 20px var(--g-glow);
    flex-shrink: 0;
    background: var(--surface);
}

.person-portrait-big img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-info-content {
    flex: 1;
}

.person-name-big {
    font-family: var(--serif);
    font-size: 32px;
    font-weight: 800;
    color: var(--tx);
    line-height: 1.1;
    margin-bottom: 4px;
}

.person-role-tag {
    display: inline-block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--g);
    margin-bottom: 8px;
}

.person-bio-text {
    font-size: 13.5px;
    color: var(--mut);
    line-height: 1.55;
    margin-top: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   Redesigned Cinematic Landing & Dropzone
   ========================================================================== */

.landing-hero-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 520px;
    background: radial-gradient(circle at 50% 15%, rgba(0, 224, 84, 0.09), transparent 70%),
        linear-gradient(180deg, rgba(20, 24, 28, 0.4) 0%, var(--bg) 100%);
    pointer-events: none;
    z-index: 0;
}

.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.landing-nav-link {
    color: var(--mut);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s ease;
}

.landing-nav-link:hover {
    color: var(--tx);
}

.landing-demo-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 224, 84, 0.12);
    border: 1px solid var(--g);
    color: var(--g);
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s ease;
}

.landing-demo-btn:hover {
    background: var(--g);
    color: #0A170E;
    box-shadow: 0 0 16px rgba(0, 224, 84, 0.3);
}

.landing-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    margin: 44px 0 54px;
}

.feature-pill-card {
    background: var(--pn);
    border: 1px solid var(--bd);
    border-radius: 12px;
    padding: 22px;
    transition: transform 0.2s ease, border-color 0.2s ease;
    text-align: left;
}

.feature-pill-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 224, 84, 0.4);
}

.feature-pill-icon {
    font-size: 28px;
    margin-bottom: 10px;
    display: inline-block;
}

.feature-pill-title {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 700;
    color: var(--tx);
    margin-bottom: 6px;
}

.feature-pill-desc {
    color: var(--mut);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

.landing-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 36px 20px 64px;
    position: relative;
    z-index: 1;
}

.landing-hero {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.landing-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 12px;
    width: 100%;
}

.landing-hero-logo {
    height: clamp(64px, 11vw, 92px);
    width: auto;
    max-width: min(440px, 85vw);
    object-fit: contain;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 4px 28px rgba(0, 224, 84, 0.35));
}

.splash-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 12px;
    width: 100%;
}

.splash-logo-img {
    height: 52px;
    width: auto;
    max-width: min(280px, 80vw);
    object-fit: contain;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 4px 18px rgba(0, 224, 84, 0.35));
}

.landing-logo {
    font-family: var(--serif);
    font-size: clamp(72px, 12vw, 116px);
    font-weight: 900;
    color: var(--g);
    line-height: 0.92;
    letter-spacing: -0.04em;
    margin-bottom: 4px;
    text-shadow: 0 4px 24px rgba(0, 224, 84, 0.25);
}

.landing-subtitle {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(24px, 4vw, 36px);
    color: var(--tx);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.landing-tagline {
    color: var(--mut);
    font-size: 16px;
    line-height: 1.65;
    margin-bottom: 32px;
}

.landing-dropzone {
    background: var(--pn);
    border: 2px dashed var(--bd);
    border-radius: 16px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.landing-dropzone:hover {
    border-color: rgba(0, 224, 84, 0.5);
    background: rgba(0, 224, 84, 0.02);
    transform: translateY(-2px);
}

.landing-dropzone.dragover {
    border-color: var(--g);
    background: rgba(0, 224, 84, 0.08);
    box-shadow: 0 0 35px rgba(0, 224, 84, 0.25);
    transform: scale(1.015);
}

.landing-dropzone.has-file {
    border-style: solid;
    border-color: var(--g);
    background: rgba(0, 224, 84, 0.04);
}

.landing-drop-icon {
    font-size: 52px;
    margin-bottom: 14px;
    display: inline-block;
    transition: transform 0.2s ease;
}

.landing-dropzone:hover .landing-drop-icon {
    transform: scale(1.1);
}

.landing-drop-title {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--tx);
    margin-bottom: 8px;
}

.landing-drop-desc {
    color: var(--mut);
    font-size: 14px;
    line-height: 1.5;
}

.landing-file-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 224, 84, 0.15);
    border: 1px solid var(--g);
    color: var(--g);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13.5px;
    font-weight: 600;
    margin-top: 12px;
}

.landing-privacy-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 22px auto 0;
    padding: 10px 18px;
    background: rgba(44, 52, 64, 0.25);
    border: 1px solid var(--bd);
    border-radius: 30px;
    max-width: 580px;
    font-size: 13px;
    color: var(--mut);
    line-height: 1.4;
}

.landing-privacy-banner span.icon {
    color: var(--g);
    font-size: 15px;
    flex-shrink: 0;
}

/* Teaser Preview Section */
.landing-teaser-section {
    margin-top: 54px;
    padding-top: 40px;
    border-top: 1px solid var(--bd);
}

.landing-teaser-header {
    text-align: center;
    margin-bottom: 28px;
}

.landing-teaser-badge {
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 800;
    color: var(--g);
    margin-bottom: 6px;
}

.landing-teaser-title {
    font-family: var(--serif);
    font-size: clamp(22px, 3.5vw, 28px);
    font-weight: 700;
    color: var(--tx);
    margin-bottom: 6px;
}

.landing-teaser-sub {
    color: var(--mut);
    font-size: 14px;
    max-width: 580px;
    margin: 0 auto;
}

.landing-teaser-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 18px;
}

.teaser-card {
    background: var(--pn);
    border: 1px solid var(--bd);
    border-radius: 12px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.teaser-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 224, 84, 0.4);
}

.teaser-card-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--g);
}

.teaser-director-preview {
    display: flex;
    align-items: center;
    gap: 14px;
}

.teaser-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1B2228, #0E1210);
    border: 2px solid var(--g);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 224, 84, 0.2);
}

.teaser-stars-row {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--g);
    font-size: 14px;
}

/* ==========================================================================
   Landing FAQ & Menu Enhancements
   ========================================================================== */

.landing-faq-section {
    max-width: 860px;
    margin: 54px auto 0;
    padding-top: 40px;
    border-top: 1px solid var(--bd);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--pn);
    border: 1px solid var(--bd);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.faq-item:hover {
    border-color: rgba(0, 224, 84, 0.35);
}

.faq-item summary {
    padding: 16px 20px;
    font-weight: 600;
    font-size: 15px;
    color: var(--tx);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 18px;
    color: var(--g);
    font-weight: 700;
    transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item[open] {
    border-color: rgba(0, 224, 84, 0.4);
    background: rgba(0, 224, 84, 0.02);
}

.faq-body {
    padding: 0 20px 18px;
    color: var(--mut);
    font-size: 14px;
    line-height: 1.6;
    border-top: 1px solid rgba(44, 52, 64, 0.5);
    padding-top: 14px;
}

@media (max-width: 860px) {
    .landing-nav-links {
        display: none;
    }
}

/* ==========================================================================
   Charts & Graphs
   ========================================================================== */

.chart-card {
    background: var(--pn);
    border: 1px solid var(--bd);
    border-radius: 10px;
    padding: 20px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.chart-title {
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 700;
    color: var(--tx);
    margin-bottom: 2px;
}

.chart-sub {
    color: var(--mut);
    font-size: 13px;
}

.chart-svg {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

.chart-hover-text {
    font-size: 13px;
    color: var(--g);
    font-weight: 600;
    min-height: 20px;
    margin-bottom: 4px;
}

.rank-item {
    display: grid;
    grid-template-columns: minmax(120px, 1.4fr) 3fr auto;
    gap: 12px;
    align-items: center;
    padding: 8px 0;
    font-size: 13.5px;
    border-bottom: 1px solid rgba(44, 52, 64, 0.4);
}

.rank-item:last-child {
    border-bottom: none;
}

.rank-bar-bg {
    background: var(--surface);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.rank-bar-fill {
    background: var(--g);
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease-out;
}

.rank-meta {
    color: var(--mut);
    font-size: 12.5px;
    white-space: nowrap;
}

/* ==========================================================================
   GraphEd Story & Slideshow Experience
   ========================================================================== */

.graphed-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 18px 16px 64px;
}

/* Preloader Screen */
.graphed-preloader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 520px;
    background: var(--pn);
    border: 1px solid var(--bd);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    padding: 40px 24px;
    text-align: center;
}

.graphed-preloader-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--serif);
    font-size: clamp(100px, 24vw, 260px);
    font-weight: 900;
    color: var(--g);
    opacity: 0.04;
    pointer-events: none;
    user-select: none;
    letter-spacing: -0.05em;
}

.graphed-spinner {
    width: 52px;
    height: 52px;
    border: 4px solid rgba(0, 224, 84, 0.15);
    border-top-color: var(--g);
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
    margin-bottom: 24px;
}

.graphed-preloader-title {
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 700;
    color: var(--tx);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.graphed-preloader-step {
    font-size: 15px;
    color: var(--g);
    font-weight: 600;
    min-height: 24px;
    animation: pulseStep 1.2s ease-in-out infinite alternate;
}

@keyframes pulseStep {
    from {
        opacity: 0.65;
        transform: translateY(0);
    }

    to {
        opacity: 1;
        transform: translateY(-2px);
    }
}

/* Story Controls Bar */
.graphed-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* Styled Select Elements (Year Selector & Filter Selects) */
.graphed-top-bar select,
select.filter-select {
    background: #202830 !important;
    color: #FFFFFF !important;
    border: 1px solid #2C3440 !important;
    border-radius: 8px !important;
    padding: 7px 34px 7px 14px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    outline: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2300E054' d='M6 8L0 0h12z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
    transition: border-color 0.15s ease, background-color 0.15s ease !important;
}

input.filter-select {
    background: #202830 !important;
    color: #FFFFFF !important;
    border: 1px solid #2C3440 !important;
    border-radius: 8px !important;
    padding: 7px 14px !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    outline: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
    transition: border-color 0.15s ease, background-color 0.15s ease !important;
}

.graphed-top-bar select:hover,
select.filter-select:hover,
select.filter-select:focus,
input.filter-select:hover,
input.filter-select:focus {
    border-color: #00E054 !important;
    background-color: #293440 !important;
}

.filter-select option,
.graphed-top-bar select option {
    background: #1B2228 !important;
    color: #FFFFFF !important;
}

/* ==========================================================================
   Stats Tab Filters & People Search
   ========================================================================== */

.stats-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stats-title-group h2 {
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 800;
    color: var(--tx);
    margin-bottom: 4px;
}

.stats-title-group p {
    color: var(--mut);
    font-size: 13.5px;
}

.stats-controls-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.stats-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 240px;
}

.stats-search-icon {
    position: absolute;
    left: 12px;
    color: var(--mut);
    font-size: 14px;
    pointer-events: none;
}

.stats-search-input {
    width: 100%;
    background: var(--surface);
    color: var(--tx);
    border: 1px solid var(--bd);
    border-radius: 8px;
    padding: 7px 32px 7px 34px;
    font-size: 13.5px;
    font-weight: 500;
    outline: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.stats-search-input:focus,
.stats-search-input:hover {
    border-color: var(--g);
    background: var(--surface-hover);
}

.stats-search-clear {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--mut);
    font-size: 14px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 50%;
    line-height: 1;
}

.stats-search-clear:hover {
    color: var(--tx);
}

.stats-scope-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 224, 84, 0.12);
    border: 1px solid rgba(0, 224, 84, 0.35);
    color: var(--g);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
}

.stats-switch-tab-hint {
    background: rgba(0, 224, 84, 0.08);
    border: 1px solid rgba(0, 224, 84, 0.25);
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13.5px;
    color: var(--tx);
    gap: 12px;
    flex-wrap: wrap;
}

.stats-switch-tab-btn {
    background: var(--g);
    color: #0A170E;
    border: none;
    font-weight: 700;
    font-size: 12.5px;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.stats-switch-tab-btn:hover {
    box-shadow: 0 0 12px rgba(0, 224, 84, 0.4);
    transform: translateY(-1px);
}

@media (max-width: 680px) {
    .stats-header-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .stats-controls-wrap {
        flex-direction: column;
        align-items: stretch;
    }
    .stats-search-wrap {
        width: 100%;
        min-width: 0;
    }
}

.graphed-year-heading {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.graphed-title-text {
    font-family: var(--serif);
    font-size: clamp(22px, 3.5vw, 30px);
    font-weight: 800;
    color: var(--tx);
    letter-spacing: -0.02em;
}

.graphed-year-badge {
    background: rgba(0, 224, 84, 0.12);
    border: 1px solid var(--g);
    color: var(--g);
    font-size: 13px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
}

/* Progress Bar at Top */
.graphed-progress-track {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    width: 100%;
}

.graphed-progress-segment {
    flex: 1;
    height: 5px;
    background: rgba(44, 52, 64, 0.8);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.graphed-progress-segment.past {
    background: var(--g);
}

.graphed-progress-segment.active {
    background: var(--g);
    box-shadow: 0 0 10px var(--g);
}

/* Story Slide Stage */
.graphed-slide-stage {
    background: var(--pn);
    border: 1px solid var(--bd);
    border-radius: 16px;
    min-height: 540px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 36px 32px 24px;
    box-shadow: var(--shadow-lg);
}

.graphed-slide-watermark {
    position: absolute;
    bottom: -15px;
    right: 15px;
    font-family: var(--serif);
    font-size: clamp(90px, 16vw, 180px);
    font-weight: 900;
    color: rgba(255, 255, 255, 0.02);
    pointer-events: none;
    user-select: none;
    line-height: 1;
}

/* Slide Backdrop */
.graphed-slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(28px) brightness(0.24);
    transform: scale(1.1);
    pointer-events: none;
    z-index: 0;
}

.graphed-slide-watermark {
    position: absolute;
    bottom: -15px;
    right: 15px;
    font-family: var(--serif);
    font-size: clamp(90px, 16vw, 180px);
    font-weight: 900;
    color: rgba(255, 255, 255, 0.03);
    pointer-events: none;
    user-select: none;
    line-height: 1;
    z-index: 1;
}

.graphed-slide-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ==========================================================================
   GraphEd Slide 1: Top Released Film of the Year
   ========================================================================== */

.graphed-badge-released {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 224, 84, 0.16);
    border: 1px solid var(--g);
    color: #00E054;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 20px;
    box-shadow: 0 0 16px rgba(0, 224, 84, 0.28);
}

.graphed-released-hero {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 32px;
    align-items: center;
}

@media (max-width: 680px) {
    .graphed-released-hero {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 20px;
    }
}

.graphed-released-poster {
    width: 180px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7), 0 0 24px rgba(0, 224, 84, 0.2);
    border: 1px solid rgba(0, 224, 84, 0.3);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.graphed-released-poster:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: var(--g);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.8), 0 0 32px rgba(0, 224, 84, 0.4);
}

.graphed-released-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.graphed-released-title {
    font-family: var(--serif);
    font-size: clamp(28px, 4.5vw, 44px);
    font-weight: 900;
    color: #FFFFFF;
    line-height: 1.1;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.graphed-released-meta {
    color: var(--mut);
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 12px;
}

.graphed-released-meta strong {
    color: var(--tx);
}

.graphed-released-stars-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.graphed-released-stars {
    font-size: 26px;
    color: var(--g);
    letter-spacing: 2px;
    text-shadow: 0 0 12px rgba(0, 224, 84, 0.4);
}

.graphed-released-rating-val {
    font-size: 16px;
    font-weight: 700;
    color: var(--g);
    background: rgba(0, 224, 84, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(0, 224, 84, 0.25);
}

.graphed-released-desc {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(15px, 2vw, 17px);
    color: #E0E8F0;
    line-height: 1.55;
    max-width: 580px;
    margin-bottom: 20px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.graphed-runnerups-wrap {
    margin-top: 10px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.graphed-runnerups-label {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--mut);
    margin-bottom: 10px;
}

.graphed-runnerups-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.graphed-runnerup-item {
    width: 60px;
    flex-shrink: 0;
    cursor: pointer;
    text-align: center;
    transition: transform 0.15s ease;
}

.graphed-runnerup-item:hover {
    transform: translateY(-3px);
}

.graphed-runnerup-item .film-poster-wrap {
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.graphed-runnerup-stars {
    font-size: 11px;
    font-weight: 700;
    color: var(--g);
    margin-top: 4px;
}

/* Hero Person Spotlight */
.graphed-hero-person-wrap {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.graphed-hero-portrait {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--g);
    box-shadow: 0 8px 32px rgba(0, 224, 84, 0.35);
    margin: 0 auto 18px;
    display: block;
}

.graphed-hero-fallback-portrait {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--g);
    background: linear-gradient(135deg, #1B2228, #14181C);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    margin: 0 auto 18px;
    box-shadow: 0 8px 32px rgba(0, 224, 84, 0.25);
}

/* Slide 0 Intro */
.graphed-intro-tag {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--g);
    font-weight: 800;
    margin-bottom: 8px;
}

.graphed-intro-title {
    font-family: var(--serif);
    font-size: clamp(32px, 6vw, 54px);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.graphed-intro-sub {
    color: var(--mut);
    font-size: 17px;
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.5;
}

.graphed-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px;
    max-width: 780px;
    margin: 0 auto 22px;
}

.graphed-intro-streak {
    color: var(--mut);
    font-size: 13.5px;
}

/* Slides 2 & 3: Hero Persons */
.graphed-hero-name {
    font-family: var(--serif);
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 800;
    margin-bottom: 4px;
}

.graphed-hero-stats {
    color: var(--g);
    font-weight: 700;
    font-size: 15px;
}

.graphed-hero-thumbs {
    display: flex;
    justify-content: center;
    gap: 8px;
    overflow-x: auto;
    padding: 6px 0;
    margin-top: 10px;
}

.graphed-hero-thumb-item {
    width: 64px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.graphed-hero-thumb-item:hover {
    transform: translateY(-3px);
}

.graphed-hero-thumb-item .film-poster-wrap {
    border-radius: 4px;
}

.graphed-editorial-phrase {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(17px, 2.8vw, 24px);
    color: var(--tx);
    line-height: 1.45;
    margin: 12px 0 16px;
}

/* Slide 4: Dual Directors & Cast */
.graphed-dual-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.graphed-dual-card {
    background: var(--surface);
    padding: 18px;
    border-radius: 12px;
}

.graphed-dual-title {
    font-family: var(--serif);
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--tx);
}

.graphed-dual-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.graphed-person-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.graphed-person-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #14181C;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--bd);
    font-size: 18px;
}

.graphed-person-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.graphed-person-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.graphed-person-sub {
    color: var(--mut);
    font-size: 12px;
}

/* Slide 5: Comparison */
.graphed-compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.graphed-compare-card {
    background: var(--surface);
    padding: 20px;
    text-align: center;
    border-radius: 12px;
}

.graphed-compare-tag {
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.graphed-compare-poster-wrap {
    width: 120px;
    margin: 0 auto 12px;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.graphed-compare-poster-wrap:hover {
    transform: translateY(-3px);
}

.graphed-compare-title {
    font-weight: 700;
    font-size: 17px;
    margin-bottom: 4px;
}

.graphed-compare-date {
    color: var(--mut);
    font-size: 13px;
    margin-bottom: 6px;
}

.graphed-compare-stars {
    color: var(--g);
    font-size: 16px;
}

/* Slide 6: Extremes */
.graphed-extremes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.graphed-extreme-card {
    background: var(--surface);
    padding: 20px;
    border-radius: 12px;
}

.graphed-extreme-tag {
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.graphed-extreme-body {
    display: flex;
    gap: 14px;
    align-items: center;
}

.graphed-extreme-poster {
    width: 70px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.graphed-extreme-poster:hover {
    transform: translateY(-3px);
}

.graphed-extreme-name {
    font-weight: 700;
    font-size: 16px;
}

.graphed-extreme-meta {
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
}

/* Slide 7: Habits */
.graphed-habits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    max-width: 820px;
    margin: 0 auto;
}

.graphed-habit-card {
    background: var(--surface);
    text-align: left;
    padding: 18px;
    border-radius: 12px;
}

.graphed-habit-lbl {
    color: var(--mut);
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.graphed-habit-val {
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 700;
    color: var(--tx);
}

.graphed-habit-sub {
    color: var(--mut);
    font-size: 13px;
}

/* Slide 8: Gallery */
.graphed-gallery-title {
    font-family: var(--serif);
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 800;
    margin-bottom: 20px;
}

.graphed-gallery-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    max-width: 780px;
    margin: 0 auto 28px;
}

.graphed-gallery-item {
    width: 100px;
    cursor: pointer;
    text-align: center;
    transition: transform 0.15s ease;
}

.graphed-gallery-item:hover {
    transform: translateY(-3px);
}

.graphed-gallery-stars {
    font-size: 12px;
    color: var(--g);
    margin-top: 5px;
    letter-spacing: -0.5px;
}

/* Story Bottom Nav Controls */
.graphed-controls-bar {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(44, 52, 64, 0.5);
}

.graphed-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--bd);
    color: var(--tx);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.graphed-nav-btn:hover:not(:disabled) {
    border-color: var(--g);
    color: var(--g);
}

.graphed-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.graphed-slide-counter {
    color: var(--mut);
    font-size: 13px;
    font-weight: 600;
}

/* ==========================================================================
   Credits & Footer
   ========================================================================== */

.credits-wrapper {
    max-width: 780px;
    margin: 32px auto 60px;
}

.credits-block {
    background: var(--pn);
    border: 1px solid var(--bd);
    border-radius: 10px;
    padding: 28px;
    margin-bottom: 20px;
}

.credits-block-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.credits-block-icon {
    font-size: 28px;
    color: var(--g);
}

.credits-block h3 {
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 700;
    color: var(--tx);
}

.credits-block p {
    color: var(--mut);
    font-size: 14.5px;
    line-height: 1.65;
    margin-bottom: 14px;
}

.credits-badge-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--bd);
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--tx);
    transition: border-color 0.15s, background 0.15s;
}

.credits-badge-link:hover {
    border-color: var(--g);
    background: var(--surface-hover);
}

.disclaimer-note {
    font-size: 12px;
    color: var(--dim);
    margin-top: 10px;
    line-height: 1.5;
}

.site-footer {
    border-top: 1px solid var(--bd);
    padding: 38px 20px 50px;
    margin-top: auto;
    text-align: center;
    color: var(--mut);
    font-size: 13px;
    background: var(--pn);
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--mut);
    font-weight: 500;
}

.footer-nav a:hover {
    color: var(--g);
}

/* ==========================================================================
   Stats Subtabs Bar (Horizontally scrollable on mobile)
   ========================================================================== */

.stats-subtabs-bar {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--bd);
    padding-bottom: 12px;
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
}

.stats-subtabs-bar::-webkit-scrollbar {
    display: none;
}

.stats-subtabs-bar .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

/* ==========================================================================
   Mobile Bottom Navigation Bar
   ========================================================================== */

.mobile-nav-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(18, 22, 26, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--bd);
    z-index: 60;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.mobile-nav-inner {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: space-around;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 0 4px;
}

.mobile-nav-inner::-webkit-scrollbar {
    display: none;
}

.mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: none;
    border: none;
    color: var(--mut);
    font-size: 10px;
    padding: 4px 6px;
    cursor: pointer;
    font-weight: 500;
    flex-shrink: 0;
    min-width: 44px;
    min-height: 44px;
    transition: color 0.15s ease, transform 0.1s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-btn:active {
    transform: scale(0.92);
}

.mobile-nav-btn .icon {
    font-size: 18px;
    line-height: 1;
}

.mobile-nav-btn.active {
    color: var(--g);
    font-weight: 700;
}

/* ==========================================================================
   Responsive Breakpoints & Mobile Optimization
   ========================================================================== */

@media (max-width: 960px) {
    .hero-dashboard-inner {
        grid-template-columns: 1fr;
    }

    .hero-side-poster-fan {
        display: none;
    }
}

@media (max-width: 860px) {
    .landing-nav-links {
        display: none;
    }

    .header-nav {
        display: none;
    }

    .mobile-nav-bar {
        display: block;
    }

    body {
        padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 768px) {
    /* Page Wrappers & Spacing */
    .wrap {
        padding: 0 16px;
    }

    .header-inner {
        padding: 0 16px;
        height: 52px;
    }

    .brand-logo-img {
        height: 28px;
    }

    .landing-container {
        padding: 24px 16px 60px;
    }

    .landing-tagline {
        font-size: 14.5px;
    }

    .landing-dropzone {
        padding: 36px 18px;
        border-radius: 12px;
    }

    .landing-drop-icon {
        font-size: 42px;
        margin-bottom: 8px;
    }

    .landing-drop-title {
        font-size: 18px;
    }

    .landing-drop-desc {
        font-size: 13px;
    }

    .landing-teaser-grid {
        grid-template-columns: 1fr;
    }

    .landing-features-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Posters & Shelf Grids */
    .film-card {
        width: 112px;
        flex: 0 0 112px;
    }

    .poster-shelf {
        gap: 10px;
        padding-top: 14px;
        padding-bottom: 12px;
    }

    .poster-grid {
        grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
        gap: 10px;
    }

    .people-grid {
        grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
        gap: 10px;
    }

    .person-photo-circle {
        width: 68px;
        height: 68px;
        margin-bottom: 8px;
    }

    .person-card {
        padding: 12px 8px;
    }

    .film-title-text {
        font-size: 11.5px;
        min-height: 28px;
    }

    /* Film & Person Modals */
    .film-detail-modal,
    .person-detail-modal {
        margin: 12px;
        max-height: 92vh;
        border-radius: 12px;
    }

    .modal-backdrop-header {
        height: 160px;
    }

    .modal-content-grid {
        grid-template-columns: 105px minmax(0, 1fr);
        gap: 14px;
        padding: 0 16px 20px;
        margin-top: -65px;
    }

    .modal-poster-col {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .modal-poster-box {
        width: 105px;
        border-radius: 6px;
    }

    .modal-film-title {
        font-size: 21px;
        line-height: 1.2;
    }

    .modal-meta-row {
        font-size: 12.5px;
        gap: 6px;
        margin-bottom: 10px;
    }

    .modal-user-rating {
        font-size: 15px;
    }

    .modal-overview-text {
        font-size: 13.5px;
        line-height: 1.5;
    }

    .modal-close-btn {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .person-header-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px 16px;
        gap: 14px;
    }

    .person-portrait-big {
        width: 84px;
        height: 84px;
    }

    /* Statistics & KPIs */
    .stat-card {
        padding: 14px 12px;
    }

    .stat-value {
        font-size: 26px;
    }

    .stat-label {
        font-size: 11.5px;
    }

    /* GraphEd Mobile Overhaul */
    .graphed-container {
        padding: 10px 10px 84px;
        max-width: 100%;
    }

    .graphed-top-bar {
        margin-bottom: 10px;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .graphed-title-text {
        font-size: 20px;
    }

    .graphed-year-badge {
        font-size: 11px;
        padding: 2px 8px;
    }

    .graphed-progress-track {
        gap: 4px;
        margin-bottom: 12px;
    }

    .graphed-progress-segment {
        height: 4px;
        border-radius: 2px;
    }

    .graphed-slide-stage {
        min-height: auto;
        min-height: 480px;
        overflow-y: visible;
        padding: 20px 14px 16px;
        border-radius: 14px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 14px;
    }

    .graphed-slide-content {
        justify-content: flex-start;
        min-height: 0;
        flex: 1 1 auto;
    }

    /* Slide 0 Intro Mobile */
    .graphed-intro-tag {
        font-size: 11px;
        margin-bottom: 6px;
    }

    .graphed-intro-title {
        font-size: 26px;
        margin-bottom: 10px;
    }

    .graphed-intro-sub {
        font-size: 13px;
        margin-bottom: 18px;
        line-height: 1.4;
    }

    .graphed-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-bottom: 14px;
    }

    .graphed-stats-grid .stat-card {
        padding: 10px 8px;
    }

    .graphed-stats-grid .stat-value {
        font-size: 22px;
    }

    .graphed-stats-grid .stat-label {
        font-size: 10.5px;
    }

    .graphed-intro-streak {
        font-size: 11.5px;
        line-height: 1.35;
    }

    /* Slide 1 Film of Year Mobile */
    .graphed-badge-released {
        font-size: 11px;
        padding: 4px 12px;
    }

    .graphed-released-hero {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 14px;
    }

    .graphed-released-poster {
        width: 120px;
    }

    .graphed-released-title {
        font-size: 22px;
        margin-bottom: 6px;
    }

    .graphed-released-meta {
        font-size: 12.5px;
        margin-bottom: 8px;
    }

    .graphed-released-stars-row {
        justify-content: center;
        gap: 8px;
        margin-bottom: 10px;
    }

    .graphed-released-stars {
        font-size: 20px;
        letter-spacing: 1px;
    }

    .graphed-released-rating-val {
        font-size: 13px;
        padding: 1px 6px;
    }

    .graphed-released-desc {
        font-size: 13.5px;
        line-height: 1.45;
        margin-bottom: 14px;
    }

    .graphed-runnerups-wrap {
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .graphed-runnerups-label {
        font-size: 10.5px;
        margin-bottom: 8px;
    }

    .graphed-runnerups-row {
        justify-content: center;
        gap: 8px;
    }

    .graphed-runnerup-item {
        width: 48px;
    }

    /* Slides 2 & 3 Director/Actor Mobile */
    .graphed-hero-portrait,
    .graphed-hero-fallback-portrait {
        width: 90px;
        height: 90px;
        border-width: 3px;
        margin-bottom: 10px;
        font-size: 36px;
    }

    .graphed-hero-name {
        font-size: 22px;
        margin-bottom: 2px;
    }

    .graphed-hero-stats {
        font-size: 13px;
    }

    .graphed-editorial-phrase {
        font-size: 14px;
        margin: 8px 0 10px;
        line-height: 1.4;
    }

    .graphed-hero-thumbs {
        gap: 6px;
        margin-top: 6px;
    }

    .graphed-hero-thumb-item {
        width: 50px;
    }

    /* Slide 4 Dual Directors/Cast Mobile */
    .graphed-dual-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .graphed-dual-card {
        padding: 12px 10px;
    }

    .graphed-dual-title {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .graphed-dual-list {
        gap: 6px;
    }

    .graphed-person-row {
        gap: 8px;
    }

    .graphed-person-circle {
        width: 32px;
        height: 32px;
        font-size: 15px;
    }

    .graphed-person-name {
        font-size: 13px;
    }

    .graphed-person-sub {
        font-size: 11px;
    }

    /* Slide 5 Started vs Ended Mobile (Side-by-side comparison!) */
    .graphed-compare-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .graphed-compare-card {
        padding: 10px 6px;
    }

    .graphed-compare-tag {
        font-size: 10.5px;
        margin-bottom: 6px;
    }

    .graphed-compare-poster-wrap {
        width: 80px;
        margin: 0 auto 6px;
    }

    .graphed-compare-title {
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .graphed-compare-date {
        font-size: 10.5px;
        margin-bottom: 3px;
    }

    .graphed-compare-stars {
        font-size: 13px;
    }

    /* Slide 6 Extremes Mobile */
    .graphed-extremes-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .graphed-extreme-card {
        padding: 12px 10px;
    }

    .graphed-extreme-tag {
        font-size: 11px;
        margin-bottom: 6px;
    }

    .graphed-extreme-body {
        gap: 10px;
    }

    .graphed-extreme-poster {
        width: 50px;
    }

    .graphed-extreme-name {
        font-size: 14px;
    }

    .graphed-extreme-meta {
        font-size: 12px;
    }

    /* Slide 7 Habits Mobile (Clean 2x2 grid!) */
    .graphed-habits-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .graphed-habit-card {
        padding: 10px 8px;
    }

    .graphed-habit-lbl {
        font-size: 10.5px;
        margin-bottom: 4px;
    }

    .graphed-habit-val {
        font-size: 18px;
    }

    .graphed-habit-sub {
        font-size: 11px;
    }

    /* Slide 8 Masterpieces Mobile */
    .graphed-gallery-title {
        font-size: 20px;
        margin-bottom: 14px;
    }

    .graphed-gallery-row {
        gap: 8px;
        margin-bottom: 18px;
    }

    .graphed-gallery-item {
        width: 68px;
    }

    .graphed-gallery-stars {
        font-size: 10px;
    }

    /* Controls Bar Mobile */
    .graphed-controls-bar {
        margin-top: 14px;
        padding-top: 12px;
    }

    .graphed-nav-btn {
        padding: 9px 16px;
        font-size: 13.5px;
        font-weight: 700;
        border-radius: 8px;
    }

    .graphed-slide-counter {
        font-size: 12.5px;
        font-weight: 700;
    }

    /* Card & Table scroll */
    .card {
        padding: 16px 14px;
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    .wrap {
        padding: 0 12px;
    }

    /* Letterboxd Mobile Iconic 3-Column Poster Grid */
    .poster-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .people-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .person-photo-circle {
        width: 58px;
        height: 58px;
    }

    .person-name {
        font-size: 11px;
    }

    .person-count {
        font-size: 10px;
    }

    /* Modal compact view */
    .modal-backdrop-header {
        height: 135px;
    }

    .modal-content-grid {
        grid-template-columns: 90px minmax(0, 1fr);
        gap: 10px;
        padding: 0 12px 16px;
        margin-top: -50px;
    }

    .modal-poster-box {
        width: 90px;
    }

    .modal-film-title {
        font-size: 18px;
    }

    .modal-meta-row {
        font-size: 11.5px;
    }

    .modal-pills {
        gap: 4px;
    }

    .modal-pill {
        font-size: 11px;
        padding: 2px 7px;
    }

    /* Filter pills full width */
    .media-filter-pills {
        width: 100%;
        display: flex;
    }

    .media-filter-btn {
        flex: 1;
        text-align: center;
        font-size: 11.5px;
        padding: 6px 4px;
    }

    /* Mobile Nav Compact */
    .mobile-nav-bar {
        height: 58px;
    }

    .mobile-nav-btn {
        font-size: 9px;
        padding: 2px 2px;
        min-width: 40px;
    }

    .mobile-nav-btn .icon {
        font-size: 17px;
    }
}