:root {
    --primary-50: #fef9ee;
    --primary-100: #fdf2d7;
    --primary-500: #f08d1f;
    --primary-600: #e17015;
    --primary-700: #bb5413;
    --primary-800: #954217;
    --secondary-50: #faf9f6;
    --secondary-100: #f5f3ec;
    --secondary-600: #a58a66;
    --accent-600: #df5015;
    --text-950: #111827;
    --text-700: #374151;
    --text-500: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
    --radius-xl: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text-950);
    background: linear-gradient(180deg, var(--primary-50), #ffffff 36%, #f9fafb 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--primary-800), var(--primary-700), var(--primary-600));
    box-shadow: 0 10px 30px rgba(149, 66, 23, 0.28);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.16);
    color: #fff2d7;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 21px;
    letter-spacing: 0.04em;
}

.brand-text em {
    font-size: 12px;
    font-style: normal;
    color: var(--primary-100);
    margin-top: 4px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    color: #ffffff;
    font-weight: 600;
}

.nav-links a {
    position: relative;
    opacity: 0.92;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    opacity: 1;
    transform: translateY(-1px);
}

.nav-links a.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 3px;
    border-radius: 999px;
    background: #ffffff;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    padding: 10px;
}

.mobile-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 999px;
    background: #ffffff;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-panel a {
    display: block;
    color: #ffffff;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.mobile-panel.is-open {
    display: block;
}

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

.hero {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: #030712;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.65s ease;
}

.hero-slide.is-active {
    opacity: 1;
    z-index: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.46) 46%, rgba(0, 0, 0, 0.16));
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    padding-bottom: 84px;
}

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

.hero-eyebrow,
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    color: #ffffff;
    font-weight: 700;
}

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

.hero p {
    font-size: 18px;
    color: #e5e7eb;
    line-height: 1.8;
    margin: 0 0 24px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 14px;
    padding: 13px 22px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    background: var(--primary-600);
    color: #ffffff;
    box-shadow: 0 16px 30px rgba(225, 112, 21, 0.34);
}

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

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

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

.hero-tags span,
.tag-row span {
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.tag-row span {
    background: var(--primary-100);
    color: var(--primary-700);
}

.hero-control {
    position: absolute;
    z-index: 4;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.48);
    cursor: pointer;
    font-size: 28px;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.7);
}

.hero-control.prev {
    left: 22px;
}

.hero-control.next {
    right: 22px;
}

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

.hero-dots button {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    transition: width 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.hero-dots button.is-active {
    width: 34px;
    background: #ffffff;
}

.section {
    padding: 72px 0;
}

.section-soft {
    background: linear-gradient(90deg, var(--primary-50), var(--secondary-50));
}

.section-gray {
    background: linear-gradient(180deg, #f3f4f6, #f9fafb);
}

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

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

.section-head p {
    margin: 10px 0 0;
    color: var(--text-500);
    max-width: 680px;
    line-height: 1.8;
}

.more-link {
    color: var(--primary-700);
    font-weight: 800;
    white-space: nowrap;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: radial-gradient(circle at 30% 15%, #f8c276, #953a17 48%, #111827 100%);
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.28s ease, opacity 0.2s ease;
}

.poster-wrap img.is-missing,
.category-cover img.is-missing,
.related-card img.is-missing,
.detail-poster img.is-missing,
.rank-poster img.is-missing {
    opacity: 0;
}

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

.score-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    min-width: 44px;
    text-align: center;
    border-radius: 999px;
    padding: 5px 9px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.64);
    backdrop-filter: blur(10px);
    font-weight: 800;
}

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

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--text-500);
    font-size: 12px;
    margin-bottom: 8px;
}

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

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

.movie-card p {
    margin: 0 0 12px;
    color: var(--text-500);
    font-size: 13px;
    line-height: 1.7;
}

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

.category-tile {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 18px;
    border-radius: var(--radius-xl);
    padding: 16px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}

.category-cover {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 18px;
    background: radial-gradient(circle at 20% 20%, var(--primary-500), var(--primary-800));
}

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

.category-tile h2 {
    margin: 0 0 8px;
    font-size: 21px;
}

.category-tile p {
    margin: 0 0 14px;
    color: var(--text-500);
    line-height: 1.75;
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mini-links a {
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--primary-700);
    background: var(--primary-100);
    font-size: 12px;
    font-weight: 700;
}

.rank-panel {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 28px;
    align-items: stretch;
}

.rank-feature {
    position: relative;
    min-height: 430px;
    border-radius: 30px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
    box-shadow: var(--shadow);
}

.rank-feature img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.78;
}

.rank-feature-content {
    position: absolute;
    inset: auto 0 0;
    padding: 34px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.07);
}

.rank-number {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: var(--primary-600);
    font-weight: 900;
}

.rank-title {
    font-weight: 800;
}

.rank-meta {
    color: var(--text-500);
    font-size: 12px;
    display: block;
    margin-top: 3px;
}

.rank-item strong {
    color: var(--primary-700);
}

.filter-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    padding: 18px;
    margin-bottom: 26px;
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--text-700);
    font-weight: 700;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
    color: var(--text-950);
    background: #ffffff;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(240, 141, 31, 0.15);
}

.detail-hero {
    background: #000000;
    padding: 36px 0;
}

.player-shell {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    overflow: hidden;
    background: #000000;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.player-shell.is-playing .player-overlay {
    opacity: 0;
}

.big-play {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(225, 112, 21, 0.92);
    font-size: 34px;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 14px 40px rgba(225, 112, 21, 0.35);
}

.player-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent);
}

.progress {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
    overflow: hidden;
    margin-bottom: 14px;
}

.progress-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--primary-600);
}

.control-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
}

.control-row button {
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
}

.control-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    padding: 42px 0 74px;
}

.info-card,
.related-panel {
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
    padding: 26px;
}

.info-card + .info-card {
    margin-top: 22px;
}

.breadcrumb {
    color: var(--text-500);
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--primary-700);
    font-weight: 700;
}

.detail-title {
    margin: 0 0 16px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    color: var(--text-500);
}

.detail-meta span {
    border-radius: 999px;
    padding: 7px 11px;
    background: #f3f4f6;
}

.lead {
    color: var(--text-700);
    font-size: 18px;
    line-height: 1.85;
}

.info-card h2,
.related-panel h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.info-card p {
    color: var(--text-700);
    line-height: 1.95;
    margin: 0;
}

.related-panel {
    position: sticky;
    top: 98px;
}

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

.related-card {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 12px;
    align-items: start;
}

.related-card img {
    width: 84px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
    background: radial-gradient(circle at 30% 20%, var(--primary-500), var(--primary-800));
}

.related-card h3 {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.4;
}

.related-card p {
    margin: 0;
    color: var(--text-500);
    font-size: 12px;
}

.site-footer {
    background: #111827;
    color: #d1d5db;
    padding: 54px 0 26px;
}

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

.footer-brand {
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 12px;
}

.site-footer p {
    margin: 0;
    color: #9ca3af;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 17px;
}

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

.footer-links a:hover {
    color: var(--primary-500);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #6b7280;
    font-size: 13px;
}

.empty-state {
    display: none;
    text-align: center;
    color: var(--text-500);
    padding: 42px 0;
}

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

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

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

    .related-panel {
        position: static;
    }

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

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

    .mobile-toggle {
        display: block;
    }

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

    .hero-content {
        padding-bottom: 74px;
    }

    .hero-control {
        display: none;
    }

    .section {
        padding: 52px 0;
    }

    .section-head {
        display: block;
    }

    .more-link {
        display: inline-block;
        margin-top: 12px;
    }

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

    .category-tile {
        grid-template-columns: 96px 1fr;
        padding: 12px;
    }

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

    .detail-hero {
        padding: 16px 0;
    }

    .player-shell {
        border-radius: 0;
    }

    .info-card,
    .related-panel {
        padding: 20px;
    }
}
