:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --amber: #f59e0b;
    --amber-dark: #d97706;
    --radius: 18px;
    --shadow: 0 28px 90px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 32rem), var(--bg);
    color: var(--text);
    line-height: 1.6;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(2, 6, 23, 0.82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.35);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--muted);
    font-size: 15px;
}

.main-nav a {
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--amber);
}

.menu-toggle {
    display: none;
    border: 0;
    color: var(--text);
    background: transparent;
    font-size: 26px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid var(--line);
}

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

.hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
}

.hero-slide {
    display: none;
    width: 100%;
    padding: 74px 0 56px;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.15) brightness(0.55);
    transform: scale(1.05);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.76) 46%, rgba(2, 6, 23, 0.2)), linear-gradient(0deg, #020617, transparent 45%);
}

.hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 48px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.12);
    font-size: 14px;
}

.hero h1 {
    margin: 20px 0 16px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 680px;
    color: var(--muted);
    font-size: 18px;
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 16px 40px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
    color: var(--text);
    border: 1px solid rgba(226, 232, 240, 0.22);
    background: rgba(15, 23, 42, 0.58);
}

.hero-poster {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(226, 232, 240, 0.2);
    transform: rotate(2deg);
}

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

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent 45%);
}

.hero-poster-title {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    z-index: 1;
    font-size: 22px;
    font-weight: 800;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 28px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
}

.hero-dot.active {
    background: var(--amber);
}

.search-panel {
    margin: -38px auto 54px;
    position: relative;
    z-index: 2;
}

.search-box {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(226, 232, 240, 0.18);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-box input,
.search-box select {
    min-height: 48px;
    border: 1px solid rgba(226, 232, 240, 0.16);
    border-radius: 16px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.68);
    padding: 0 16px;
    outline: none;
}

.search-box input:focus,
.search-box select:focus {
    border-color: rgba(245, 158, 11, 0.7);
}

.section {
    padding: 36px 0;
}

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

.section-heading h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-heading p,
.page-title p {
    margin: 8px 0 0;
    color: var(--soft);
}

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

.movie-card {
    border: 1px solid rgba(226, 232, 240, 0.13);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.3);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.28s ease, filter 0.28s ease;
}

.movie-card:hover img {
    transform: scale(1.06);
    filter: brightness(0.92);
}

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.7), transparent 42%);
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #111827;
    background: var(--amber);
    transform: translate(-50%, -50%) scale(0.85);
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.poster-meta {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    padding: 3px 8px;
    border-radius: 999px;
    color: #f8fafc;
    background: rgba(2, 6, 23, 0.72);
    font-size: 12px;
}

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

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--amber);
}

.movie-card p {
    min-height: 48px;
    margin: 0 0 12px;
    color: var(--soft);
    font-size: 13px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-row span,
.meta-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.12);
    font-size: 12px;
}

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

.category-card {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border: 1px solid rgba(226, 232, 240, 0.14);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.75));
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.5);
}

.category-card h2,
.category-card h3 {
    margin: 0;
}

.category-card p {
    margin: 12px 0 0;
    color: var(--soft);
}

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

.rank-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid rgba(226, 232, 240, 0.13);
    border-radius: 22px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.72);
}

.rank-item a {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 130px;
    gap: 12px;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.1);
}

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

.rank-number {
    color: var(--amber);
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.rank-genre {
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--soft);
    font-size: 13px;
}

.page-hero {
    padding: 58px 0 44px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.9));
    border-bottom: 1px solid var(--line);
}

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

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

.movie-detail {
    padding: 46px 0;
}

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

.detail-poster {
    position: sticky;
    top: 96px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.15);
    box-shadow: var(--shadow);
}

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

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(226, 232, 240, 0.15);
    background: #000;
    box-shadow: var(--shadow);
}

.player-wrap video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000;
}

.player-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.18), rgba(0, 0, 0, 0.58));
    cursor: pointer;
}

.player-layer.hidden {
    display: none;
}

.big-play {
    width: 82px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    font-size: 34px;
    box-shadow: 0 20px 60px rgba(245, 158, 11, 0.38);
}

.detail-content h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 5vw, 54px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 24px;
}

.prose-panel {
    margin-top: 22px;
    padding: 24px;
    border: 1px solid rgba(226, 232, 240, 0.13);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.prose-panel h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.prose-panel p {
    margin: 0 0 14px;
    color: var(--muted);
}

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

.hidden-card {
    display: none;
}

.site-footer {
    margin-top: 56px;
    padding: 42px 0;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.9);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 28px;
    color: var(--soft);
}

.footer-grid h2,
.footer-grid h3 {
    margin: 0 0 12px;
    color: var(--text);
}

.footer-grid a {
    display: block;
    margin: 6px 0;
}

.footer-grid a:hover {
    color: var(--amber);
}

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero-content,
    .detail-grid,
    .rank-panel,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
    }

    .hero-slide {
        padding: 54px 0 72px;
    }

    .hero-poster {
        max-width: 320px;
        transform: none;
    }

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

    .detail-poster {
        position: static;
        max-width: 320px;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 24px, 1200px);
    }

    .site-logo {
        font-size: 17px;
    }

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

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

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

    .rank-genre {
        display: none;
    }

    .movie-card-body {
        padding: 12px;
    }

    .movie-card p {
        min-height: 42px;
        font-size: 12px;
    }
}
