:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --soft: #e2e8f0;
    --gold: #f59e0b;
    --gold-dark: #d97706;
    --slate: #111827;
    --slate-2: #1e293b;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 55%, #78350f 100%);
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.22);
}

.site-nav {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.35);
}

.brand-text {
    display: grid;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 22px;
    letter-spacing: 0.02em;
}

.brand-text small {
    color: #cbd5e1;
    font-size: 12px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    font-weight: 700;
}

.nav-links a {
    color: #e5e7eb;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
    color: #fbbf24;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 22px;
}

.hero {
    position: relative;
    height: 620px;
    color: #fff;
    overflow: hidden;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    opacity: 0.28;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.32), transparent 34%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.78), rgba(120, 53, 15, 0.72));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: center;
    gap: 48px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fbbf24;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 18px 0 8px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero h2 {
    margin: 0 0 18px;
    color: #fbbf24;
    font-size: clamp(24px, 3vw, 36px);
}

.hero p {
    margin: 0 0 32px;
    color: #e2e8f0;
    font-size: 19px;
    max-width: 680px;
}

.hero-actions,
.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn-primary,
.btn-ghost,
.panel-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--gold), #f97316);
    box-shadow: 0 14px 28px rgba(245, 158, 11, 0.32);
}

.btn-ghost {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(12px);
}

.btn-primary:hover,
.btn-ghost:hover,
.panel-link:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    display: block;
    border-radius: 28px;
    overflow: hidden;
    min-height: 440px;
    box-shadow: 0 30px 75px rgba(0, 0, 0, 0.42);
    isolation: isolate;
}

.hero-poster img {
    width: 100%;
    height: 440px;
    object-fit: cover;
}

.hero-poster span {
    position: absolute;
    right: 18px;
    bottom: 18px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #111827;
    background: #fbbf24;
    font-weight: 900;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 4;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 34px;
    background: #fbbf24;
}

.section {
    padding: 58px 0;
}

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

.section-title span {
    display: block;
    color: var(--gold-dark);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.section-title h2 {
    margin: 4px 0 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
}

.section-title a,
.panel-link {
    color: var(--gold-dark);
    font-weight: 900;
}

.compact-title {
    align-items: start;
    display: block;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(12px);
}

.search-panel label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid #dbe3ee;
    border-radius: 14px;
    padding: 0 14px;
    color: var(--ink);
    background: #fff;
    font: inherit;
    outline: none;
}

.search-panel input:focus,
.search-panel select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #78350f);
}

.card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.movie-card:hover .card-poster img {
    transform: scale(1.07);
}

.card-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(15, 23, 42, 0.72));
}

.card-year,
.card-play {
    position: absolute;
    z-index: 2;
}

.card-year {
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(245, 158, 11, 0.94);
    font-size: 13px;
    font-weight: 900;
}

.card-play {
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: rgba(245, 158, 11, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-body {
    padding: 18px;
}

.card-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 52px;
    color: var(--ink);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-title:hover {
    color: var(--gold-dark);
}

.card-desc {
    display: -webkit-box;
    overflow: hidden;
    min-height: 48px;
    margin: 10px 0 12px;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.card-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: #cbd5e1;
}

.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag-row span,
.detail-tags span {
    padding: 5px 9px;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-size: 12px;
    font-weight: 800;
}

.movie-card-compact .card-body {
    padding: 14px;
}

.movie-card-compact .card-title {
    min-height: 46px;
    font-size: 16px;
}

.movie-card-compact .card-desc {
    font-size: 13px;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.rank-panel,
.article-panel,
.info-panel {
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.08);
}

.rank-panel {
    padding: 24px;
    position: sticky;
    top: 92px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 44px 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #fff;
    transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    background: #fffbeb;
}

.rank-number {
    color: var(--gold-dark);
    font-size: 20px;
    font-weight: 1000;
    text-align: center;
}

.rank-item img {
    width: 58px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-text {
    display: grid;
    min-width: 0;
}

.rank-text strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
}

.rank-text small {
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

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

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

.category-card {
    min-height: 150px;
    padding: 22px;
    border-radius: var(--radius);
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #92400e);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-card strong {
    display: block;
    margin-bottom: 10px;
    font-size: 21px;
}

.category-card span {
    color: #e2e8f0;
    font-size: 14px;
}

.page-main {
    padding-top: 30px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

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

.page-hero {
    border-radius: 30px;
    color: #fff;
    background:
        radial-gradient(circle at 88% 18%, rgba(245, 158, 11, 0.35), transparent 28%),
        linear-gradient(135deg, #0f172a, #1e293b 55%, #78350f);
    box-shadow: var(--shadow);
}

.mini-hero {
    padding: 44px;
    margin-bottom: 24px;
}

.mini-hero h1 {
    margin: 10px 0;
    font-size: clamp(30px, 4vw, 48px);
    letter-spacing: -0.03em;
}

.mini-hero p {
    max-width: 760px;
    margin: 0;
    color: #e2e8f0;
    font-size: 18px;
}

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

.category-wide-card {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    border-radius: 28px;
    color: #fff;
    box-shadow: var(--shadow);
}

.category-wide-bg,
.category-wide-mask,
.category-wide-content {
    position: absolute;
    inset: 0;
}

.category-wide-bg {
    background-size: cover;
    background-position: center;
    transition: transform 0.45s ease;
}

.category-wide-card:hover .category-wide-bg {
    transform: scale(1.07);
}

.category-wide-mask {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.36));
}

.category-wide-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px;
}

.category-wide-content strong {
    font-size: 30px;
    line-height: 1.1;
}

.category-wide-content em {
    max-width: 520px;
    margin: 12px 0;
    color: #e2e8f0;
    font-style: normal;
}

.category-wide-content small {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-wide-content small span {
    padding: 4px 9px;
    border-radius: 999px;
    color: #111827;
    background: #fbbf24;
    font-weight: 900;
}

.detail-shell {
    padding-bottom: 56px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
    min-height: 460px;
    padding: 34px;
    border-radius: 30px;
    color: #fff;
    background:
        radial-gradient(circle at 84% 20%, rgba(245, 158, 11, 0.34), transparent 30%),
        linear-gradient(135deg, #0f172a, #1e293b 58%, #78350f);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
}

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

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

.detail-copy p {
    max-width: 820px;
    margin: 0;
    color: #e2e8f0;
    font-size: 19px;
}

.player-section {
    padding: 34px 0 0;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

.video-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.10), rgba(15, 23, 42, 0.62));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    box-shadow: 0 24px 50px rgba(245, 158, 11, 0.34);
    font-size: 34px;
}

.video-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-columns {
    padding: 32px 0 0;
}

.article-panel,
.info-panel {
    padding: 28px;
}

.article-panel h2,
.info-panel h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.article-panel p {
    margin: 0 0 24px;
    color: #334155;
    font-size: 17px;
}

.article-panel p:last-child {
    margin-bottom: 0;
}

.info-panel dl {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px 14px;
    margin: 0;
}

.info-panel dt {
    color: var(--muted);
    font-weight: 900;
}

.info-panel dd {
    margin: 0;
    color: var(--ink);
}

.info-panel a {
    color: var(--gold-dark);
    font-weight: 900;
}

.related-section {
    padding-bottom: 0;
}

.empty-state {
    display: none;
    margin: 22px 0 0;
    padding: 18px;
    border-radius: 18px;
    color: #92400e;
    background: #fef3c7;
    font-weight: 800;
}

.empty-state.is-visible {
    display: block;
}

.site-footer {
    margin-top: 60px;
    color: #dbeafe;
    background: linear-gradient(90deg, #0f172a, #1e293b);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-inner p {
    margin: 8px 0 0;
    color: #cbd5e1;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: flex-end;
}

.footer-links a {
    color: #fbbf24;
    font-weight: 800;
}

@media (max-width: 1100px) {
    .movie-grid,
    .library-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .hero-content {
        grid-template-columns: minmax(0, 1fr) 260px;
    }

    .hero-poster,
    .hero-poster img {
        min-height: 360px;
        height: 360px;
    }
}

@media (max-width: 820px) {
    .site-nav {
        min-height: 66px;
    }

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        overflow: hidden;
        border-radius: 18px;
        background: #0f172a;
        box-shadow: var(--shadow);
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links a {
        padding: 14px 18px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .hero {
        height: auto;
        min-height: 680px;
    }

    .hero-slide {
        position: relative;
        display: none;
        min-height: 680px;
    }

    .hero-slide.is-active {
        display: block;
    }

    .hero-content {
        min-height: 680px;
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 56px 0 76px;
    }

    .hero-poster {
        min-height: auto;
        max-width: 260px;
    }

    .hero-poster img {
        height: 340px;
    }

    .section-title,
    .footer-inner {
        display: block;
    }

    .footer-links {
        justify-content: flex-start;
        margin-top: 20px;
    }

    .search-panel {
        grid-template-columns: 1fr;
    }

    .movie-grid,
    .compact-grid,
    .library-grid,
    .category-grid,
    .category-wide-grid,
    .large-rank-list,
    .two-column,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }

    .detail-hero {
        min-height: auto;
    }

    .detail-poster {
        max-width: 280px;
    }
}

@media (max-width: 520px) {
    .shell,
    .site-nav,
    .footer-inner,
    .hero-content {
        width: min(100% - 22px, 1180px);
    }

    .brand-text strong {
        font-size: 18px;
    }

    .brand-text small {
        display: none;
    }

    .hero h1 {
        font-size: 34px;
    }

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

    .card-body {
        padding: 13px;
    }

    .card-title {
        min-height: 44px;
        font-size: 15px;
    }

    .card-desc {
        display: none;
    }

    .mini-hero,
    .detail-hero,
    .article-panel,
    .info-panel {
        padding: 22px;
    }

    .rank-item {
        grid-template-columns: 38px 52px minmax(0, 1fr);
    }
}
