:root {
    color-scheme: light;
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --dark: #0f172a;
    --dark-2: #111827;
    --amber: #f59e0b;
    --amber-2: #f97316;
    --amber-soft: rgba(245, 158, 11, 0.14);
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    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;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

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

img {
    display: block;
    width: 100%;
    background: #111827;
}

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(16px);
}

.header-inner {
    max-width: 1280px;
    height: 72px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--amber-2));
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.28);
}

.brand-name {
    font-size: 20px;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links > a,
.nav-menu-button {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 15px;
    border-radius: 999px;
    color: #475569;
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-links > a:hover,
.nav-menu:hover .nav-menu-button,
.nav-links > a.active {
    color: #92400e;
    background: var(--amber-soft);
}

.nav-menu {
    position: relative;
}

.nav-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 220px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.nav-menu:hover .nav-menu-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu-link {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: #475569;
}

.nav-menu-link:hover {
    background: #f8fafc;
    color: #b45309;
}

.mobile-toggle {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 0 10px;
}

.mobile-toggle span {
    height: 2px;
    background: #0f172a;
    border-radius: 2px;
}

.mobile-panel {
    display: none;
    padding: 12px 24px 20px;
    border-top: 1px solid var(--line);
    background: #fff;
}

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

.mobile-panel a {
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
}

.hero-section {
    position: relative;
    overflow: hidden;
    min-height: 680px;
    background: linear-gradient(135deg, #0f172a 0%, #111827 45%, #1e293b 100%);
    color: #fff;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.26), transparent 32%),
        radial-gradient(circle at 82% 15%, rgba(249, 115, 22, 0.18), transparent 28%),
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: auto, auto, 44px 44px, 44px 44px;
    opacity: 0.95;
}

.hero-inner {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 86px 24px 72px;
}

.hero-slide {
    display: none;
    min-height: 470px;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
    gap: 60px;
    align-items: center;
}

.hero-slide.active {
    display: grid;
    animation: fadeUp 0.55s ease both;
}

.eyebrow,
.section-heading span,
.rank-copy span,
.page-hero span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 13px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.22);
    font-size: 14px;
    font-weight: 700;
}

.hero-copy h1 {
    max-width: 760px;
    margin: 24px 0 20px;
    font-size: clamp(42px, 7vw, 74px);
    line-height: 1.04;
    letter-spacing: -0.055em;
    background: linear-gradient(90deg, #fde68a, #fb923c, #fde68a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.hero-actions,
.detail-info .btn-primary {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

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

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--amber-2));
    box-shadow: 0 16px 34px rgba(249, 115, 22, 0.24);
}

.btn-secondary {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

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

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

.hero-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 650;
}

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

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 32px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.34);
    transform: rotate(1.2deg);
}

.hero-poster img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-poster-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.42));
}

.hero-category {
    position: absolute;
    right: 36px;
    bottom: 135px;
    padding: 11px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fde68a;
    font-weight: 800;
    backdrop-filter: blur(14px);
}

.hero-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 26px;
}

.hero-dot {
    width: 34px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.28);
}

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

.global-search {
    position: relative;
    max-width: 780px;
    margin: 34px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
}

.global-search input,
.filter-bar input {
    width: 100%;
    border: 0;
    outline: none;
    border-radius: 16px;
    padding: 14px 16px;
    color: #0f172a;
    background: #fff;
}

.global-search button {
    border: 0;
    border-radius: 16px;
    padding: 0 20px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--amber), var(--amber-2));
    cursor: pointer;
}

.search-results {
    position: absolute;
    left: 10px;
    right: 10px;
    top: calc(100% + 8px);
    z-index: 5;
    display: none;
    max-height: 340px;
    overflow: auto;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
}

.search-results.open {
    display: block;
}

.search-results a {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 12px 14px;
    color: #0f172a;
    border-bottom: 1px solid var(--line);
}

.search-results small {
    color: var(--muted);
}

.category-strip,
.content-section,
.rank-entry,
.detail-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 24px 0;
}

.compact-heading {
    margin-bottom: 22px;
}

.section-heading {
    margin-bottom: 30px;
}

.section-heading span,
.page-hero span,
.rank-copy span {
    color: #b45309;
    background: #fffbeb;
    border-color: #fde68a;
}

.section-heading h2,
.page-hero h1,
.rank-copy h2 {
    margin: 12px 0 8px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.rank-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

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

.category-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 82px;
    padding: 18px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card span {
    font-weight: 800;
}

.category-card small {
    color: #b45309;
    background: #fffbeb;
    padding: 5px 9px;
    border-radius: 999px;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

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

.poster-play {
    position: absolute;
    left: 14px;
    bottom: 14px;
    min-height: 34px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    background: rgba(245, 158, 11, 0.92);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    min-width: 38px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber), var(--amber-2));
    box-shadow: 0 10px 22px rgba(249, 115, 22, 0.24);
}

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

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.card-meta span,
.detail-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f8fafc;
}

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

.movie-card h3 a:hover {
    color: #d97706;
}

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

.tag-list span {
    color: #92400e;
    background: #fffbeb;
}

.rank-entry {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
    gap: 36px;
    align-items: center;
    margin-top: 72px;
    padding-top: 0;
}

.rank-copy {
    min-height: 420px;
    padding: 42px;
    border-radius: var(--radius-xl);
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #111827 55%, #312e81);
    box-shadow: var(--shadow);
}

.rank-copy span {
    color: #fde68a;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.14);
}

.rank-copy p {
    color: #cbd5e1;
    margin-bottom: 28px;
}

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

.rank-list a {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.rank-list strong {
    color: #d97706;
    font-size: 20px;
}

.rank-list span {
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
}

.page-hero {
    padding: 82px 24px;
}

.page-hero > div {
    max-width: 1280px;
    margin: 0 auto;
}

.page-hero p {
    max-width: 760px;
    color: #cbd5e1;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.category-tabs a {
    padding: 10px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: #475569;
}

.category-tabs a.active,
.category-tabs a:hover {
    color: #92400e;
    background: #fffbeb;
    border-color: #fde68a;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 24px;
}

.filter-bar input {
    border: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.filter-bar span {
    color: var(--muted);
    font-weight: 800;
}

.detail-hero {
    min-height: 560px;
}

.detail-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.1);
}

.detail-layout {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 78px 24px;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

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

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

.breadcrumbs a:hover {
    color: #fde68a;
}

.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 5.6vw, 70px);
    line-height: 1.04;
    letter-spacing: -0.055em;
}

.detail-meta span {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.12);
}

.detail-one-line {
    max-width: 820px;
    margin: 22px 0 0;
    color: #e2e8f0;
    font-size: 20px;
}

.player-section {
    max-width: 1120px;
    margin: -70px auto 0;
    position: relative;
    z-index: 3;
    padding: 0 24px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 32px 82px rgba(2, 6, 23, 0.32);
}

.video-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.28));
    cursor: pointer;
}

.play-layer span {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    background: linear-gradient(135deg, var(--amber), var(--amber-2));
    box-shadow: 0 18px 42px rgba(249, 115, 22, 0.28);
    font-size: 34px;
}

.play-layer.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

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

.story-card {
    padding: 28px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.story-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.story-card p {
    margin: 0;
    color: #334155;
}

.related-section {
    padding-top: 56px;
}

.site-footer {
    margin-top: 90px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #111827);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 52px 24px;
    display: grid;
    grid-template-columns: 1.1fr 1fr 0.8fr;
    gap: 36px;
}

.footer-brand {
    color: #fff;
    margin-bottom: 16px;
}

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

.site-footer p {
    margin: 0;
    max-width: 420px;
    color: #94a3b8;
}

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

.footer-links a {
    padding: 8px 11px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.06);
}

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

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

.hidden-card {
    display: none;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

    .mobile-toggle {
        display: flex;
    }

    .hero-slide,
    .rank-entry,
    .detail-layout,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-slide {
        gap: 34px;
    }

    .hero-poster {
        max-width: 360px;
        margin: 0 auto;
    }

    .hero-category {
        position: static;
        display: inline-flex;
        margin-top: 18px;
    }

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

    .detail-poster {
        max-width: 310px;
    }

    .player-section {
        margin-top: -34px;
    }
}

@media (max-width: 580px) {
    .header-inner {
        height: 66px;
        padding: 0 16px;
    }

    .brand-name {
        font-size: 18px;
    }

    .hero-inner {
        padding: 56px 16px 50px;
    }

    .global-search,
    .filter-bar {
        grid-template-columns: 1fr;
    }

    .category-strip,
    .content-section,
    .rank-entry,
    .detail-content {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .rank-list a {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .rank-list em {
        grid-column: 2;
    }

    .detail-layout {
        padding: 50px 16px 74px;
    }

    .footer-bottom {
        flex-direction: column;
    }
}
