:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --orange: #f97316;
    --amber: #f59e0b;
    --cyan: #06b6d4;
    --emerald: #10b981;
    --rose: #f43f5e;
    --radius: 22px;
    --shadow: 0 22px 70px rgba(15, 23, 42, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
}

body,
button,
input {
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: #fff;
    background: linear-gradient(90deg, var(--slate-950), var(--slate-800), var(--slate-950));
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.32);
}

.header-inner {
    width: min(1240px, calc(100% - 32px));
    min-height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.logo-icon {
    width: 36px;
    height: 36px;
    fill: none;
    stroke: var(--orange);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 12px rgba(249, 115, 22, 0.45));
}

.brand span {
    background: linear-gradient(90deg, #fb923c, #facc15, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    padding: 10px 15px;
    border-radius: 12px;
    color: #dbeafe;
    transition: background 0.24s ease, color 0.24s ease, transform 0.24s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fff;
    background: rgba(249, 115, 22, 0.95);
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.14);
    color: #fff;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.mobile-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
}

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

.mobile-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: #e2e8f0;
}

.mobile-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
}

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

main {
    min-height: 70vh;
}

.hero-section {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.35), transparent 30%), linear-gradient(135deg, #020617 0%, #0f172a 45%, #111827 100%);
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 78% 22%, rgba(6, 182, 212, 0.22), transparent 28%), radial-gradient(circle at 22% 80%, rgba(245, 158, 11, 0.2), transparent 28%);
}

.hero-inner {
    position: relative;
    width: min(1240px, calc(100% - 32px));
    min-height: 680px;
    margin: 0 auto;
    padding: 62px 0 42px;
}

.hero-slider {
    position: relative;
    min-height: 500px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.62fr);
    align-items: center;
    gap: 48px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 7px 13px;
    border: 1px solid rgba(251, 146, 60, 0.45);
    border-radius: 999px;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.14);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-copy h1 {
    margin: 22px 0 18px;
    font-size: clamp(42px, 6vw, 82px);
    line-height: 1.02;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero-copy p {
    width: min(720px, 100%);
    margin: 0;
    color: #cbd5e1;
    font-size: 18px;
}

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

.hero-tags {
    margin: 24px 0 0;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    background: rgba(255, 255, 255, 0.1);
    color: #e0f2fe;
}

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

.primary-button,
.ghost-button,
.section-more,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.primary-button {
    min-height: 46px;
    padding: 0 22px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 16px 34px rgba(249, 115, 22, 0.35);
}

.ghost-button {
    min-height: 46px;
    padding: 0 18px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    aspect-ratio: 3 / 4;
    background: rgba(15, 23, 42, 0.58);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.38);
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    z-index: 2;
    pointer-events: none;
}

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

.hero-poster:hover img {
    transform: scale(1.06);
}

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 3;
    padding: 8px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(249, 115, 22, 0.92);
    font-weight: 900;
}

.hero-controls {
    display: grid;
    grid-template-columns: auto minmax(260px, 440px);
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 8px;
}

.hero-dots {
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 36px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24);
}

.hero-dot.is-active {
    background: linear-gradient(90deg, var(--orange), var(--amber));
}

.hero-search,
.page-search {
    display: flex;
    overflow: hidden;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
}

.hero-search input,
.page-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    padding: 0 16px;
    color: #fff;
    background: transparent;
}

.hero-search input::placeholder,
.page-search input::placeholder {
    color: rgba(255, 255, 255, 0.68);
}

.hero-search button,
.page-search button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    font-weight: 900;
}

.hero-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.hero-category-links a {
    padding: 9px 13px;
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.home-rank-strip {
    width: min(1240px, calc(100% - 32px));
    margin: -34px auto 24px;
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.home-rank-strip div {
    padding: 22px;
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
    box-shadow: var(--shadow);
}

.home-rank-strip span {
    display: block;
    color: #fdba74;
    font-size: 13px;
    font-weight: 900;
}

.home-rank-strip strong {
    display: block;
    margin: 5px 0 10px;
    font-size: 20px;
}

.home-rank-strip a {
    color: #67e8f9;
    font-weight: 800;
}

.content-section {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 56px 0;
}

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

.section-heading h2,
.page-hero h1,
.movie-article h1 {
    margin: 0;
    color: var(--ink);
    font-weight: 950;
    letter-spacing: -0.04em;
}

.section-heading h2 {
    font-size: clamp(28px, 3vw, 42px);
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more,
.text-link {
    color: var(--orange);
    font-size: 15px;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.09);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 26px 66px rgba(15, 23, 42, 0.16);
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    display: block;
    aspect-ratio: 3 / 4;
    background: #111827;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent 58%);
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
}

.play-chip {
    left: 12px;
    bottom: 12px;
    padding: 6px 10px;
    background: rgba(249, 115, 22, 0.92);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .play-chip {
    opacity: 1;
    transform: translateY(0);
}

.rank-badge {
    top: 10px;
    left: 10px;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--orange), var(--rose));
    box-shadow: 0 12px 24px rgba(244, 63, 94, 0.32);
}

.card-body {
    padding: 15px;
}

.card-body h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
    color: var(--ink);
}

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

.card-meta {
    margin: 7px 0 8px;
    color: var(--muted);
    font-size: 13px;
}

.card-desc {
    margin: 0 0 12px;
    color: #475569;
    font-size: 14px;
}

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

.category-card {
    min-height: 150px;
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(145deg, #fff, #f1f5f9);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.78);
}

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

.category-card span {
    color: var(--muted);
    font-size: 14px;
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.rank-row {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 15px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.rank-row span {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    font-weight: 950;
}

.rank-row em {
    color: var(--muted);
    font-style: normal;
}

.page-hero {
    color: #fff;
    background: radial-gradient(circle at 20% 10%, rgba(249, 115, 22, 0.34), transparent 32%), linear-gradient(135deg, #020617, #172033 52%, #111827);
}

.slim-hero {
    width: 100%;
    min-height: 320px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 28px;
    align-items: end;
    padding: 70px max(16px, calc((100% - 1240px) / 2)) 54px;
}

.page-hero h1 {
    color: #fff;
    font-size: clamp(40px, 5vw, 70px);
    margin: 18px 0 12px;
}

.page-hero p {
    width: min(760px, 100%);
    margin: 0;
    color: #cbd5e1;
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    color: #cbd5e1;
}

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

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
    padding: 12px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.filter-bar input {
    flex: 1;
    min-width: 230px;
    border: 1px solid var(--line);
    outline: 0;
    border-radius: 999px;
    padding: 11px 16px;
}

.filter-bar button {
    border: 0;
    border-radius: 999px;
    padding: 10px 15px;
    color: #475569;
    background: #f1f5f9;
    font-weight: 800;
}

.filter-bar button.is-active,
.filter-bar button:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
}

.empty-state {
    display: none;
    margin: 34px 0 0;
    padding: 24px;
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
    background: #fff;
}

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

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

.category-overview-card {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 22px;
    padding: 18px;
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow);
}

.overview-cover {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    overflow: hidden;
    border-radius: 20px;
    background: #111827;
}

.overview-cover img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.category-overview-card h2 {
    margin: 6px 0 8px;
    font-size: 26px;
}

.category-overview-card p {
    margin: 0 0 18px;
    color: var(--muted);
}

.detail-page {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 20px;
}

.detail-breadcrumb {
    margin: 0 0 22px;
    color: #475569;
}

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

.detail-main,
.detail-side {
    display: grid;
    gap: 22px;
}

.player-panel,
.movie-article,
.side-card,
.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--shadow);
}

.video-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-position: center;
    background-size: cover;
    cursor: pointer;
    transition: opacity 0.32s ease, visibility 0.32s ease;
}

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

.player-start {
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 20px 48px rgba(249, 115, 22, 0.42);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.player-start span {
    width: 0;
    height: 0;
    margin-left: 6px;
    border-top: 17px solid transparent;
    border-bottom: 17px solid transparent;
    border-left: 25px solid #fff;
}

.movie-article {
    padding: clamp(22px, 4vw, 38px);
}

.movie-article h1 {
    font-size: clamp(34px, 4vw, 58px);
    margin: 18px 0 8px;
}

.detail-meta {
    color: var(--muted);
    margin: 0 0 18px;
}

.detail-tags {
    margin-bottom: 28px;
}

.movie-article h2 {
    margin: 26px 0 10px;
    font-size: 24px;
}

.movie-article p {
    color: #334155;
    font-size: 17px;
}

.detail-poster {
    display: block;
    background: #111827;
}

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

.side-card {
    padding: 22px;
}

.side-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.side-card p {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin: 0;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.side-card p:last-child {
    border-bottom: 0;
}

.side-card strong {
    color: var(--muted);
}

.mini-rank a {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    color: #334155;
    font-weight: 700;
}

.mini-rank a:hover {
    color: var(--orange);
}

.site-footer {
    margin-top: 48px;
    color: #cbd5e1;
    background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 30px;
}

.site-footer h2,
.site-footer h3 {
    color: #fff;
    margin: 0 0 14px;
}

.site-footer p {
    margin: 0;
    color: #94a3b8;
}

.site-footer a {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

.site-footer a:hover {
    color: #fdba74;
}

.footer-bottom {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    color: #94a3b8;
}

.search-card.is-hidden {
    display: none;
}

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

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

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-side {
        grid-template-columns: 280px 1fr;
    }
}

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

    .mobile-toggle {
        display: inline-flex;
    }

    .hero-inner {
        min-height: auto;
        padding-top: 42px;
    }

    .hero-slider {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 26px;
        align-content: start;
    }

    .hero-poster {
        width: min(360px, 100%);
        margin: 0 auto;
    }

    .hero-controls,
    .slim-hero,
    .home-rank-strip,
    .category-overview-card,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .home-rank-strip {
        margin-top: 18px;
    }

    .movie-grid,
    .compact-grid,
    .category-grid,
    .category-overview-grid,
    .rank-list,
    .detail-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .header-inner,
    .mobile-nav,
    .content-section,
    .detail-page,
    .footer-grid,
    .footer-bottom,
    .home-rank-strip {
        width: min(100% - 24px, 1240px);
    }

    .brand {
        font-size: 18px;
    }

    .hero-copy h1 {
        font-size: 42px;
    }

    .hero-search,
    .page-search,
    .filter-bar {
        border-radius: 18px;
        flex-direction: column;
        align-items: stretch;
    }

    .hero-search input,
    .page-search input {
        min-height: 42px;
    }

    .movie-grid,
    .compact-grid,
    .category-grid,
    .category-overview-grid,
    .rank-list,
    .detail-side {
        grid-template-columns: 1fr;
    }

    .overview-cover img {
        height: 120px;
    }
}
