:root {
    color-scheme: light;
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #fff7ed;
    --text: #111827;
    --muted: #64748b;
    --muted-2: #94a3b8;
    --line: rgba(15, 23, 42, 0.08);
    --amber: #d97706;
    --amber-light: #f59e0b;
    --amber-soft: rgba(245, 158, 11, 0.14);
    --red: #ef4444;
    --blue: #2563eb;
    --cyan: #06b6d4;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    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", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #fff7ed 0, #f8fafc 420px, #f8fafc 100%);
    min-height: 100vh;
}

body.menu-open {
    overflow: hidden;
}

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

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

.poster-hidden {
    opacity: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: white;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--amber-light), var(--red));
    box-shadow: 0 14px 28px rgba(217, 119, 6, 0.28);
}

.brand-text {
    font-size: 24px;
    color: #1f2937;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
}

.main-nav a,
.mobile-nav a {
    color: #4b5563;
    font-weight: 700;
    font-size: 15px;
    padding: 10px 13px;
    border-radius: 12px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.mobile-nav a:hover {
    color: #92400e;
    background: var(--amber-soft);
    transform: translateY(-1px);
}

.menu-toggle {
    width: 44px;
    height: 44px;
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    border: 0;
    border-radius: 14px;
    background: var(--amber-soft);
    cursor: pointer;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    margin: 0 auto;
    border-radius: 999px;
    background: #92400e;
}

.mobile-nav {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.mobile-nav.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.hero-shell {
    position: relative;
    min-height: 630px;
    overflow: hidden;
    background: #111827;
}

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

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

.hero-bg,
.hero-bg img,
.hero-shade {
    position: absolute;
    inset: 0;
}

.hero-bg {
    background:
        radial-gradient(circle at 78% 18%, rgba(245, 158, 11, 0.36), transparent 28%),
        radial-gradient(circle at 14% 80%, rgba(37, 99, 235, 0.28), transparent 32%),
        linear-gradient(135deg, #111827, #1f2937 48%, #020617);
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.28;
    filter: saturate(1.18) contrast(1.08);
}

.hero-shade {
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.25) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0) 0, rgba(2, 6, 23, 0.38) 100%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 32px));
    min-height: 630px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 56px;
    padding: 80px 0;
}

.hero-copy {
    color: white;
}

.eyebrow {
    margin: 0 0 14px;
    color: #fbbf24;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow.dark {
    color: var(--amber);
}

.hero-copy h1,
.page-hero h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.07em;
}

.hero-desc,
.page-hero p {
    max-width: 720px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
}

.hero-tags,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

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

.hero-tags span,
.detail-meta span,
.card-meta span {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 800;
}

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

.primary-btn,
.ghost-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.primary-btn {
    color: #111827;
    padding: 0 22px;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 18px 35px rgba(249, 115, 22, 0.28);
}

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

.primary-btn.full {
    width: 100%;
}

.ghost-btn {
    color: white;
    padding: 0 22px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    border-radius: 30px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(37, 99, 235, 0.22)),
        #111827;
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.46);
    transform: rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    border-radius: 999px;
    color: white;
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(10px);
    padding: 10px 14px;
    font-weight: 900;
}

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

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

.hero-dot.active {
    background: #fbbf24;
}

.section,
.category-overview-block,
.detail-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0;
}

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

.center-head {
    display: block;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.section-head h2,
.category-overview-block h2,
.related-panel h2,
.detail-copy h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.05em;
}

.section-head p,
.center-head p {
    color: var(--muted);
    line-height: 1.8;
}

.text-link {
    color: #92400e;
    min-height: 40px;
    padding: 0 16px;
    background: var(--amber-soft);
}

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

.category-card {
    position: relative;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    overflow: hidden;
    border-radius: var(--radius);
    padding: 22px;
    color: white;
    background:
        radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.28), transparent 32%),
        linear-gradient(135deg, #1f2937, #92400e 52%, #f97316);
    box-shadow: var(--shadow);
}

.category-card:nth-child(2n) {
    background:
        radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.24), transparent 32%),
        linear-gradient(135deg, #111827, #2563eb 55%, #06b6d4);
}

.category-card:nth-child(3n) {
    background:
        radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.26), transparent 32%),
        linear-gradient(135deg, #111827, #7c3aed 50%, #ef4444);
}

.category-card span {
    position: relative;
    z-index: 1;
    font-size: 24px;
    font-weight: 900;
}

.category-card small {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
}

.category-card::before {
    content: "";
    position: absolute;
    inset: auto -40px -60px auto;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background:
        radial-gradient(circle at 70% 22%, rgba(245, 158, 11, 0.38), transparent 35%),
        linear-gradient(135deg, #111827, #334155);
}

.movie-card.compact .poster-link {
    aspect-ratio: 16 / 9;
}

.poster-link img,
.rank-thumb img,
.side-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

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

.poster-glow {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.62));
}

.play-pill {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    border-radius: 999px;
    color: white;
    background: rgba(217, 119, 6, 0.95);
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 900;
}

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 10px 0 8px;
    font-size: 20px;
    line-height: 1.35;
    letter-spacing: -0.03em;
}

.movie-card.compact .card-body h3 {
    font-size: 17px;
}

.card-body h3 a:hover,
.rank-copy h3 a:hover,
.breadcrumb a:hover {
    color: var(--amber);
}

.card-body p,
.rank-copy p,
.detail-copy p,
.site-footer p {
    color: var(--muted);
    line-height: 1.8;
}

.card-meta span {
    color: #475569;
    background: #f1f5f9;
    padding: 6px 9px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span {
    border-radius: 999px;
    color: #92400e;
    background: var(--amber-soft);
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

.large-tags span {
    font-size: 14px;
    padding: 8px 12px;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 142px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.96);
    padding: 14px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.rank-num {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: white;
    background: linear-gradient(135deg, var(--red), var(--amber-light));
    font-size: 20px;
    font-weight: 950;
}

.rank-thumb {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 16px;
    background:
        radial-gradient(circle at 80% 18%, rgba(245, 158, 11, 0.36), transparent 34%),
        #111827;
}

.rank-copy h3 {
    margin: 0 0 8px;
    font-size: 20px;
    letter-spacing: -0.03em;
}

.rank-copy p {
    margin: 0 0 10px;
}

.page-hero {
    min-height: 360px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 0 0 44px 44px;
    color: white;
    background:
        radial-gradient(circle at 80% 10%, rgba(251, 191, 36, 0.34), transparent 28%),
        radial-gradient(circle at 12% 80%, rgba(37, 99, 235, 0.26), transparent 30%),
        linear-gradient(135deg, #111827, #1f2937 58%, #020617);
    padding: 70px 16px;
    text-align: center;
}

.compact-hero,
.category-hero,
.ranking-hero {
    min-height: 330px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 14px;
    margin: 0 0 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.96);
    padding: 14px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.search-box,
.select-box {
    display: grid;
    gap: 8px;
}

.search-box span,
.select-box span {
    color: #475569;
    font-size: 12px;
    font-weight: 900;
}

.search-box input,
.select-box select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    outline: none;
    padding: 0 14px;
    font: inherit;
    background: #f8fafc;
}

.search-box input:focus,
.select-box select:focus {
    border-color: var(--amber-light);
    box-shadow: 0 0 0 4px var(--amber-soft);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    margin-bottom: 22px;
    font-weight: 800;
}

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

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

.card-panel,
.player-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-content: center;
    gap: 12px;
    border: 0;
    color: white;
    background:
        radial-gradient(circle at 50% 45%, rgba(245, 158, 11, 0.24), transparent 24%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
    font: inherit;
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 18px 42px rgba(249, 115, 22, 0.36);
    position: relative;
}

.play-icon::after {
    content: "";
    position: absolute;
    left: 31px;
    top: 23px;
    border-left: 22px solid white;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
}

.player-message {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 6;
    display: none;
    border-radius: 14px;
    color: white;
    background: rgba(239, 68, 68, 0.88);
    padding: 12px 14px;
    font-weight: 800;
}

.player-message.show {
    display: block;
}

.detail-copy {
    padding: 28px;
}

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.06em;
}

.detail-meta {
    margin: 0 0 22px;
}

.detail-meta span {
    color: #475569;
    background: #f1f5f9;
}

.lead-text {
    color: #334155 !important;
    font-size: 19px;
    font-weight: 700;
}

.detail-copy h2 {
    margin-top: 28px;
    font-size: 26px;
}

.side-poster {
    padding: 16px;
}

.side-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    margin-bottom: 16px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 80% 18%, rgba(245, 158, 11, 0.36), transparent 34%),
        #111827;
}

.related-panel {
    padding: 18px;
}

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

.related-list .movie-card {
    box-shadow: none;
}

.category-list .movie-card[hidden],
.movie-grid .movie-card[hidden],
.rank-item[hidden] {
    display: none;
}

.site-footer {
    margin-top: 40px;
    color: #cbd5e1;
    background:
        radial-gradient(circle at 80% 12%, rgba(245, 158, 11, 0.16), transparent 30%),
        linear-gradient(135deg, #111827, #020617);
    padding: 54px 0;
}

.footer-grid {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) 1fr 1fr;
    gap: 36px;
}

.footer-brand {
    color: white;
    font-size: 24px;
    margin-bottom: 12px;
}

.site-footer h2 {
    color: white;
    font-size: 18px;
    margin: 0 0 14px;
}

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

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

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

    .menu-toggle {
        display: flex;
    }

    .hero-inner,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        max-width: 300px;
        justify-self: center;
    }

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

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

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

@media (max-width: 760px) {
    .nav-wrap {
        height: 68px;
    }

    .brand-text {
        font-size: 20px;
    }

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

    .hero-inner {
        gap: 28px;
        padding: 54px 0 80px;
    }

    .hero-tags span {
        max-width: 100%;
    }

    .section,
    .category-overview-block,
    .detail-shell {
        padding: 46px 0;
    }

    .section-head {
        display: block;
    }

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

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

    .rank-item {
        grid-template-columns: 42px 96px minmax(0, 1fr);
        gap: 12px;
        padding: 10px;
    }

    .rank-num {
        width: 40px;
        height: 40px;
        border-radius: 14px;
        font-size: 15px;
    }

    .rank-copy h3 {
        font-size: 17px;
    }

    .rank-copy p {
        display: none;
    }

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

    .detail-copy,
    .related-panel {
        padding: 20px;
    }
}
