:root {
    --bg: #f8fafc;
    --bg-soft: #eef2f7;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --dark-3: #334155;
    --text: #1f2937;
    --muted: #64748b;
    --line: #e2e8f0;
    --orange: #f97316;
    --orange-deep: #ea580c;
    --red: #ef4444;
    --white: #ffffff;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
    --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.10);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
}

.nav-wrap {
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.logo-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.35);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-weight: 600;
}

.main-nav a,
.mobile-nav a {
    color: rgba(255, 255, 255, 0.82);
    transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: #fb923c;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--white);
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    padding: 12px 24px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #0f172a;
}

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

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

.hero-slide {
    display: none;
    min-height: 620px;
    position: relative;
    color: var(--white);
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 55%, #0f172a 100%);
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.22;
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(249, 115, 22, 0.35), transparent 32%), linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.45));
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1) contrast(1.05);
}

.hero-inner {
    position: relative;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    gap: 60px;
}

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

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.14);
    border: 1px solid rgba(251, 146, 60, 0.25);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.hero-copy p {
    margin: 0;
    max-width: 720px;
    color: rgba(255, 255, 255, 0.78);
    font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags span,
.tag-row span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #fdba74;
    background: rgba(249, 115, 22, 0.12);
    font-size: 12px;
    font-weight: 700;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
    color: var(--white);
    background: var(--orange);
    box-shadow: 0 16px 30px rgba(249, 115, 22, 0.32);
}

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

.btn-ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.hero-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
    isolation: isolate;
}

.hero-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.68));
}

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

.hero-card span {
    position: absolute;
    left: 20px;
    bottom: 20px;
    z-index: 2;
    color: var(--white);
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.88);
    font-weight: 800;
}

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

.hero-controls button {
    width: 40px;
    height: 10px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    color: transparent;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-controls button.is-active {
    width: 70px;
    background: var(--orange);
}

.section {
    padding: 74px 0;
}

.section-dark {
    color: var(--white);
    background: linear-gradient(90deg, #1e293b, #0f172a);
}

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

.section-head h2 {
    margin: 12px 0 0;
    color: #1e293b;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
}

.section-head.light h2,
.section-head.light a {
    color: var(--white);
}

.section-head a {
    color: var(--orange-deep);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    height: 250px;
    overflow: hidden;
    background: #111827;
}

.compact-grid .poster-link,
.category-list .poster-link {
    height: 214px;
}

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

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.62));
}

.poster-badge,
.poster-mark {
    position: absolute;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
}

.poster-badge {
    left: 12px;
    top: 12px;
    background: rgba(249, 115, 22, 0.9);
}

.poster-mark {
    right: 12px;
    bottom: 12px;
    background: rgba(15, 23, 42, 0.78);
}

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

.movie-card h3 {
    margin: 0 0 10px;
    color: #1e293b;
    font-size: 18px;
    line-height: 1.35;
}

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

.movie-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 14px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

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

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

.category-card {
    display: block;
    min-height: 150px;
    padding: 24px;
    border-radius: 22px;
    color: var(--white);
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.9), rgba(239, 68, 68, 0.88));
    box-shadow: 0 18px 32px rgba(249, 115, 22, 0.2);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 40px rgba(249, 115, 22, 0.28);
}

.category-card span {
    display: block;
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 10px;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

.page-hero,
.detail-hero {
    position: relative;
    color: var(--white);
    background: radial-gradient(circle at 12% 20%, rgba(249, 115, 22, 0.32), transparent 30%), linear-gradient(90deg, #0f172a, #1e293b);
}

.page-hero {
    padding: 88px 0;
}

.page-hero h1 {
    margin: 14px 0 12px;
    font-size: clamp(36px, 6vw, 62px);
    line-height: 1.12;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(3, 170px);
    gap: 14px;
    align-items: end;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #0f172a;
    background: #f8fafc;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 142px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 14px;
}

.rank-number {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--orange), var(--red));
    font-size: 20px;
    font-weight: 900;
}

.rank-poster {
    overflow: hidden;
    height: 90px;
    border-radius: 14px;
    background: #111827;
}

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

.rank-content h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rank-content p {
    margin: 0;
    color: var(--muted);
}

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

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.18;
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.55));
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(2px) saturate(1.1);
}

.detail-head {
    position: relative;
    padding: 34px 0 60px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    margin-bottom: 34px;
}

.breadcrumb a:hover {
    color: #fb923c;
}

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

.detail-poster {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.detail-intro h1 {
    margin: 0 0 16px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.08;
}

.lead {
    max-width: 820px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 20px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.88);
    font-weight: 800;
}

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

.detail-main,
.side-card {
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.detail-main {
    padding: 24px;
}

.detail-main h2,
.side-card h2 {
    margin: 28px 0 12px;
    color: #111827;
    font-size: 26px;
}

.detail-main p {
    margin: 0 0 16px;
    color: #475569;
    font-size: 17px;
}

.player-card {
    overflow: hidden;
    border-radius: 22px;
    background: #020617;
    box-shadow: 0 20px 40px rgba(2, 6, 23, 0.28);
}

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    background: #020617;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.32), transparent 35%), linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.72));
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon {
    position: relative;
    z-index: 2;
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: var(--orange);
    font-size: 32px;
    box-shadow: 0 18px 35px rgba(249, 115, 22, 0.45);
}

.side-card {
    padding: 22px;
}

.side-card h2 {
    margin-top: 0;
}

.side-card dl {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 10px 16px;
    margin: 0 0 18px;
}

.side-card dt {
    color: #94a3b8;
    font-weight: 800;
}

.side-card dd {
    margin: 0;
    color: #334155;
    font-weight: 700;
}

.side-card a {
    color: var(--orange-deep);
}

.genre-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.genre-list li {
    padding: 7px 10px;
    border-radius: 999px;
    background: #fff7ed;
    color: var(--orange-deep);
    font-size: 13px;
    font-weight: 800;
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
    padding: 52px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
}

.footer-logo {
    color: var(--white);
    margin-bottom: 14px;
}

.site-footer p {
    margin: 0;
    max-width: 430px;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: var(--white);
}

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 36px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-size: 14px;
}

.is-hidden,
.movie-card.hidden,
.rank-item.hidden {
    display: none !important;
}

@media (max-width: 1024px) {
    .hero-inner,
    .detail-intro,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-card {
        display: none;
    }

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

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

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

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

    .mobile-toggle {
        display: block;
    }

    .hero-shell,
    .hero-slide,
    .hero-inner {
        min-height: 560px;
    }

    .hero-inner {
        align-items: center;
        gap: 0;
    }

    .hero-actions {
        gap: 10px;
    }

    .btn {
        width: 100%;
    }

    .section {
        padding: 52px 0;
    }

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

    .movie-grid,
    .compact-grid,
    .category-grid,
    .category-grid.large,
    .filter-panel,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 44px 94px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-number {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .rank-poster {
        height: 72px;
    }

    .detail-poster {
        max-width: 260px;
        height: 360px;
    }

    .detail-main {
        padding: 16px;
    }
}
