:root {
    --bg: #0f172a;
    --panel: #1e293b;
    --panel-soft: rgba(30, 41, 59, 0.62);
    --line: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #fbbf24;
    --accent-soft: rgba(251, 191, 36, 0.16);
    --accent-hover: #fcd34d;
    --shadow: 0 24px 60px rgba(2, 6, 23, 0.42);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 80;
    background: rgba(15, 23, 42, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: #0f172a;
    box-shadow: 0 0 32px rgba(251, 191, 36, 0.36);
}

.brand-text {
    font-size: 20px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

.nav-links a,
.mobile-panel a,
.footer-links a {
    color: var(--muted-strong);
    transition: color 0.2s ease;
}

.nav-links a:hover,
.mobile-panel a:hover,
.footer-links a:hover,
.text-link:hover {
    color: var(--accent-hover);
}

.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-form input,
.local-filter,
.local-select {
    min-width: 190px;
    color: var(--text);
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus,
.local-filter:focus,
.local-select:focus {
    border-color: rgba(251, 191, 36, 0.72);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.12);
}

.search-form button,
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.search-form button,
.btn-primary {
    background: var(--accent);
    color: #0f172a;
}

.search-form button:hover,
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    color: var(--text);
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(248, 250, 252, 0.16);
}

.btn-secondary:hover {
    border-color: rgba(251, 191, 36, 0.64);
    color: var(--accent-hover);
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.72);
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--text);
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 12px 0 18px;
    border-top: 1px solid var(--line);
}

.mobile-panel.is-open {
    display: grid;
    gap: 12px;
}

.mobile-search {
    align-items: stretch;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #020617;
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 0.7s ease;
}

.hero:hover .hero-image {
    transform: scale(1.06);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 25%, rgba(251, 191, 36, 0.22), transparent 28%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.76) 40%, rgba(15, 23, 42, 0.16) 100%),
        linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.62) 38%, transparent 100%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    padding: 116px 0 72px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 36px;
    align-items: end;
}

.hero-copy {
    max-width: 760px;
}

.hero-badges,
.tag-row,
.compact-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-badges span,
.tag-row span,
.compact-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    border: 1px solid rgba(251, 191, 36, 0.26);
    color: var(--accent-hover);
    font-size: 13px;
}

.hero h1 {
    margin: 20px 0 10px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero h2 {
    margin: 0 0 14px;
    font-size: clamp(24px, 3vw, 42px);
    line-height: 1.15;
}

.hero p {
    max-width: 700px;
    margin: 0 0 28px;
    color: var(--muted-strong);
    font-size: 18px;
}

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

.hero-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
    padding: 18px;
}

.hero-panel h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

.hero-list {
    display: grid;
    gap: 10px;
}

.hero-list a {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 4px 10px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.52);
    border: 1px solid transparent;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.hero-list a:hover {
    border-color: rgba(251, 191, 36, 0.42);
    transform: translateX(2px);
}

.hero-list span {
    grid-row: span 2;
    color: var(--accent);
    font-weight: 800;
}

.hero-list strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-list em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.page-shell,
.detail-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.with-nav-offset {
    padding-top: 116px;
}

.content-section {
    margin: 56px 0;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
    margin-bottom: 22px;
}

.section-heading h2,
.page-title-block h1,
.text-panel h2 {
    margin: 0;
    letter-spacing: -0.03em;
}

.section-heading h2 {
    font-size: clamp(24px, 3vw, 34px);
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--accent);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 13px;
}

.text-link {
    color: var(--muted-strong);
    font-weight: 700;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.compact-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
}

.movie-card a {
    display: block;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
    background: var(--panel);
    box-shadow: 0 16px 42px rgba(2, 6, 23, 0.28);
}

.poster-wrap img,
.wide-poster img,
.feature-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.movie-card:hover img,
.rail-card:hover img,
.feature-card:hover img,
.rank-item:hover img {
    transform: scale(1.08);
    filter: saturate(1.08);
}

.year-pill,
.wide-poster span,
.feature-cover span {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.74);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.poster-hover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: end;
    padding: 14px;
    color: var(--text);
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.2) 70%, transparent);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-hover {
    opacity: 1;
    transform: translateY(0);
}

.poster-hover p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    font-size: 14px;
}

.movie-card h3,
.rail-card h3,
.feature-card h3 {
    display: -webkit-box;
    margin: 12px 0 4px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--text);
    line-height: 1.35;
    transition: color 0.2s ease;
}

.movie-card:hover h3,
.rail-card:hover h3,
.feature-card:hover h3 {
    color: var(--accent-hover);
}

.card-meta,
.rail-card p,
.feature-copy p,
.page-title-block p,
.text-panel p,
.rank-item p {
    color: var(--muted);
}

.card-meta {
    margin: 0 0 8px;
    font-size: 14px;
}

.rail-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 2px 2px 18px;
    scrollbar-width: thin;
}

.rail-card {
    flex: 0 0 280px;
}

.wide-poster {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 16px;
    background: var(--panel);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.feature-card a {
    display: grid;
    grid-template-columns: 190px 1fr;
    min-height: 250px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-soft);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.feature-card a:hover {
    background: rgba(30, 41, 59, 0.86);
    border-color: rgba(251, 191, 36, 0.28);
    transform: translateY(-2px);
}

.feature-cover {
    position: relative;
    overflow: hidden;
}

.feature-copy {
    padding: 22px;
}

.feature-copy h3 {
    font-size: 21px;
}

.compact-tags {
    margin-top: 14px;
}

.page-title-block {
    max-width: 820px;
    margin: 0 0 36px;
}

.page-title-block h1 {
    font-size: clamp(34px, 5vw, 52px);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.category-card {
    min-height: 230px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.66));
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.25);
}

.category-card h2 {
    margin: 10px 0;
}

.category-count {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--accent);
    color: #0f172a;
    font-weight: 800;
}

.category-preview-links {
    display: grid;
    gap: 6px;
    margin-top: 18px;
}

.category-preview-links a {
    color: var(--muted-strong);
    font-size: 14px;
}

.filter-box,
.search-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 28px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.52);
}

.filter-box input {
    flex: 1 1 260px;
}

.rank-list {
    display: grid;
    gap: 14px;
}

.rank-item a {
    display: grid;
    grid-template-columns: 56px 94px 1fr;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.58);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item a:hover {
    border-color: rgba(251, 191, 36, 0.35);
    transform: translateY(-2px);
}

.rank-number {
    color: var(--accent);
    font-size: 26px;
    font-weight: 900;
    text-align: center;
}

.rank-item img {
    width: 94px;
    height: 126px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-item h2 {
    margin: 0 0 8px;
}

.rank-item p {
    margin: 0 0 10px;
}

.detail-page {
    background: var(--bg);
}

.detail-hero {
    position: relative;
    min-height: 520px;
    overflow: hidden;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(10px) saturate(0.85);
    transform: scale(1.08);
    opacity: 0.36;
}

.detail-backdrop div {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, var(--bg) 0%, rgba(15, 23, 42, 0.82) 46%, rgba(15, 23, 42, 0.72) 100%);
}

.detail-shell {
    position: relative;
    z-index: 2;
}

.detail-hero .detail-shell {
    min-height: 520px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 34px;
    align-items: end;
    padding: 116px 0 54px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    margin-bottom: 14px;
    font-size: 14px;
}

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

.detail-copy h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
}

.lead-text {
    margin: 0 0 20px;
    color: var(--muted-strong);
    font-size: 18px;
}

.detail-tags {
    margin-bottom: 26px;
}

.content-stack {
    display: grid;
    gap: 28px;
    padding-bottom: 30px;
}

.player-card,
.text-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.62);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.22);
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius);
    background: #020617;
}

.video-frame video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: #020617;
}

.player-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.player-overlay.is-hidden {
    display: none;
}

.play-circle {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: #0f172a;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 45px rgba(251, 191, 36, 0.45);
    font-size: 28px;
}

.text-panel {
    padding: 26px;
}

.text-panel h2 {
    margin-bottom: 12px;
    font-size: 26px;
}

.text-panel p {
    margin: 0;
    font-size: 17px;
}

.related-section {
    margin-top: 12px;
}

.search-summary {
    color: var(--muted-strong);
    margin: 8px 0 24px;
}

.site-footer {
    margin-top: 72px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.36);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 36px;
}

.footer-grid p {
    color: var(--muted);
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.is-hidden-card {
    display: none !important;
}

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

    .mobile-toggle {
        display: block;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        align-items: end;
    }

    .hero-panel {
        max-width: 620px;
    }

    .movie-grid,
    .compact-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 760px) {
    .nav-shell {
        height: 62px;
    }

    .search-form:not(.mobile-search):not(.search-page-form) {
        display: none;
    }

    .hero,
    .hero-inner {
        min-height: 620px;
    }

    .hero-inner {
        padding-top: 96px;
    }

    .hero p {
        font-size: 16px;
    }

    .movie-grid,
    .compact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .feature-card a {
        grid-template-columns: 1fr;
    }

    .feature-cover {
        aspect-ratio: 16 / 9;
    }

    .category-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .rank-item a {
        grid-template-columns: 44px 76px 1fr;
        gap: 12px;
    }

    .rank-item img {
        width: 76px;
        height: 102px;
    }

    .detail-hero .detail-shell {
        grid-template-columns: 1fr;
        padding-top: 96px;
    }

    .detail-poster {
        width: min(240px, 72vw);
    }
}

@media (max-width: 480px) {
    .page-shell,
    .detail-shell,
    .nav-shell,
    .mobile-panel,
    .footer-grid {
        width: min(100% - 24px, 1180px);
    }

    .hero-actions {
        display: grid;
    }

    .movie-grid,
    .compact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .tag-row span {
        font-size: 12px;
    }

    .rail-card {
        flex-basis: 230px;
    }
}
