:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --panel-light: #1e293b;
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #f59e0b;
    --accent-strong: #f97316;
    --accent-soft: rgba(245, 158, 11, 0.16);
    --border: rgba(148, 163, 184, 0.2);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.12), transparent 30%),
        radial-gradient(circle at 90% 10%, rgba(249, 115, 22, 0.08), transparent 24%),
        var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.3);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.nav-links a {
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--muted-strong);
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
    background: var(--accent-soft);
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.74);
}

.top-search input,
.hero-search input,
.filter-panel input {
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.top-search input {
    width: 160px;
    padding: 7px 8px;
}

.top-search button,
.hero-search button,
.primary-button {
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 36px rgba(245, 158, 11, 0.22);
}

.top-search button {
    padding: 7px 12px;
}

.menu-button {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.8);
}

.hero {
    position: relative;
    height: min(72vh, 680px);
    min-height: 500px;
    overflow: hidden;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.hero-slides,
.hero-slide {
    position: absolute;
    inset: 0;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.05) contrast(1.08);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.36) 48%, rgba(2, 6, 23, 0.1) 100%);
}

.hero-copy {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 0 0 132px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
    max-width: 780px;
    margin: 0;
    font-size: clamp(34px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy h1 + .hero-movie-title {
    margin-top: 18px;
    font-size: clamp(24px, 3vw, 38px);
    color: var(--muted-strong);
}

.hero-movie-title {
    margin-top: 0;
}

.hero-copy p:not(.eyebrow) {
    max-width: 720px;
    margin: 18px 0 0;
    color: var(--muted-strong);
    font-size: 17px;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 14px;
    font-weight: 800;
}

.ghost-button {
    border: 1px solid rgba(248, 250, 252, 0.18);
    color: var(--text);
    background: rgba(15, 23, 42, 0.62);
    transition: border 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.ghost-button:hover {
    border-color: rgba(245, 158, 11, 0.45);
    color: var(--accent);
    background: rgba(15, 23, 42, 0.86);
}

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

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 999px;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.11);
    font-size: 13px;
    font-weight: 700;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 4;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.hero-dots button {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: var(--accent);
}

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 68px;
    z-index: 5;
    width: min(720px, calc(100% - 32px));
    display: flex;
    gap: 10px;
    padding: 8px;
    border: 1px solid rgba(248, 250, 252, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.76);
    backdrop-filter: blur(18px);
    transform: translateX(-50%);
    box-shadow: var(--shadow);
}

.hero-search input {
    flex: 1;
    padding: 13px 14px;
}

.hero-search button {
    padding: 0 24px;
}

.section-shell,
.detail-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.section-shell {
    padding: 56px 0 0;
}

.intro-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 38px;
    margin-top: 52px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.72));
    box-shadow: var(--shadow);
}

.intro-panel h2,
.section-heading h2,
.page-hero h1,
.article-panel h2,
.related-panel h2,
.detail-title-block h1 {
    margin: 0;
    letter-spacing: -0.03em;
}

.intro-panel h2,
.section-heading h2 {
    font-size: clamp(26px, 3vw, 36px);
}

.intro-panel p:last-child {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted-strong);
}

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

.section-heading a {
    color: var(--accent);
    font-weight: 800;
}

.compact-heading {
    align-items: center;
}

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

.category-card {
    min-height: 148px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.11), transparent 45%),
        rgba(15, 23, 42, 0.84);
    transition: transform 0.22s ease, border 0.22s ease, background 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.48);
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.2), transparent 48%),
        rgba(15, 23, 42, 0.96);
}

.category-card span {
    display: block;
    margin-bottom: 10px;
    color: var(--text);
    font-size: 20px;
    font-weight: 900;
}

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

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

.movie-card-link {
    display: block;
}

.movie-card {
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.poster-frame {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #fff;
    background: rgba(245, 158, 11, 0.92);
    font-size: 12px;
    font-weight: 900;
}

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

.movie-meta-line {
    margin: 0 0 6px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
}

.movie-card h3 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 18px;
    line-height: 1.25;
}

.movie-card p:not(.movie-meta-line) {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.compact-card {
    display: grid;
    grid-template-columns: 96px 1fr;
}

.compact-card .poster-frame {
    aspect-ratio: auto;
    min-height: 136px;
}

.compact-card h3 {
    font-size: 16px;
}

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

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

.rank-panel,
.related-panel,
.article-panel,
.filter-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
}

.rank-panel {
    position: sticky;
    top: 96px;
    align-self: start;
    padding: 24px;
}

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

.rank-link {
    display: grid;
    grid-template-columns: 36px 64px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.52);
    transition: border 0.2s ease, background 0.2s ease;
}

.rank-link:hover {
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(30, 41, 59, 0.82);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    color: var(--accent);
    background: var(--accent-soft);
    font-weight: 900;
}

.top-rank .rank-number {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.rank-link img {
    width: 64px;
    height: 86px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-copy {
    min-width: 0;
}

.rank-copy strong,
.rank-copy em,
.rank-copy small {
    display: block;
}

.rank-copy strong {
    overflow: hidden;
    color: var(--text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-copy em {
    color: var(--accent);
    font-size: 12px;
    font-style: normal;
}

.rank-copy small {
    color: var(--muted);
    font-size: 12px;
}

.page-hero {
    padding: 78px 0 50px;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.98));
    border-bottom: 1px solid var(--border);
}

.page-hero > div {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.page-hero h1 {
    max-width: 860px;
    font-size: clamp(32px, 5vw, 58px);
}

.page-hero p:last-child {
    max-width: 760px;
    margin: 16px 0 0;
    color: var(--muted-strong);
    font-size: 17px;
}

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

.filter-panel {
    display: grid;
    gap: 12px;
    padding: 22px;
}

.filter-panel label {
    color: var(--accent);
    font-weight: 900;
}

.filter-panel input {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: rgba(2, 6, 23, 0.5);
}

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

.full-rank-list {
    gap: 14px;
    padding-bottom: 20px;
}

.full-rank-list .rank-link {
    grid-template-columns: 50px 78px 1fr;
}

.full-rank-list .rank-link img {
    width: 78px;
    height: 104px;
}

.detail-shell {
    padding: 34px 0 64px;
}

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

.breadcrumb a {
    color: var(--accent);
}

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

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

.player-video,
.player-poster,
.player-poster img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-video {
    z-index: 1;
    object-fit: contain;
    background: #000;
}

.player-poster {
    z-index: 2;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: transparent;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-poster img {
    object-fit: cover;
    opacity: 0.62;
}

.player-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(245, 158, 11, 0.18), transparent 28%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18));
}

.play-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border: 2px solid rgba(255, 255, 255, 0.72);
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.9), rgba(249, 115, 22, 0.9));
    font-size: 34px;
    transform: translate(-50%, -50%);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.cinema-player.is-playing .player-poster {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.detail-title-block {
    padding: 28px 0 18px;
}

.detail-title-block h1 {
    font-size: clamp(30px, 4vw, 50px);
}

.lead-text {
    margin: 16px 0 0;
    color: var(--accent);
    font-size: 18px;
    font-weight: 700;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.info-grid div {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.82);
}

.info-grid span,
.info-grid strong {
    display: block;
}

.info-grid span {
    color: var(--muted);
    font-size: 13px;
}

.info-grid strong {
    margin-top: 4px;
    color: var(--text);
}

.article-panel {
    padding: 28px;
}

.article-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.article-panel h2:not(:first-child) {
    margin-top: 28px;
}

.article-panel p {
    margin: 0;
    color: var(--muted-strong);
    font-size: 16px;
}

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

.related-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
}

.related-panel h2 {
    margin-bottom: 18px;
    font-size: 22px;
}

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

.related-list .movie-card-link {
    min-width: 0;
}

.site-footer {
    margin-top: 72px;
    padding: 48px 0 28px;
    border-top: 1px solid var(--border);
    background: rgba(2, 6, 23, 0.7);
}

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

.footer-grid h2,
.footer-grid h3 {
    margin: 0 0 12px;
}

.footer-grid p,
.footer-grid a,
.copyright {
    color: var(--muted);
}

.footer-grid a {
    display: block;
    margin: 6px 0;
    transition: color 0.2s ease;
}

.footer-grid a:hover {
    color: var(--accent);
}

.footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-tags a {
    margin: 0;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.1);
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    font-size: 13px;
}

.is-hidden {
    display: none !important;
}

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

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

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

    .rank-panel,
    .related-panel {
        position: static;
    }
}

@media (max-width: 820px) {
    .nav-shell {
        min-height: 64px;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--border);
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: var(--shadow);
    }

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

    .top-search {
        display: none;
    }

    .menu-button {
        display: inline-grid;
        place-items: center;
    }

    .hero {
        min-height: 640px;
        height: auto;
    }

    .hero-copy {
        justify-content: center;
        padding-bottom: 150px;
    }

    .hero-search {
        bottom: 78px;
        flex-direction: column;
    }

    .hero-search button {
        min-height: 44px;
    }

    .hero-dots {
        bottom: 32px;
    }

    .intro-panel {
        align-items: flex-start;
        flex-direction: column;
        padding: 26px;
    }

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

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

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

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

    .hero-copy h1,
    .hero-copy h2 {
        font-size: 34px;
    }

    .hero-copy p:not(.eyebrow) {
        font-size: 15px;
    }

    .hero-actions {
        width: 100%;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
    }

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

    .compact-card {
        grid-template-columns: 86px 1fr;
    }

    .compact-card .poster-frame {
        min-height: 126px;
    }

    .rank-link,
    .full-rank-list .rank-link {
        grid-template-columns: 38px 62px 1fr;
    }

    .rank-link img,
    .full-rank-list .rank-link img {
        width: 62px;
        height: 84px;
    }

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

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