:root {
    color-scheme: dark;
    --bg: #0c0a09;
    --bg-soft: #1c1917;
    --panel: rgba(28, 25, 23, 0.78);
    --panel-strong: rgba(41, 37, 36, 0.95);
    --text: #fafaf9;
    --muted: #a8a29e;
    --line: rgba(245, 158, 11, 0.16);
    --accent: #f59e0b;
    --accent-2: #b91c1c;
    --accent-3: #fbbf24;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background:
        radial-gradient(circle at 15% 5%, rgba(217, 119, 6, 0.16), transparent 34rem),
        radial-gradient(circle at 82% 18%, rgba(127, 29, 29, 0.24), transparent 38rem),
        linear-gradient(180deg, #0c0a09 0%, #1c1917 42%, #0c0a09 100%);
    color: var(--text);
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.82), transparent 82%);
    z-index: -1;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(20px);
    background: rgba(12, 10, 9, 0.82);
    border-bottom: 1px solid rgba(245, 158, 11, 0.14);
}

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

.brand {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--accent-3);
    text-shadow: 0 0 28px rgba(245, 158, 11, 0.35);
    white-space: nowrap;
}

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

.main-nav a {
    color: #d6d3d1;
    padding: 10px 16px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #fff7ed;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.9), rgba(185, 28, 28, 0.84));
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    background: rgba(41, 37, 36, 0.76);
    color: var(--text);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    background: #fef3c7;
    border-radius: 999px;
}

main {
    overflow: hidden;
}

.hero-slider {
    position: relative;
    width: min(1240px, calc(100% - 32px));
    min-height: 680px;
    margin: 28px auto 0;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(245, 158, 11, 0.18);
    background: #1c1917;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.62fr);
    align-items: center;
    gap: 34px;
    padding: 72px;
    background-image:
        linear-gradient(90deg, rgba(12, 10, 9, 0.98) 0%, rgba(12, 10, 9, 0.72) 48%, rgba(12, 10, 9, 0.28) 100%),
        var(--hero-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.9s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: auto -12% -22% 12%;
    height: 260px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.28), transparent 70%);
    filter: blur(18px);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 690px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0 0 16px;
    padding: 8px 14px;
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 999px;
    color: #fbbf24;
    background: rgba(120, 53, 15, 0.28);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(38px, 6.4vw, 86px);
    line-height: 0.96;
    letter-spacing: -0.07em;
    color: #fff7ed;
}

.hero-content p,
.page-hero p,
.detail-copy p {
    margin: 22px 0 0;
    max-width: 720px;
    color: #d6d3d1;
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.detail-meta,
.movie-meta,
.detail-tags,
.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags span,
.movie-tags span,
.detail-tags a,
.detail-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.16);
    font-size: 12px;
    font-weight: 700;
}

.hero-actions,
.detail-copy .primary-btn {
    margin-top: 30px;
}

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

.primary-btn {
    color: #fff7ed;
    background: linear-gradient(135deg, #d97706, #b91c1c);
    box-shadow: 0 16px 38px rgba(185, 28, 28, 0.34);
}

.ghost-btn {
    margin-left: 12px;
    color: #fde68a;
    border: 1px solid rgba(245, 158, 11, 0.32);
    background: rgba(28, 25, 23, 0.52);
}

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

.hero-poster {
    position: relative;
    z-index: 2;
    justify-self: end;
    width: min(360px, 100%);
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.24);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.62);
    transform: rotate(2deg);
}

.hero-poster img,
.detail-poster img,
.movie-cover img,
.rank-thumb img,
.overview-strip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 72px;
    bottom: 46px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(214, 211, 209, 0.32);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 58px;
    background: #f59e0b;
}

.content-section,
.search-panel,
.page-hero,
.detail-layout {
    width: min(1240px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.content-section {
    margin-top: 64px;
}

.search-panel {
    margin-top: 34px;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.5fr) repeat(3, minmax(130px, 0.5fr));
    gap: 12px;
    align-items: center;
    padding: 16px;
    border: 1px solid rgba(245, 158, 11, 0.16);
    border-radius: 24px;
    background: rgba(28, 25, 23, 0.72);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.search-panel div span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.search-panel div strong {
    display: block;
    color: #fbbf24;
    font-size: 18px;
}

.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 48px;
    color: #fff7ed;
    background: rgba(12, 10, 9, 0.68);
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 16px;
    padding: 0 14px;
    outline: none;
}

.search-panel input:focus,
.search-panel select:focus {
    border-color: rgba(245, 158, 11, 0.72);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 44px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

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

.section-heading a,
.text-link {
    color: #fbbf24;
    font-weight: 800;
}

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

.category-card,
.spotlight-box,
.category-overview-card,
.detail-text article,
.pager-links a {
    background: linear-gradient(145deg, rgba(41, 37, 36, 0.82), rgba(12, 10, 9, 0.78));
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: var(--radius);
    box-shadow: 0 18px 58px rgba(0, 0, 0, 0.26);
}

.category-card {
    min-height: 150px;
    padding: 22px;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.42);
    background: linear-gradient(145deg, rgba(120, 53, 15, 0.42), rgba(28, 25, 23, 0.9));
}

.category-card span {
    display: block;
    color: #fef3c7;
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

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

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

.movie-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border-radius: 24px;
    background: rgba(28, 25, 23, 0.78);
    border: 1px solid rgba(245, 158, 11, 0.12);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.42);
    box-shadow: 0 22px 64px rgba(120, 53, 15, 0.24);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #292524;
}

.movie-cover img {
    transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .movie-cover img {
    transform: scale(1.08);
    filter: brightness(0.78);
}

.movie-play {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%) scale(0.82);
    opacity: 0;
    border-radius: 999px;
    color: #fff7ed;
    background: linear-gradient(135deg, #d97706, #b91c1c);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.44);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-info {
    padding: 16px;
}

.movie-info h2,
.rank-card h2 {
    margin: 10px 0 8px;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 900;
    color: #fff7ed;
}

.movie-info h2 a:hover,
.rank-card h2 a:hover {
    color: #fbbf24;
}

.movie-info p,
.rank-card p {
    margin: 0 0 14px;
    color: #a8a29e;
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    color: #78716c;
    font-size: 12px;
}

.movie-meta span:not(:last-child)::after {
    content: "•";
    margin-left: 8px;
    color: rgba(245, 158, 11, 0.45);
}

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

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

.rank-card {
    display: grid;
    grid-template-columns: 54px 78px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 22px;
    background: rgba(28, 25, 23, 0.74);
    border: 1px solid rgba(245, 158, 11, 0.12);
}

.rank-number {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff7ed;
    background: linear-gradient(135deg, #d97706, #7f1d1d);
    font-weight: 900;
}

.rank-thumb {
    display: block;
    width: 78px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: #292524;
}

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

.spotlight-box {
    position: sticky;
    top: 100px;
    padding: 30px;
}

.spotlight-box h2 {
    margin: 0;
    color: #fbbf24;
    font-size: 30px;
}

.spotlight-box p {
    color: #d6d3d1;
    line-height: 1.9;
}

.page-hero {
    margin-top: 28px;
    padding: 74px;
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(12, 10, 9, 0.94), rgba(120, 53, 15, 0.38)),
        radial-gradient(circle at 86% 0%, rgba(245, 158, 11, 0.26), transparent 34rem);
    border: 1px solid rgba(245, 158, 11, 0.16);
    box-shadow: var(--shadow);
}

.small-hero h1 {
    font-size: clamp(34px, 5.8vw, 72px);
}

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

.overview-list {
    display: grid;
    gap: 22px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 22px;
    padding: 20px;
}

.overview-copy {
    padding: 8px;
}

.overview-copy h2 {
    margin: 0;
    font-size: 30px;
}

.overview-copy p {
    color: var(--muted);
    line-height: 1.8;
}

.overview-strip {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 12px;
}

.overview-strip a {
    min-width: 0;
}

.overview-strip img {
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    background: #292524;
}

.overview-strip span {
    display: block;
    margin-top: 8px;
    color: #d6d3d1;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-hero {
    position: relative;
    min-height: 640px;
    padding: 62px 0;
    background-image:
        linear-gradient(90deg, rgba(12, 10, 9, 1), rgba(12, 10, 9, 0.78), rgba(12, 10, 9, 0.4)),
        var(--hero-image);
    background-position: center;
    background-size: cover;
}

.detail-bg {
    position: absolute;
    inset: 0;
    backdrop-filter: blur(10px);
    background: rgba(12, 10, 9, 0.36);
}

.detail-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 46px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(245, 158, 11, 0.22);
    box-shadow: var(--shadow);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 20px;
    color: #a8a29e;
    font-size: 14px;
}

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

.detail-meta {
    margin-top: 24px;
}

.detail-tags {
    margin-top: 18px;
}

.player-section {
    margin-top: -70px;
    position: relative;
    z-index: 5;
}

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 32px;
    background: #000;
    border: 1px solid rgba(245, 158, 11, 0.22);
    box-shadow: var(--shadow);
}

.player-frame video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: #fff7ed;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.72));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-orb {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-size: 32px;
    background: linear-gradient(135deg, #d97706, #b91c1c);
    box-shadow: 0 24px 70px rgba(185, 28, 28, 0.38);
}

.player-overlay span:last-child {
    font-size: 18px;
    font-weight: 900;
}

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

.detail-text article {
    padding: 28px;
}

.detail-text h2 {
    margin: 0 0 16px;
    font-size: 28px;
}

.detail-text p {
    margin: 0;
    color: #d6d3d1;
    line-height: 2;
}

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

.pager-links a {
    padding: 18px 22px;
    color: #fef3c7;
    font-weight: 800;
}

.related-grid .movie-card.compact-card .movie-info p {
    -webkit-line-clamp: 2;
}

.site-footer {
    margin-top: 78px;
    padding: 52px 0 28px;
    background: linear-gradient(180deg, rgba(28, 25, 23, 0.35), rgba(12, 10, 9, 0.95));
    border-top: 1px solid rgba(245, 158, 11, 0.12);
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 32px;
}

.footer-inner h2 {
    margin: 0;
    color: #fbbf24;
}

.footer-inner p {
    max-width: 680px;
    color: #a8a29e;
    line-height: 1.8;
}

.footer-links {
    display: grid;
    gap: 10px;
    min-width: 120px;
}

.footer-links a {
    color: #d6d3d1;
}

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

.copyright {
    width: min(1240px, calc(100% - 32px));
    margin: 26px auto 0;
    color: #78716c;
    font-size: 13px;
}

[hidden] {
    display: none !important;
}

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

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

    .hero-slide {
        grid-template-columns: 1fr 300px;
        padding: 48px;
    }

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

    .split-section,
    .detail-text,
    .wide-rank-list {
        grid-template-columns: 1fr;
    }

    .spotlight-box {
        position: static;
    }
}

@media (max-width: 860px) {
    .header-inner {
        min-height: 66px;
    }

    .nav-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: 22px;
        background: rgba(12, 10, 9, 0.96);
        border: 1px solid rgba(245, 158, 11, 0.18);
        box-shadow: var(--shadow);
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav a {
        border-radius: 14px;
    }

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

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        padding: 32px;
    }

    .hero-poster {
        justify-self: start;
        width: 210px;
        transform: none;
    }

    .hero-dots {
        left: 32px;
        bottom: 28px;
    }

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

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

    .category-grid,
    .large-category-grid,
    .category-overview-card,
    .detail-layout,
    .pager-links {
        grid-template-columns: 1fr;
    }

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

    .page-hero {
        padding: 40px 28px;
        border-radius: 26px;
    }

    .detail-layout {
        gap: 28px;
    }

    .detail-poster {
        width: 230px;
    }

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

    .player-frame {
        border-radius: 22px;
    }

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

@media (max-width: 560px) {
    .brand {
        font-size: 20px;
    }

    .hero-slider {
        width: min(100% - 20px, 1240px);
        min-height: 720px;
        margin-top: 14px;
    }

    .hero-slide {
        padding: 24px;
    }

    .hero-content h1,
    .detail-copy h1,
    .page-hero h1 {
        font-size: 38px;
    }

    .hero-content p,
    .detail-copy p,
    .page-hero p {
        font-size: 15px;
    }

    .content-section,
    .search-panel,
    .page-hero,
    .detail-layout {
        width: min(100% - 20px, 1240px);
    }

    .section-heading {
        display: block;
    }

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

    .movie-info {
        padding: 12px;
    }

    .movie-info h2 {
        font-size: 15px;
    }

    .movie-info p {
        font-size: 12px;
    }

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

    .rank-thumb {
        width: 64px;
    }

    .detail-hero {
        padding: 38px 0 76px;
    }

    .detail-text article {
        padding: 22px;
    }

    .play-orb {
        width: 68px;
        height: 68px;
    }
}
