/* deploy/frontend/styles.css */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* === Nav === */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: rgba(0,0,0,0.8);
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
}
.nav-brand { font-size: 1.5rem; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 0.5rem; }
.nav-logo { height: 50px; width: auto; }
.nav-links a { margin-left: 1.5rem; color: #ccc; }
.nav-links a:hover { color: #fff; }

/* === Hero (Landing) === */
.hero {
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 2rem;
    text-align: center;
}
.hero h1 { font-size: 3rem; margin-bottom: 0.5rem; color: #fff; letter-spacing: -0.02em; }
.tagline { font-size: 1.25rem; color: #aaa; margin-bottom: 2rem; max-width: 480px; line-height: 1.5; }

/* === Search === */
.search-container { position: relative; width: 100%; max-width: 500px; }
.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #333;
    border-radius: 8px;
    background: #1a1a1a;
    color: #fff;
    outline: none;
}
.search-input:focus { border-color: #4a90d9; }
.search-results {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
}
.search-result {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
}
.search-result:hover { background: #252525; }
.search-result img { width: 40px; height: 60px; object-fit: cover; border-radius: 4px; }
.search-no-results { color: #888; padding: 1rem; }

/* === Interactive Demo Graph === */
.demo-section {
    padding: 1rem 2rem 2.5rem;
    text-align: center;
}
.demo-heading { color: #fff; font-size: 1.5rem; margin-bottom: 0.3rem; }
.demo-subtitle { color: #888; font-size: 0.95rem; margin-bottom: 1.5rem; }
.demo-graph-wrap {
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    overflow: hidden;
    background: #0d0d14;
    position: relative;
}
#demo-cy {
    width: 100%;
    height: 350px;
    cursor: pointer;
    text-align: left;
}
.demo-cta { margin-top: 1.25rem; }
.btn-explore {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: transparent;
    color: #f5c518;
    border: 1px solid #f5c518;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: background 0.15s, color 0.15s;
}
.btn-explore:hover { background: #f5c518; color: #0a0a0a; }

/* === Explore by Category === */
.categories-section {
    padding: 2rem;
    text-align: center;
}
.categories-section h2 { color: #fff; margin-bottom: 1.25rem; }
.category-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}
.pill {
    padding: 0.5rem 1.25rem;
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.12);
    color: #ccc;
    background: rgba(255,255,255,0.04);
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
    cursor: pointer;
}
.pill:hover { transform: translateY(-2px); }
.pill-scifi:hover  { background: #1a3a5c; border-color: #4a90d9; color: #8ac4ff; }
.pill-crime:hover  { background: #3a1a1a; border-color: #d94a4a; color: #ff8a8a; }
.pill-directors:hover { background: #3a2e1a; border-color: #f5c518; color: #f5c518; }
.pill-oscar:hover  { background: #2e2e1a; border-color: #d4af37; color: #ffd700; }
.pill-cult:hover   { background: #2a1a3a; border-color: #9b59b6; color: #c39bd3; }
.pill-horror:hover { background: #1a2a1a; border-color: #27ae60; color: #58d68d; }

/* === Featured Grid (upgraded) === */
.featured { padding: 2rem; max-width: 1200px; margin: 0 auto; }
.featured-header { margin-bottom: 1.5rem; }
.featured h2 { margin-bottom: 0.4rem; color: #fff; }
.featured-explainer { color: #888; font-size: 0.9rem; max-width: 600px; line-height: 1.5; }
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}
.card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
}
.card:hover { transform: scale(1.05); }
.card:hover .card-stats { opacity: 1; transform: translateY(0); }
.card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.card-placeholder {
    width: 100%;
    aspect-ratio: 2/3;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-label {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 0.5rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    font-size: 0.85rem;
    color: #fff;
    transition: transform 0.2s;
}
.card:hover .card-label { transform: translateY(-2.5rem); }
.card-stats {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.4rem 0.5rem;
    background: rgba(0,0,0,0.92);
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.2s, transform 0.2s;
    font-size: 0.75rem;
}
.stat-influenced { color: #4a90d9; }
.stat-inspired { color: #ff6b35; }

/* === Daily Rabbit Hole === */
.rabbit-hole {
    padding: 2.5rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.rabbit-hole h2 { color: #fff; margin-bottom: 0.3rem; }
.rabbit-subtitle { color: #888; font-size: 0.9rem; margin-bottom: 2rem; }
.rabbit-path {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}
.rabbit-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    max-width: 150px;
}
.rabbit-step img {
    width: 100px;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
}
.rabbit-poster-placeholder {
    width: 100px;
    height: 150px;
    background: #1a1a2e;
    border-radius: 6px;
}
.rabbit-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e0e0e0;
    text-align: center;
}
.rabbit-desc {
    font-size: 0.7rem;
    color: #888;
    text-align: center;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.rabbit-arrow {
    font-size: 1.5rem;
    color: #f5c518;
    flex-shrink: 0;
}
.rabbit-cta { margin-top: 1.5rem; }

/* === Footer === */
.site-footer {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
}
.footer-inner { max-width: 600px; margin: 0 auto; }
.footer-links { margin-bottom: 0.75rem; }
.footer-links a { color: #888; font-size: 0.85rem; transition: color 0.15s; }
.footer-links a:hover { color: #fff; }
.footer-sep { color: #444; margin: 0 0.75rem; }
.footer-copy { color: #555; font-size: 0.8rem; }

/* === Movie Detail Page === */
.movie-hero {
    min-height: 80vh;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    position: relative;
}
.movie-hero-overlay {
    min-height: 80vh;
    background: linear-gradient(to right, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.7) 40%, rgba(0,0,0,0.3) 100%);
    padding: 6rem 2rem 3rem;
    display: flex;
    align-items: center;
}
.movie-hero-content {
    max-width: 700px;
}
.movie-title { font-size: 2.5rem; color: #fff; margin-bottom: 0.75rem; line-height: 1.15; }
.movie-meta { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.genre-pill {
    padding: 0.25rem 0.75rem;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Quick stats */
.movie-stats {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.stat {
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
}
.stat-out { color: #4a90d9; }
.stat-in  { color: #ff6b35; }

/* Overview with read-more */
.movie-overview-wrap { margin-bottom: 1.5rem; max-width: 600px; }
.movie-overview {
    font-size: 1rem;
    line-height: 1.6;
    color: #ccc;
    max-height: 4.8em;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.movie-overview.expanded { max-height: 50em; }
.read-more-btn {
    background: none;
    border: none;
    color: #4a90d9;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.25rem 0;
    margin-top: 0.25rem;
}
.read-more-btn:hover { color: #6ab0ff; }

/* Action buttons */
.movie-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-graph {
    background: #f5c518;
    color: #0a0a0a;
    border: 1px solid #f5c518;
}
.btn-graph:hover { background: #ffd84d; border-color: #ffd84d; }
.btn-path {
    background: transparent;
    color: #4a90d9;
    border: 1px solid #4a90d9;
}
.btn-path:hover { background: #4a90d9; color: #fff; }

/* === Connections Section === */
.connections {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}
.connections h2 { color: #fff; margin-bottom: 1.5rem; font-size: 1.5rem; }
.connection-group { margin-bottom: 2rem; }
.connection-label {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.connection-label-in  { color: #ff6b35; }
.connection-label-out { color: #4a90d9; }

/* === Carousels === */
.carousel { position: relative; display: flex; align-items: center; }
.carousel-track {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 0.5rem 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-card {
    flex: 0 0 150px;
    scroll-snap-align: start;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
}
.carousel-card:hover { transform: scale(1.05); }
.carousel-card img { width: 150px; height: 225px; object-fit: cover; }
.carousel-card .card-placeholder { width: 150px; height: 225px; background: #222; }
.carousel-card .card-label {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 0.4rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    font-size: 0.75rem;
    color: #fff;
}
.carousel-card .card-label sup { color: #4a90d9; margin-left: 2px; }
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 1rem;
}
.carousel-prev { left: -16px; }
.carousel-next { right: -16px; }

/* === Featured Path (movie detail) === */
.featured-path {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.featured-path h2 { color: #fff; margin-bottom: 0.3rem; }
.featured-path-subtitle { color: #888; font-size: 0.95rem; margin-bottom: 1.5rem; }

/* === Sources / References === */
.references {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.references h2 { margin-bottom: 1rem; color: #fff; }
.references h3 { margin: 1.5rem 0 0.75rem; color: #ccc; }
.references ol { padding-left: 1.5rem; }
.references li.citation {
    margin-bottom: 1.25rem;
    line-height: 1.6;
    color: #aaa;
}
.references li strong { color: #e0e0e0; display: block; margin-bottom: 0.2rem; }
.citation-desc {
    display: block;
    font-style: italic;
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}
.citation-source {
    display: block;
    font-size: 0.85rem;
    color: #888;
}
.citation-source a {
    color: #4a90d9;
    font-weight: 500;
}
.citation-source a:hover { text-decoration: underline; }
.citation-author {
    color: #bbb;
}
.citation-author::before { content: ", "; color: #666; }
.citation-pub {
    color: #888;
    font-style: italic;
}
.citation-pub::before { content: ", "; color: #666; }

/* === Graph Page === */
.graph-container { position: relative; height: calc(100vh - 60px); margin-top: 60px; overflow: hidden; }
#cy { width: 100%; height: 100%; background: #0a0a0a; }

/* ── Landing state ── */
.graph-landing {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
    z-index: 20;
    padding: 2rem;
    text-align: center;
}
.graph-landing h1 { font-size: 2.4rem; color: #fff; margin-bottom: 0.5rem; }
.graph-subtitle { color: #888; font-size: 1.1rem; margin-bottom: 2rem; }
.chaos-btn {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    padding: 0.6rem 1.5rem;
    background: transparent;
    color: #f5c518;
    border: 1px solid #f5c518;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: background 0.15s, color 0.15s;
}
.chaos-btn:hover { background: #f5c518; color: #0a0a0a; }

/* ── Search (shared) ── */
.graph-search-container { position: relative; }
.landing-search { width: 100%; max-width: 480px; }
.graph-search-input {
    width: 100%;
    padding: 0.65rem 0.9rem;
    background: #141414;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
}
.graph-search-input:focus { border-color: #4a90d9; }
.search-dropdown {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-top: none;
    border-radius: 0 0 6px 6px;
    z-index: 50;
    max-height: 340px;
    overflow-y: auto;
    display: none;
}
.dd-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    color: #ddd;
    font-size: 0.9rem;
}
.dd-item:hover { background: #252525; }
.dd-item img { width: 36px; height: 54px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.dd-no-poster { width: 36px; height: 54px; background: #222; border-radius: 3px; flex-shrink: 0; }
.dd-empty { color: #666; cursor: default; }

/* ── Suggested movies grid ── */
.suggested-section { margin-top: 2.5rem; width: 100%; max-width: 800px; }
.suggested-section h3 { color: #888; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }
.suggested-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 1rem;
}
.suggest-card {
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
    background: #141414;
}
.suggest-card:hover { transform: scale(1.05); box-shadow: 0 4px 20px rgba(0,0,0,0.6); }
.suggest-card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; }
.suggest-placeholder {
    width: 100%; aspect-ratio: 2/3; background: #1a1a2e;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; color: #666; padding: 0.5rem; text-align: center;
}
.suggest-label {
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Top bar (graph mode) ── */
.graph-topbar {
    position: absolute;
    top: 1.5rem; left: 0; right: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    background: rgba(10,10,10,0.92);
    backdrop-filter: blur(8px);
    z-index: 15;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.center-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f5c518;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 0 1 auto;
}
.topbar-search { width: 200px; margin-left: auto; }
.topbar-search .graph-search-input { padding: 0.4rem 0.7rem; font-size: 0.85rem; }
.graph-buttons { display: flex; gap: 0.4rem; flex-shrink: 0; }
.graph-btn {
    padding: 0.35rem 0.65rem;
    background: rgba(255,255,255,0.06);
    color: #ccc;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
}
.graph-btn:hover { background: rgba(255,255,255,0.12); }

/* ── Legend ── */
.graph-legend {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    background: rgba(10,10,10,0.88);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    z-index: 15;
    font-size: 0.8rem;
}
.legend-item { display: flex; align-items: center; gap: 0.5rem; color: #ccc; margin-bottom: 0.35rem; }
.legend-line {
    display: inline-block;
    width: 28px;
    height: 3px;
    border-radius: 2px;
}
.legend-line.outgoing { background: #5a9fe6; }
.legend-line.incoming { background: #ff8044; }
.legend-divider { border-top: 1px solid rgba(255,255,255,0.08); margin: 0.5rem 0; }
.legend-hint { color: #666; font-size: 0.72rem; line-height: 1.4; }

/* ── Edge tooltip ── */
.edge-tooltip {
    display: none;
    position: fixed;
    background: rgba(15,15,15,0.95);
    border: 1px solid rgba(255,255,255,0.15);
    color: #ddd;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    max-width: 300px;
    z-index: 100;
    pointer-events: none;
    line-height: 1.4;
}

/* === Nav User Menu === */
.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}
.nav-username { color: #ccc; font-size: 0.9rem; }
.nav-queue-link { color: #f5c518; font-size: 0.85rem; }
.nav-queue-link:hover { color: #ffd84d; }
.nav-logout-form { display: inline; }
.nav-logout-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
}
.nav-logout-btn:hover { color: #fff; }
.nav-user a { color: #ccc; font-size: 0.9rem; }
.nav-user a:hover { color: #fff; }

/* === Auth Pages === */
.auth-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 3rem;
}
.auth-card {
    width: 100%;
    max-width: 400px;
    background: #141414;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 2rem;
}
.auth-card h1 { color: #fff; margin-bottom: 0.5rem; font-size: 1.5rem; }
.auth-subtitle { color: #888; font-size: 0.9rem; margin-bottom: 1.5rem; }
.auth-status { text-align: center; padding: 0.5rem; font-size: 0.9rem; color: #888; }
.auth-error {
    background: rgba(220,38,38,0.15);
    border: 1px solid rgba(220,38,38,0.3);
    color: #f87171;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
/* FirebaseUI dark-theme overrides */
.auth-card .firebaseui-container { background: transparent; box-shadow: none; }
.auth-card .firebaseui-card-content { padding: 0; }
.auth-card .firebaseui-card-header { padding: 0; display: none; }
.auth-card .firebaseui-card-actions { padding: 0; }
.auth-card .firebaseui-idp-button { border-radius: 6px; max-width: 100%; }
.auth-card .mdl-button--raised.mdl-button--colored { background: #f5c518; color: #0a0a0a; }
.auth-card .firebaseui-label { color: #aaa; }
.auth-card .firebaseui-input, .auth-card .firebaseui-input-invalid { color: #fff; border-color: #333; }
.auth-card .firebaseui-textfield.mdl-textfield .firebaseui-input { border-bottom-color: #333; }
.auth-card .mdl-textfield--floating-label.is-focused .mdl-textfield__label { color: #4a90d9; }
.auth-card .firebaseui-textfield.mdl-textfield .firebaseui-input:focus { border-bottom-color: #4a90d9; }
.auth-form { display: flex; flex-direction: column; gap: 0.5rem; }
.auth-form label { color: #aaa; font-size: 0.85rem; margin-top: 0.5rem; }
.auth-form input {
    padding: 0.6rem 0.8rem;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
}
.auth-form input:focus { border-color: #4a90d9; }
.btn-auth {
    margin-top: 1rem;
    padding: 0.65rem;
    background: #f5c518;
    color: #0a0a0a;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-auth:hover { background: #ffd84d; }
.auth-switch { margin-top: 1rem; text-align: center; color: #888; font-size: 0.85rem; }
.auth-switch a { color: #4a90d9; }
.auth-switch a:hover { text-decoration: underline; }

/* === Contribute Panel === */
.contribute-panel {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.contribute-panel h3 { color: #fff; margin-bottom: 1rem; }
.contribute-form { display: flex; flex-direction: column; gap: 0.5rem; max-width: 600px; }
.contribute-form label { color: #aaa; font-size: 0.85rem; margin-top: 0.25rem; }
.contribute-form input,
.contribute-form textarea {
    padding: 0.5rem 0.75rem;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    font-family: inherit;
}
.contribute-form input:focus,
.contribute-form textarea:focus { border-color: #4a90d9; }
.contribute-direction {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}
.direction-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #ccc;
    font-size: 0.9rem;
    cursor: pointer;
}
.contribute-search { position: relative; }
.contribute-search .search-results { position: absolute; top: 100%; left: 0; right: 0; z-index: 50; }
.contribute-selected {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(74,144,217,0.1);
    border: 1px solid rgba(74,144,217,0.3);
    border-radius: 6px;
    color: #4a90d9;
    font-size: 0.9rem;
}
.btn-clear-movie {
    background: none;
    border: none;
    color: #888;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: auto;
}
.contribute-select {
    padding: 0.5rem 0.75rem;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
}
.contribute-select:focus { border-color: #4a90d9; }
.contribute-year { max-width: 120px; }
.required { color: #f87171; }
.optional-fields {
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 0.25rem;
}
.optional-fields summary {
    color: #888;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
}
.optional-fields summary:hover { color: #ccc; }
.optional-fields label { margin-top: 0.5rem; }
.contribute-msg { padding: 0.75rem; border-radius: 6px; font-size: 0.9rem; margin-top: 0.5rem; }
.contribute-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #4ade80; }
.contribute-error { background: rgba(220,38,38,0.1); border: 1px solid rgba(220,38,38,0.3); color: #f87171; }
.btn-contribute {
    background: transparent;
    color: #4ade80;
    border: 1px solid #4ade80;
}
.btn-contribute:hover { background: #4ade80; color: #0a0a0a; }

/* === Inline Edit (Admin) === */
.inf-display { position: relative; }
.edit-icon {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    margin-left: 0.5rem;
    transition: color 0.15s, background 0.15s;
}
.edit-icon:hover { color: #f5c518; background: rgba(255,255,255,0.06); }
.inf-edit-form {
    background: #141414;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.inf-edit-row { display: flex; flex-direction: column; gap: 0.2rem; }
.inf-edit-row label { color: #888; font-size: 0.75rem; }
.inf-edit-row input,
.inf-edit-row textarea {
    padding: 0.4rem 0.6rem;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    font-family: inherit;
}
.inf-edit-row input:focus,
.inf-edit-row textarea:focus { border-color: #4a90d9; }
.inf-edit-actions { display: flex; gap: 0.5rem; margin-top: 0.25rem; }
.btn-save {
    padding: 0.35rem 0.8rem;
    background: #4a90d9;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}
.btn-save:hover { background: #6ab0ff; }
.btn-cancel {
    padding: 0.35rem 0.8rem;
    background: transparent;
    color: #888;
    border: 1px solid #444;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}
.btn-cancel:hover { color: #fff; border-color: #666; }

/* === Admin Queue === */
.queue-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 6rem 2rem 3rem;
}
.queue-page h1 { color: #fff; margin-bottom: 0.3rem; }
.queue-subtitle { color: #888; margin-bottom: 2rem; }
.queue-list { display: flex; flex-direction: column; gap: 1rem; }
.queue-item {
    background: #141414;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 1.25rem;
}
.queue-meta { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.queue-submitter { color: #4a90d9; font-size: 0.85rem; }
.queue-date { color: #666; font-size: 0.8rem; }
.queue-connection { color: #fff; font-size: 1rem; margin-bottom: 0.5rem; }
.queue-arrow { color: #f5c518; margin: 0 0.5rem; }
.queue-desc { color: #999; font-style: italic; font-size: 0.9rem; margin-bottom: 0.5rem; }
.queue-citation { color: #888; font-size: 0.85rem; margin-bottom: 0.75rem; }
.queue-citation a { color: #4a90d9; }
.queue-actions { display: flex; gap: 0.5rem; }
.btn-approve {
    padding: 0.4rem 1rem;
    background: rgba(34,197,94,0.15);
    color: #4ade80;
    border: 1px solid rgba(34,197,94,0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}
.btn-approve:hover { background: rgba(34,197,94,0.3); }
.btn-reject {
    padding: 0.4rem 1rem;
    background: rgba(220,38,38,0.1);
    color: #f87171;
    border: 1px solid rgba(220,38,38,0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}
.btn-reject:hover { background: rgba(220,38,38,0.25); }
.queue-empty { color: #666; font-size: 1rem; }

/* === Responsive === */
/* ═══ Watched Button ═══ */
.btn-watched {
    background: transparent;
    color: #888;
    border: 1px solid #888;
}
.btn-watched:hover { background: #4ade80; color: #0a0a0a; border-color: #4ade80; }
.btn-watched-active {
    background: #4ade80;
    color: #0a0a0a;
    border: 1px solid #4ade80;
}
.btn-watched-active:hover { background: transparent; color: #4ade80; }

/* ═══ Letterboxd-style eye hover on carousel cards ═══ */
.carousel-card .watched-eye-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 3;
    border-radius: 4px;
    pointer-events: none;
}
.carousel-card:hover .watched-eye-overlay { opacity: 1; }
.watched-eye-overlay svg { width: 36px; height: 36px; color: #4ade80; }

/* ═══ Watched Badge on Carousel Cards ═══ */
.carousel-card { position: relative; }
.watched-badge {
    position: absolute;
    top: 6px; right: 6px;
    background: rgba(34,197,94,0.85);
    color: #fff;
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 2;
}

/* ═══ Watchlist Button ═══ */
.btn-watchlist {
    background: transparent;
    color: #4a90d9;
    border: 1px solid rgba(74,144,217,0.4);
}
.btn-watchlist:hover { background: rgba(74,144,217,0.15); }

/* ═══ Watchlist Picker ═══ */
.watchlist-picker {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.watchlist-picker-list { list-style: none; padding: 0; margin: 0; }
.watchlist-picker-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.9rem;
}
.watchlist-picker-item:hover { background: rgba(255,255,255,0.04); }
.watchlist-picker-check { color: #4ade80; width: 1.2em; }
.watchlist-picker-create {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    align-items: center;
}
.watchlist-picker-create input {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #e0e0e0;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
}
.watchlist-picker-create input:focus { border-color: #4a90d9; outline: none; }
.watchlist-picker-create button {
    background: #4a90d9;
    color: #fff;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}

/* ═══ Profile Page ═══ */
.profile-page { max-width: 1000px; margin: 0 auto; padding: 6rem 2rem 3rem; }
.profile-header { margin-bottom: 2rem; }
.profile-header h1 { font-size: 1.75rem; color: #fff; }
.profile-stats { display: flex; gap: 2rem; margin-bottom: 2.5rem; }
.profile-stat { text-align: center; }
.profile-stat-number { font-size: 2rem; font-weight: 700; color: #f5c518; display: block; }
.profile-stat-label { font-size: 0.85rem; color: #888; }
.profile-section { margin-bottom: 2.5rem; }
.profile-section h2 { font-size: 1.2rem; color: #e0e0e0; margin-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 0.5rem; }
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}
.profile-movie-card { text-align: center; }
.profile-movie-card img { width: 100%; border-radius: 6px; }
.profile-movie-card .card-label { font-size: 0.8rem; color: #ccc; margin-top: 0.3rem; }

/* ═══ Watchlist Pages ═══ */
.watchlists-page, .watchlist-detail-page { max-width: 1000px; margin: 0 auto; padding: 6rem 2rem 3rem; }
.watchlist-card {
    background: #141414;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.watchlist-card:hover { border-color: rgba(255,255,255,0.15); }
.watchlist-card h3 { color: #e0e0e0; font-size: 1rem; margin: 0; }
.watchlist-card .item-count { color: #888; font-size: 0.85rem; }
.watchlist-card a { color: inherit; text-decoration: none; }
.watchlist-actions { display: flex; gap: 0.5rem; }
.watchlist-movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}
.watchlist-movie-card { position: relative; text-align: center; }
.watchlist-movie-card img { width: 100%; border-radius: 6px; }
.watchlist-movie-card .card-label { font-size: 0.8rem; color: #ccc; margin-top: 0.3rem; }
.watchlist-remove-btn {
    position: absolute;
    top: 4px; right: 4px;
    background: rgba(0,0,0,0.7);
    color: #f87171;
    border: none;
    border-radius: 50%;
    width: 22px; height: 22px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ═══ Lineage Pages ═══ */
.lineages-page, .lineage-detail-page { max-width: 1000px; margin: 0 auto; padding: 6rem 2rem 3rem; }
.lineage-card {
    background: #141414;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    text-decoration: none;
    display: block;
    color: inherit;
}
.lineage-card:hover { border-color: rgba(255,255,255,0.15); }
.lineage-card h3 { color: #e0e0e0; font-size: 1.05rem; margin: 0 0 0.3rem; }
.lineage-card .lineage-meta { color: #888; font-size: 0.85rem; }
.lineage-progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.75rem;
}
.lineage-progress-fill {
    height: 100%;
    background: #f5c518;
    border-radius: 3px;
    transition: width 0.3s;
}
.lineage-progress-fill.complete { background: #4ade80; }
.lineage-progress-text { font-size: 0.8rem; color: #888; margin-top: 0.3rem; }
.lineage-movie-list { list-style: none; padding: 0; }
.lineage-movie-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.lineage-movie-item img { width: 50px; border-radius: 4px; }
.lineage-movie-item .movie-info { flex: 1; }
.lineage-movie-item .movie-info a { color: #e0e0e0; text-decoration: none; }
.lineage-movie-item .movie-info a:hover { color: #f5c518; }
.lineage-movie-item .position-num { color: #555; font-size: 1.2rem; font-weight: 700; width: 2rem; text-align: center; }
.lineage-movie-item .watched-indicator { color: #4ade80; font-size: 1rem; }
.lineage-movie-item .unwatched-indicator { color: #555; font-size: 1rem; }
.lineage-movie-item.optional { opacity: 0.7; }

/* ═══ Badges ═══ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: rgba(245,197,24,0.1);
    border: 1px solid rgba(245,197,24,0.3);
    border-radius: 20px;
    color: #f5c518;
    font-size: 0.85rem;
}
.badge a { color: inherit; text-decoration: none; }
.badge a:hover { text-decoration: underline; }
.badges-grid { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.lineage-badge-earned {
    background: rgba(245,197,24,0.08);
    border: 1px solid rgba(245,197,24,0.3);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #f5c518;
}

/* ═══ Nav profile link ═══ */
.nav-profile-link { color: #e0e0e0; text-decoration: none; }
.nav-profile-link:hover { color: #f5c518; }

/* ═══ TMDb Attribution ═══ */
.tmdb-attribution {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 2rem;
    color: #666;
    font-size: 0.75rem;
}
.tmdb-logo { height: 16px; opacity: 0.7; }

@media (max-width: 768px) {
    .movie-title { font-size: 1.75rem; }
    .movie-hero { min-height: 60vh; }
    .movie-hero-overlay { min-height: 60vh; padding: 5rem 1.5rem 2rem; }
    .movie-stats { flex-direction: column; gap: 0.5rem; }
    .movie-actions { flex-direction: column; }
    .btn-action { justify-content: center; }
    .connections { padding: 1.5rem 1rem; }
    .hero h1 { font-size: 2rem; }
    .featured-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    #demo-cy { height: 250px; }
    .rabbit-path { flex-direction: column; }
    .rabbit-arrow { transform: rotate(90deg); }
    .category-pills { gap: 0.5rem; }
    .pill { font-size: 0.8rem; padding: 0.4rem 1rem; }
    .nav-user { gap: 0.5rem; }
    .nav-username { display: none; }
    .auth-card { padding: 1.5rem; }
    .contribute-direction { flex-direction: column; }
    .queue-page { padding: 5rem 1rem 2rem; }
}

/* ═══════════════════════════════════════════════════════════
   ReelWeb — Cinematic overhaul (Mythos edition)
   Appended overrides. Non-destructive: only styles listed here.
   ═══════════════════════════════════════════════════════════ */

:root {
    --ink: #07070b;
    --ink-2: #0d0d14;
    --gold: #f5c518;
    --gold-soft: #ffd84d;
    --ember: #ff6b35;
    --paper: #f4f1ea;
    --mist: rgba(255,255,255,0.08);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: radial-gradient(ellipse at top, #14141c 0%, #07070b 60%) fixed;
}

/* Film grain overlay — fixed, ignores pointer */
.film-grain {
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.06;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.7 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    animation: grainShift 1.6s steps(4) infinite;
}
@keyframes grainShift {
    0%   { transform: translate(0,0); }
    25%  { transform: translate(-4%, 2%); }
    50%  { transform: translate(3%, -3%); }
    75%  { transform: translate(-2%, 4%); }
    100% { transform: translate(0,0); }
}

/* Nav polish */
.nav {
    padding: 0.9rem 2rem;
    background: linear-gradient(180deg, rgba(0,0,0,0.85), rgba(0,0,0,0.35));
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.nav-brand {
    font-family: 'Bebas Neue', 'Inter', sans-serif;
    font-size: 1.7rem;
    letter-spacing: 0.06em;
}
.nav-links a {
    position: relative;
    padding: 0.25rem 0;
    transition: color 0.2s;
}
.nav-links a::after {
    content: '';
    position: absolute;
    left: 0; right: 100%;
    bottom: -2px;
    height: 1px;
    background: var(--gold);
    transition: right 0.25s ease;
}
.nav-links a:hover::after { right: 0; }

/* ═══ Hero — cinematic ═══ */
.hero-cinematic {
    position: relative;
    min-height: 92vh;
    padding: 7rem 1.5rem 4rem;
    overflow: hidden;
    isolation: isolate;
}
.hero-wall {
    position: absolute; inset: -10% -5%;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
    z-index: -2;
    opacity: 0.55;
    filter: saturate(0.85) contrast(1.05);
    transform: rotate(-6deg) scale(1.25);
}
.hero-wall-tile {
    overflow: hidden;
    border-radius: 6px;
    aspect-ratio: 2/3;
    will-change: transform;
}
.hero-wall-tile img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
/* Drift animation — columns move at different speeds via nth-child */
.hero-wall-tile:nth-child(6n+1) { animation: drift-a 48s linear infinite; }
.hero-wall-tile:nth-child(6n+2) { animation: drift-b 62s linear infinite; }
.hero-wall-tile:nth-child(6n+3) { animation: drift-a 55s linear infinite reverse; }
.hero-wall-tile:nth-child(6n+4) { animation: drift-b 70s linear infinite reverse; }
.hero-wall-tile:nth-child(6n+5) { animation: drift-a 58s linear infinite; }
.hero-wall-tile:nth-child(6n+6) { animation: drift-b 45s linear infinite reverse; }
@keyframes drift-a {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-40px); }
    100% { transform: translateY(0); }
}
@keyframes drift-b {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(40px); }
    100% { transform: translateY(0); }
}

.hero-vignette {
    position: absolute; inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 60% at 50% 40%, transparent 0%, rgba(7,7,11,0.55) 55%, rgba(7,7,11,0.95) 100%),
        linear-gradient(180deg, rgba(7,7,11,0.6) 0%, transparent 30%, transparent 70%, rgba(7,7,11,1) 100%);
}

.hero-inner {
    position: relative;
    max-width: 880px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}
.hero-eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.9;
    padding: 0.4rem 0.9rem;
    border: 1px solid rgba(245,197,24,0.35);
    border-radius: 999px;
    background: rgba(245,197,24,0.05);
}
.hero-title {
    font-family: 'Bebas Neue', 'Inter', sans-serif;
    font-size: clamp(4.5rem, 14vw, 11rem);
    line-height: 0.9;
    letter-spacing: 0.02em;
    color: #fff;
    margin: 0;
    background: linear-gradient(180deg, #ffffff 0%, #ffe9a8 55%, #c89b2a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 12px 40px rgba(245,197,24,0.18);
    animation: heroTitleIn 1.1s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes heroTitleIn {
    from { opacity: 0; transform: translateY(24px) scale(0.98); letter-spacing: 0.2em; }
    to   { opacity: 1; transform: translateY(0)    scale(1);    letter-spacing: 0.02em; }
}
.hero-tagline {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    font-style: italic;
    color: #e6e2d7;
    max-width: 620px;
    line-height: 1.45;
    margin-bottom: 0.5rem;
}
.hero-tagline em { font-style: italic; color: #fff; }

.hero-search {
    max-width: 600px;
    width: 100%;
}
.hero-search .search-input {
    padding: 1rem 3rem 1rem 3rem;
    font-size: 1.05rem;
    background: rgba(20,20,28,0.8);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.04);
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.hero-search .search-input::placeholder { color: #8a8578; font-style: italic; }
.hero-search .search-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(245,197,24,0.15), 0 20px 60px rgba(0,0,0,0.55);
    transform: translateY(-1px);
}
.hero-search-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: var(--gold);
    opacity: 0.75;
    pointer-events: none;
    z-index: 2;
}
.hero-search-kbd {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Inter', monospace;
    font-size: 0.8rem;
    color: #b3ad9e;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-bottom-width: 2px;
    border-radius: 5px;
    padding: 0.15rem 0.45rem;
    pointer-events: none;
}
.hero-search .search-results {
    margin-top: 0.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(15,15,22,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}

.hero-scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 1.75rem;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    color: #b3ad9e;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    opacity: 0.7;
    transition: opacity 0.2s, color 0.2s;
}
.hero-scroll-hint:hover { opacity: 1; color: var(--gold); }
.hero-scroll-arrow {
    font-size: 1.1rem;
    animation: scrollBounce 2.2s ease-in-out infinite;
}
@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(6px); }
}

/* ═══ Section typographic rhythm ═══ */
.demo-heading,
.categories-section h2,
.featured h2,
.rabbit-hole h2 {
    font-family: 'Bebas Neue', 'Inter', sans-serif;
    letter-spacing: 0.08em;
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    color: #fff;
}
.featured-explainer,
.demo-subtitle,
.rabbit-subtitle {
    font-family: 'Instrument Serif', Georgia, serif;
    font-style: italic;
    font-size: 1.05rem;
}

/* ═══ Featured cards — cinematic tilt ═══ */
.featured-grid { gap: 1.5rem; }
.card {
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    position: relative;
}
.card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    box-shadow: 0 0 0 1px rgba(245,197,24,0) inset;
    transition: box-shadow 0.35s;
    pointer-events: none;
}
.card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 40px rgba(245,197,24,0.18);
}
.card:hover::after { box-shadow: 0 0 0 1px rgba(245,197,24,0.45) inset; }
.card img { transition: transform 0.5s ease; }
.card:hover img { transform: scale(1.06); }
.card-label {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: 0.01em;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.95) 100%);
}

/* ═══ Pills refined ═══ */
.pill {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    letter-spacing: 0.04em;
    transition: transform 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* ═══ Demo graph frame ═══ */
.demo-graph-wrap {
    box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(245,197,24,0.06);
    background: radial-gradient(ellipse at center, #101020 0%, #07070d 100%);
}

/* ═══ Buttons ═══ */
.btn-explore {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%);
    color: #1a1408;
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 10px 30px rgba(245,197,24,0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-explore:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(245,197,24,0.4);
}

/* ═══ Responsive hero tuning ═══ */
@media (max-width: 700px) {
    .hero-cinematic { min-height: 82vh; padding: 5.5rem 1rem 3rem; }
    .hero-wall { grid-template-columns: repeat(4, 1fr); opacity: 0.4; }
    .hero-scroll-hint { display: none; }
    .hero-search-kbd { display: none; }
}

/* ═══ Share group (movie page) ═══ */
.share-group {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    margin-left: 0.5rem;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(245,197,24,0.35);
    background: rgba(245,197,24,0.05);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.share-group:hover {
    border-color: var(--gold);
    background: rgba(245,197,24,0.1);
    box-shadow: 0 6px 20px rgba(245,197,24,0.2);
}
.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gold);
    background: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.btn-share + .btn-share { border-left: 1px solid rgba(245,197,24,0.3); }
.btn-share:hover { background: rgba(245,197,24,0.15); color: var(--gold-soft); }
.btn-share-copy.copied { color: #4ade80; background: rgba(74,222,128,0.12); }

/* ═══════════════════════════════════════════════════════════
   Animated Influence Path Tracer
   Staggered reveal for rabbit-hole and featured-path sections
   ═══════════════════════════════════════════════════════════ */

/* Steps and arrows start invisible */
.rabbit-path .rabbit-step,
.rabbit-path .rabbit-arrow,
.featured-path .rabbit-step,
.featured-path .rabbit-arrow {
    opacity: 0;
    transform: translateY(20px);
}

/* When the path becomes visible (via IntersectionObserver), animate in */
.rabbit-path.path-animate .rabbit-step,
.rabbit-path.path-animate .rabbit-arrow,
.featured-path.path-animate .rabbit-step,
.featured-path.path-animate .rabbit-arrow {
    animation: pathStepIn 0.6s cubic-bezier(.2,.8,.2,1) forwards;
}

/* Staggered delays — step 1, arrow 1, step 2, arrow 2, step 3 */
.path-animate > :nth-child(1) { animation-delay: 0.1s; }
.path-animate > :nth-child(2) { animation-delay: 0.45s; }
.path-animate > :nth-child(3) { animation-delay: 0.8s; }
.path-animate > :nth-child(4) { animation-delay: 1.15s; }
.path-animate > :nth-child(5) { animation-delay: 1.5s; }

@keyframes pathStepIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Arrow pulse animation after reveal */
.path-animate .rabbit-arrow {
    animation: pathStepIn 0.6s cubic-bezier(.2,.8,.2,1) forwards,
               arrowPulse 2s ease-in-out 2.5s infinite;
}
@keyframes arrowPulse {
    0%, 100% { transform: translateX(0); opacity: 1; }
    50%      { transform: translateX(4px); opacity: 0.6; }
}

/* Poster glow on animated path steps */
.path-animate .rabbit-step img {
    transition: box-shadow 0.4s ease;
}
.path-animate .rabbit-step:hover img {
    box-shadow: 0 0 20px rgba(245,197,24,0.4), 0 8px 30px rgba(0,0,0,0.5);
}

/* ═══════════════════════════════════════════════════════════
   Mobile Hamburger Nav
   ═══════════════════════════════════════════════════════════ */

.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    transition: transform 0.3s, opacity 0.3s;
    border-radius: 1px;
}
/* Hamburger → X animation */
.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 768px) {
    .nav-hamburger { display: block; }

    .nav-links {
        position: fixed;
        top: 0; right: -100%;
        width: 260px;
        height: 100vh;
        background: rgba(10,10,16,0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        transition: right 0.3s cubic-bezier(.2,.8,.2,1);
        border-left: 1px solid rgba(255,255,255,0.06);
        z-index: 999;
    }
    .nav-links.nav-open { right: 0; }
    .nav-links a {
        margin-left: 0;
        font-size: 1.2rem;
        padding: 0.75rem 0;
        display: block;
        border-bottom: 1px solid rgba(255,255,255,0.04);
    }
    .nav-user {
        position: fixed;
        bottom: 0; right: -100%;
        width: 260px;
        padding: 1.5rem 2rem;
        background: rgba(10,10,16,0.98);
        border-top: 1px solid rgba(255,255,255,0.06);
        border-left: 1px solid rgba(255,255,255,0.06);
        z-index: 999;
        flex-direction: column;
        gap: 0.75rem;
        transition: right 0.3s cubic-bezier(.2,.8,.2,1);
    }
    .nav-user.nav-open { right: 0; }
    .nav-user a, .nav-profile-link { font-size: 1rem; }

    /* Mobile nav overlay */
    .nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.6);
        z-index: 998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
    }
    .nav-overlay.active { opacity: 1; pointer-events: auto; }
}

/* ═══════════════════════════════════════════════════════════
   Mobile Graph Page
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .graph-container { height: calc(100vh - 56px); margin-top: 56px; }

    .graph-landing h1 { font-size: 1.6rem; }
    .graph-subtitle { font-size: 0.95rem; margin-bottom: 1.25rem; }

    .suggested-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
    }

    .graph-topbar {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.5rem 0.75rem;
        top: 0;
    }
    .center-title { font-size: 0.9rem; flex: 1 1 100%; order: -1; text-align: center; }
    .topbar-search { width: 100%; order: 10; }
    .graph-buttons { margin-left: auto; }

    .graph-legend {
        bottom: 0.75rem;
        left: 0.75rem;
        font-size: 0.7rem;
        padding: 0.5rem 0.75rem;
    }

    .edge-tooltip { max-width: 200px; font-size: 0.75rem; }
}

/* ═══════════════════════════════════════════════════════════
   Tablet Breakpoints
   ═══════════════════════════════════════════════════════════ */

@media (min-width: 769px) and (max-width: 1024px) {
    .featured-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .movie-hero-content { max-width: 550px; }
    .movie-title { font-size: 2rem; }
    .hero-cinematic { min-height: 80vh; }
    .hero-wall { grid-template-columns: repeat(5, 1fr); }
}

/* ═══════════════════════════════════════════════════════════
   Safe Area (notched phones)
   ═══════════════════════════════════════════════════════════ */

@supports (padding: env(safe-area-inset-bottom)) {
    .nav { padding-top: max(0.9rem, env(safe-area-inset-top)); }
    .site-footer,
    .tmdb-attribution { padding-bottom: max(1.5rem, env(safe-area-inset-bottom)); }
    .graph-legend { bottom: max(0.75rem, env(safe-area-inset-bottom)); }
}

/* ═══════════════════════════════════════════════════════════
   Discovery Fact
   ═══════════════════════════════════════════════════════════ */

.discovery-fact {
    max-width: 700px;
    margin: 0 auto 2rem;
    padding: 1.25rem 1.75rem;
    background: rgba(245,197,24,0.04);
    border: 1px solid rgba(245,197,24,0.15);
    border-radius: 12px;
    text-align: center;
    animation: factFadeIn 0.8s ease-out;
}
.discovery-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.8;
    margin-bottom: 0.5rem;
}
.discovery-text {
    font-family: 'Instrument Serif', Georgia, serif;
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.5;
    color: #e6e2d7;
}
.discovery-text a {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid rgba(245,197,24,0.3);
    transition: border-color 0.2s;
}
.discovery-text a:hover { border-color: var(--gold); }
@keyframes factFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
