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

:root {
    color-scheme: light;
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-300: #fcd34d;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-800: #92400e;
    --amber-900: #78350f;
    --orange-50: #fff7ed;
    --orange-600: #ea580c;
    --orange-700: #c2410c;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: rgba(180, 83, 9, 0.18);
    --card: #ffffff;
    --shadow: 0 22px 55px rgba(120, 53, 15, 0.16);
    --soft-shadow: 0 12px 30px rgba(120, 53, 15, 0.11);
    --radius: 24px;
    --container: 1200px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, var(--amber-50), var(--orange-50));
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 247, 237, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 22px rgba(120, 53, 15, 0.08);
    backdrop-filter: blur(14px);
}

.nav-shell {
    max-width: var(--container);
    margin: 0 auto;
    height: 68px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-600), var(--orange-700));
    box-shadow: 0 10px 18px rgba(217, 119, 6, 0.28);
    flex: 0 0 auto;
}

.brand-text {
    font-size: clamp(18px, 2vw, 26px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: linear-gradient(90deg, var(--amber-800), var(--orange-600), var(--amber-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--amber-800);
    font-weight: 700;
    font-size: 14px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    background: var(--amber-600);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(217, 119, 6, 0.18);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    color: var(--amber-800);
    background: var(--amber-100);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    padding: 10px 20px 16px;
    background: var(--amber-50);
}

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

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.hero {
    position: relative;
    min-height: 540px;
    overflow: hidden;
    background: var(--amber-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(120, 53, 15, 0.92), rgba(154, 52, 18, 0.78) 45%, rgba(67, 20, 7, 0.54));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(var(--container), 100%);
    padding: 72px 20px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) 360px;
    align-items: center;
    gap: 48px;
}

.hero-copy {
    max-width: 760px;
    color: var(--amber-100);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(253, 230, 138, 0.38);
    border-radius: 999px;
    color: var(--amber-100);
    background: rgba(255, 251, 235, 0.12);
    backdrop-filter: blur(8px);
    font-weight: 800;
    font-size: 14px;
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(38px, 6vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    color: var(--amber-100);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.hero-summary {
    margin: 0 0 28px;
    color: #fdecc4;
    font-size: clamp(17px, 2vw, 23px);
    line-height: 1.75;
}

.hero-actions,
.section-actions,
.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #fff;
    background: var(--amber-600);
    box-shadow: 0 18px 32px rgba(217, 119, 6, 0.32);
}

.btn-primary:hover {
    background: var(--amber-700);
}

.btn-ghost {
    color: var(--amber-100);
    border-color: rgba(253, 230, 138, 0.46);
    background: rgba(255, 251, 235, 0.1);
    backdrop-filter: blur(10px);
}

.hero-panel {
    border: 1px solid rgba(253, 230, 138, 0.24);
    border-radius: 32px;
    padding: 18px;
    background: rgba(255, 251, 235, 0.12);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(16px);
}

.hero-poster {
    aspect-ratio: 3 / 4;
    border-radius: 24px;
    overflow: hidden;
    background: rgba(255, 251, 235, 0.08);
}

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

.hero-panel-meta {
    display: grid;
    gap: 10px;
    padding: 16px 4px 0;
    color: #fff7d6;
}

.hero-tags,
.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    background: var(--amber-100);
    color: var(--amber-800);
    font-weight: 800;
    font-size: 12px;
}

.hero-tags .tag {
    background: rgba(253, 230, 138, 0.2);
    color: var(--amber-100);
    border: 1px solid rgba(253, 230, 138, 0.22);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(253, 230, 138, 0.48);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 36px;
    background: var(--amber-200);
}

.main-flow {
    padding: 56px 0 72px;
}

.section {
    margin-bottom: 70px;
}

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

.section-kicker {
    display: inline-flex;
    color: var(--amber-700);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.section-title {
    margin: 0;
    color: var(--amber-900);
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.2;
}

.section-desc {
    margin: 8px 0 0;
    max-width: 720px;
    color: var(--muted);
    line-height: 1.8;
}

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

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

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

.movie-card {
    min-width: 0;
}

.movie-card a,
.category-card,
.rank-card {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--soft-shadow);
    border: 1px solid rgba(253, 230, 138, 0.55);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card a:hover,
.category-card:hover,
.rank-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
    border-color: rgba(217, 119, 6, 0.38);
}

.card-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, var(--amber-100), var(--orange-50));
}

.card-grid.featured .card-poster {
    aspect-ratio: 16 / 10;
}

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

.movie-card a:hover .card-poster img,
.category-card:hover img,
.rank-card:hover img {
    transform: scale(1.08);
}

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.76));
}

.badge,
.score-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #fff;
    background: var(--amber-600);
    font-weight: 900;
    font-size: 12px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.score-badge {
    left: 12px;
    right: auto;
    background: rgba(0, 0, 0, 0.7);
}

.card-body {
    padding: 18px;
}

.card-title {
    margin: 0 0 8px;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

.card-meta,
.rank-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: #7c2d12;
    font-size: 13px;
    font-weight: 700;
}

.search-panel {
    padding: 22px;
    border: 1px solid rgba(253, 230, 138, 0.65);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--soft-shadow);
    margin-bottom: 28px;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 14px;
}

.search-row input,
.search-row select {
    width: 100%;
    height: 48px;
    border: 1px solid rgba(217, 119, 6, 0.24);
    border-radius: 16px;
    padding: 0 16px;
    color: var(--ink);
    background: #fff;
    outline: none;
}

.search-row input:focus,
.search-row select:focus {
    border-color: var(--amber-600);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

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

.category-card {
    position: relative;
    min-height: 260px;
    display: flex;
    align-items: end;
    padding: 22px;
    color: #fff;
    isolation: isolate;
}

.category-card img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(120, 53, 15, 0.88));
}

.category-card h2,
.category-card h3 {
    margin: 0 0 8px;
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: #fff3d2;
    line-height: 1.65;
    font-size: 14px;
}

.page-hero {
    padding: 64px 0 40px;
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.22), transparent 34%), linear-gradient(180deg, var(--amber-50), var(--orange-50));
}

.page-hero h1 {
    margin: 0 0 14px;
    color: var(--amber-900);
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
    font-size: 18px;
}

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

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

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

.rank-card {
    display: grid;
    grid-template-columns: 96px 150px 1fr;
    align-items: center;
    gap: 18px;
    padding: 14px;
}

.rank-number {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-600), var(--orange-700));
    font-size: 24px;
    font-weight: 900;
}

.rank-thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 18px;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-card h2,
.rank-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #111827;
}

.rank-card p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.65;
}

.detail-shell {
    padding: 34px 0 74px;
}

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

.player-card,
.detail-card,
.side-card {
    border-radius: 28px;
    border: 1px solid rgba(253, 230, 138, 0.62);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--soft-shadow);
    overflow: hidden;
}

.watch-player {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #111827;
    cursor: pointer;
}

.watch-player video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #111827;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.42));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.watch-player.is-playing .player-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-trigger {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(217, 119, 6, 0.92);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.32);
    cursor: pointer;
    transition: transform 0.22s ease, background 0.22s ease;
}

.play-trigger:hover {
    transform: scale(1.08);
    background: var(--orange-700);
}

.play-trigger span {
    transform: translateX(3px);
    font-size: 34px;
    line-height: 1;
}

.detail-main {
    padding: 26px;
}

.detail-main h1 {
    margin: 0 0 14px;
    color: var(--amber-900);
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.detail-lead {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.85;
    margin: 18px 0 0;
}

.detail-section {
    padding: 26px;
    border-top: 1px solid rgba(253, 230, 138, 0.66);
}

.detail-section h2 {
    margin: 0 0 12px;
    color: var(--amber-900);
    font-size: 24px;
}

.detail-section p {
    margin: 0;
    color: #374151;
    line-height: 1.95;
}

.side-card {
    padding: 20px;
}

.side-card h2 {
    margin: 0 0 16px;
    color: var(--amber-900);
    font-size: 22px;
}

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

.related-item {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: var(--amber-50);
    transition: background 0.2s ease, transform 0.2s ease;
}

.related-item:hover {
    background: var(--amber-100);
    transform: translateX(4px);
}

.related-item img {
    width: 74px;
    height: 92px;
    object-fit: cover;
    border-radius: 14px;
}

.related-item strong {
    display: block;
    margin-bottom: 6px;
    color: #111827;
    line-height: 1.35;
}

.related-item span {
    color: var(--amber-800);
    font-size: 13px;
    font-weight: 800;
}

.site-footer {
    color: var(--amber-50);
    background: linear-gradient(180deg, var(--amber-900), #431407);
}

.footer-grid {
    max-width: var(--container);
    margin: 0 auto;
    padding: 48px 20px;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 28px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-weight: 900;
    font-size: 20px;
}

.site-footer p {
    margin: 0;
    color: var(--amber-200);
    line-height: 1.75;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 14px;
    color: var(--amber-100);
    font-size: 18px;
}

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

.footer-links a {
    color: var(--amber-200);
    font-size: 14px;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(253, 230, 138, 0.15);
    padding: 18px 20px;
    text-align: center;
    color: var(--amber-200);
    font-size: 14px;
}

.empty-state {
    display: none;
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    color: var(--amber-800);
    background: var(--amber-100);
    font-weight: 800;
}

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

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

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

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

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

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

@media (max-width: 720px) {
    .nav-shell {
        height: 62px;
        padding: 0 14px;
    }

    .brand-text {
        max-width: 230px;
    }

    .hero {
        min-height: 680px;
    }

    .hero-content {
        padding: 48px 16px 86px;
        gap: 24px;
    }

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

    .section-head {
        align-items: start;
        flex-direction: column;
    }

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

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

    .card-body {
        padding: 14px;
    }

    .rank-card {
        grid-template-columns: 52px 96px 1fr;
        gap: 12px;
    }

    .rank-number {
        width: 46px;
        height: 46px;
        border-radius: 16px;
        font-size: 18px;
    }

    .rank-card p {
        display: none;
    }

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

@media (max-width: 460px) {
    .card-grid,
    .card-grid.featured,
    .card-grid.compact,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .button-row {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
