:root {
    color-scheme: light;
    --bg: #f8fafc;
    --ink: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --panel: #ffffff;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --amber: #f59e0b;
    --orange: #ea580c;
    --red: #ef4444;
    --radius: 18px;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
    line-height: 1.6;
}

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, #0f172a, #1e293b 48%, #0f172a);
    color: #fff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.28);
}

.nav-wrap {
    max-width: 1280px;
    height: 76px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    color: white;
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
}

.brand-copy strong {
    display: block;
    font-size: 24px;
    line-height: 1;
    letter-spacing: 0.03em;
    background: linear-gradient(90deg, #fbbf24, #fb923c);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.brand-copy em {
    display: block;
    margin-top: 4px;
    color: #94a3b8;
    font-size: 12px;
    font-style: normal;
}

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

.nav-link,
.mobile-link {
    display: inline-flex;
    align-items: center;
    border-radius: 12px;
    padding: 10px 14px;
    color: #d1d5db;
    transition: 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.active,
.mobile-link.active {
    color: #fff;
    background: var(--amber);
    box-shadow: 0 12px 24px rgba(245, 158, 11, 0.24);
}

.top-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 14px;
    background: rgba(51, 65, 85, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.top-search input,
.mobile-search input,
.filter-search input {
    width: 200px;
    border: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font: inherit;
}

.top-search input::placeholder,
.mobile-search input::placeholder {
    color: #94a3b8;
}

.top-search button,
.mobile-search button,
.filter-search button {
    border: 0;
    border-radius: 10px;
    padding: 8px 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    cursor: pointer;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    padding: 10px 12px;
    color: white;
    background: rgba(51, 65, 85, 0.9);
    font-size: 20px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 14px 24px 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: #111827;
}

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

.mobile-panel nav {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.page-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px 56px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
    align-items: stretch;
    margin: 24px auto 38px;
}

.hero-slider {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 5s ease;
}

.hero-slide.active img {
    transform: scale(1.12);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.48) 54%, rgba(2, 6, 23, 0.18)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.04) 55%);
}

.hero-content {
    position: absolute;
    left: clamp(24px, 5vw, 70px);
    right: clamp(24px, 8vw, 110px);
    bottom: clamp(38px, 9vw, 92px);
    color: #fff;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 7px 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.hero-content h1 {
    max-width: 760px;
    margin: 18px 0 14px;
    font-size: clamp(36px, 7vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 700px;
    margin: 0;
    color: #e5e7eb;
    font-size: clamp(16px, 2vw, 22px);
}

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

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

.hero-tags span,
.tag-row span,
.rank-tags span,
.detail-tags span {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 9px;
    color: #92400e;
    background: #fffbeb;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #fff;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.primary-btn,
.ghost-btn,
.rail-link,
.row-play,
.detail-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 800;
    transition: 0.2s ease;
}

.primary-btn,
.row-play,
.detail-link {
    color: white;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.28);
}

.ghost-btn {
    color: white;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(10px);
}

.primary-btn:hover,
.ghost-btn:hover,
.rail-link:hover,
.row-play:hover,
.detail-link:hover {
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    color: white;
    background: rgba(15, 23, 42, 0.62);
    font-size: 34px;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

.hero-dots {
    position: absolute;
    z-index: 6;
    left: clamp(24px, 5vw, 70px);
    bottom: 24px;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
    transition: 0.2s ease;
}

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

.hero-rail {
    border-radius: 28px;
    padding: 28px;
    color: #fff;
    background: radial-gradient(circle at 10% 10%, rgba(245, 158, 11, 0.2), transparent 35%), linear-gradient(180deg, #111827, #020617);
    box-shadow: var(--shadow);
}

.hero-rail h2 {
    margin: 18px 0;
    font-size: 28px;
    line-height: 1.15;
}

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

.hero-mini {
    display: flex;
    gap: 12px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.06);
    transition: 0.2s ease;
}

.hero-mini:hover {
    border-color: rgba(245, 158, 11, 0.65);
    transform: translateX(4px);
}

.hero-mini img {
    width: 86px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
    background: #111827;
}

.hero-mini strong,
.hero-mini em {
    display: block;
}

.hero-mini strong {
    color: #fff;
    font-size: 15px;
    line-height: 1.35;
}

.hero-mini em {
    margin-top: 4px;
    color: #cbd5e1;
    font-size: 12px;
    font-style: normal;
}

.rail-link {
    width: 100%;
    margin-top: 20px;
    color: #fff;
    background: rgba(245, 158, 11, 0.92);
}

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

.section-heading h1,
.section-heading h2 {
    margin: 12px 0 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.section-heading p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
}

.section-heading a {
    color: #d97706;
    font-weight: 800;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    border-radius: 24px;
    padding: 24px;
    color: #fff;
    background: linear-gradient(135deg, #111827, #334155);
    box-shadow: var(--shadow);
}

.category-card:nth-child(2) {
    background: linear-gradient(135deg, #7c2d12, #f59e0b);
}

.category-card:nth-child(3) {
    background: linear-gradient(135deg, #172554, #1d4ed8);
}

.category-card:nth-child(4) {
    background: linear-gradient(135deg, #312e81, #7c3aed);
}

.category-card span {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 9px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 12px;
    font-weight: 800;
}

.category-card h2 {
    margin: 18px 0 10px;
    font-size: 26px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: var(--shadow);
}

.movie-card.is-hidden,
.rank-row.is-hidden {
    display: none;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #111827;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), transparent 55%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .poster-shade {
    opacity: 1;
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    transform: translate(-50%, -50%) scale(0.82);
    border-radius: 50%;
    color: #fff;
    background: var(--amber);
    opacity: 0;
    transition: 0.2s ease;
}

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

.year-mark,
.rank-badge {
    position: absolute;
    top: 12px;
    border-radius: 999px;
    padding: 5px 9px;
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.year-mark {
    right: 12px;
}

.rank-badge {
    left: 12px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.card-copy {
    padding: 16px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.card-meta a {
    color: #d97706;
}

.card-copy h2 {
    margin: 8px 0;
    font-size: 18px;
    line-height: 1.35;
}

.card-copy h2 a:hover,
.rank-title:hover,
.breadcrumb a:hover {
    color: #d97706;
}

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

.filter-panel {
    display: grid;
    gap: 14px;
    margin: 18px 0 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.filter-search {
    display: flex;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 8px;
    color: var(--ink);
    background: #f8fafc;
}

.filter-search input {
    flex: 1;
    width: auto;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 13px;
    color: #475569;
    background: white;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 110px 62px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 12px 16px 12px 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.rank-poster {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 16px;
    background: #111827;
}

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

.rank-number strong {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-size: 18px;
}

.rank-title {
    display: inline-flex;
    margin-bottom: 4px;
    font-size: 19px;
    font-weight: 900;
}

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

.page-hero {
    overflow: hidden;
    border-radius: 28px;
    padding: clamp(28px, 6vw, 64px);
    color: #fff;
    background:
        radial-gradient(circle at 90% 10%, rgba(245, 158, 11, 0.26), transparent 32%),
        linear-gradient(135deg, #0f172a, #1e293b 58%, #111827);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    max-width: 900px;
    margin: 18px 0 10px;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.06;
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: #d1d5db;
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 20px;
    color: var(--muted);
    font-size: 14px;
}

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

.player-card,
.detail-card,
.related-card {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.player-card {
    overflow: hidden;
}

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

.player-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.22), rgba(0, 0, 0, 0.72));
    cursor: pointer;
}

.player-overlay span {
    display: grid;
    width: 88px;
    height: 88px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 20px 60px rgba(245, 158, 11, 0.28);
    font-size: 34px;
}

.player-overlay strong {
    font-size: 18px;
}

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

.player-copy,
.detail-card,
.related-card {
    padding: 22px;
}

.player-copy h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #475569;
    font-weight: 700;
}

.detail-meta span {
    border-radius: 999px;
    padding: 6px 10px;
    background: #f1f5f9;
}

.detail-card h2,
.related-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-card p {
    margin: 0 0 16px;
    color: #334155;
    font-size: 16px;
}

.sidebar-poster {
    overflow: hidden;
    border-radius: 24px;
    background: #111827;
    box-shadow: var(--shadow);
}

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

.sidebar-block {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 18px;
    background: #fff;
}

.sidebar-block h2 {
    margin: 0 0 12px;
    font-size: 20px;
}

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

.sidebar-links a {
    border-radius: 13px;
    padding: 10px 12px;
    color: #334155;
    background: #f8fafc;
    font-weight: 700;
}

.sidebar-links a:hover {
    color: #fff;
    background: var(--amber);
}

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

.related-item {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.related-item img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: #111827;
}

.related-item span {
    display: block;
    padding: 10px;
    font-weight: 800;
    line-height: 1.35;
}

.site-footer {
    color: #cbd5e1;
    background: #020617;
    margin-top: 40px;
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px;
    display: grid;
    grid-template-columns: 1fr 220px 220px;
    gap: 28px;
}

.footer-brand {
    color: #f59e0b;
    font-size: 26px;
    font-weight: 900;
}

.footer-grid p {
    max-width: 560px;
    margin: 12px 0 0;
    color: #94a3b8;
}

.footer-grid h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 16px;
}

.footer-grid a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
    color: #94a3b8;
}

.footer-grid a:hover {
    color: #f59e0b;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    padding: 18px 24px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

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

    .hero-rail {
        display: none;
    }

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

    .desktop-nav,
    .top-search {
        display: none;
    }

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

@media (max-width: 820px) {
    .nav-wrap {
        height: 68px;
        padding: 0 16px;
    }

    .brand-copy strong {
        font-size: 20px;
    }

    .page-main {
        padding: 20px 16px 42px;
    }

    .hero-slider {
        min-height: 510px;
        border-radius: 22px;
    }

    .hero-content {
        left: 22px;
        right: 22px;
        bottom: 64px;
    }

    .hero-arrow {
        display: none;
    }

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

    .rank-row {
        grid-template-columns: 88px 42px minmax(0, 1fr);
        gap: 12px;
    }

    .row-play {
        grid-column: 1 / -1;
    }

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

@media (max-width: 520px) {
    .brand-copy em {
        display: none;
    }

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

    .hero-content h1,
    .page-hero h1 {
        font-size: 34px;
    }

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

    .section-heading {
        display: block;
    }

    .mobile-search {
        align-items: stretch;
    }

    .mobile-search input {
        width: 100%;
    }
}
