:root {
    color-scheme: dark;
    --bg: #030712;
    --panel: rgba(17, 24, 39, 0.72);
    --panel-solid: #111827;
    --panel-soft: rgba(31, 41, 55, 0.72);
    --line: rgba(248, 113, 113, 0.18);
    --text: #ffffff;
    --muted: #d1d5db;
    --soft: #9ca3af;
    --red: #dc2626;
    --deep-red: #7f1d1d;
    --gold: #facc15;
    --orange: #fb923c;
    --green: #4ade80;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(220, 38, 38, 0.22), transparent 36rem),
        radial-gradient(circle at top right, rgba(250, 204, 21, 0.13), transparent 28rem),
        linear-gradient(180deg, #030712 0%, #111827 45%, #030712 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, rgba(127, 29, 29, 0.96), rgba(185, 28, 28, 0.96), rgba(127, 29, 29, 0.96));
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--gold), var(--red));
    box-shadow: 0 14px 30px rgba(220, 38, 38, 0.36);
    font-size: 16px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong,
.footer-brand strong {
    font-size: 21px;
    font-weight: 850;
    letter-spacing: 0.01em;
    background: linear-gradient(90deg, #fef3c7, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text em {
    margin-top: 3px;
    color: #fecaca;
    font-style: normal;
    font-size: 12px;
}

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

.nav-link,
.mobile-link {
    position: relative;
    padding: 10px 13px;
    border-radius: 999px;
    color: #fee2e2;
    font-size: 14px;
    font-weight: 700;
    transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link.active,
.mobile-link:hover {
    color: #7f1d1d;
    background: linear-gradient(135deg, #fde68a, #ffffff);
}

.mobile-toggle {
    display: none;
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 8px 12px;
}

.mobile-nav {
    display: none;
    padding: 12px 18px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

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

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: #030712;
}

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

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
    transform: scale(1.02);
}

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

.hero-bg,
.detail-backdrop img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.05);
}

.hero-shade,
.detail-backdrop::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(3, 7, 18, 0.98) 0%, rgba(3, 7, 18, 0.78) 43%, rgba(127, 29, 29, 0.32) 100%),
        linear-gradient(180deg, rgba(3, 7, 18, 0.2), rgba(3, 7, 18, 0.98));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 680px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 80px 24px 96px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) 360px;
    align-items: center;
    gap: 60px;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid rgba(250, 204, 21, 0.4);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(127, 29, 29, 0.42);
    font-size: 13px;
    font-weight: 800;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 20px 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 950;
}

.hero-line,
.page-hero p,
.detail-line {
    max-width: 780px;
    color: #e5e7eb;
    font-size: 20px;
    line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    color: #fee2e2;
    background: rgba(248, 113, 113, 0.16);
    border: 1px solid rgba(248, 113, 113, 0.24);
    font-size: 12px;
    font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.section-more,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 850;
    transition: 0.25s ease;
}

.primary-btn {
    color: #7f1d1d;
    background: linear-gradient(135deg, #fde047, #ffffff);
    box-shadow: 0 16px 38px rgba(250, 204, 21, 0.24);
}

.ghost-btn,
.section-more,
.text-link {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
}

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

.hero-poster {
    border-radius: 32px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

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

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

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

.panel-section,
.content-section,
.filter-panel,
.player-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px 0;
}

.search-shell,
.filter-panel,
.article-panel,
.ranking-panel,
.category-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(18px);
}

.search-shell {
    padding: 26px;
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(320px, 1.12fr);
    gap: 28px;
    align-items: center;
}

.search-shell h2,
.section-head h2,
.ranking-panel h2,
.article-panel h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 900;
}

.search-shell p,
.section-head p,
.article-panel p,
.category-card-body p,
.site-footer p,
.feature-list,
.footer-links a {
    color: var(--muted);
}

.search-box {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border-radius: 18px;
    background: rgba(3, 7, 18, 0.72);
    border: 1px solid rgba(248, 113, 113, 0.22);
}

.search-box.wide {
    width: 100%;
}

.search-box span {
    color: #fca5a5;
    font-size: 24px;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
}

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

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

.category-tile {
    min-height: 138px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(248, 113, 113, 0.18);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(250, 204, 21, 0.22), transparent 45%),
        linear-gradient(135deg, rgba(127, 29, 29, 0.88), rgba(17, 24, 39, 0.92));
    transition: 0.25s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(250, 204, 21, 0.38);
}

.category-tile span {
    font-size: 22px;
    font-weight: 900;
}

.category-tile em {
    margin-top: 8px;
    color: #fecaca;
    font-style: normal;
    font-size: 13px;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(17, 24, 39, 0.76);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
    transition: 0.25s ease;
}

.movie-card[hidden] {
    display: none;
}

.poster-link {
    position: relative;
    display: block;
    background: rgba(127, 29, 29, 0.32);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: 0.35s ease;
}

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

.score-badge,
.rank-num {
    position: absolute;
    top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    color: #7f1d1d;
    background: linear-gradient(135deg, #fde047, #ffffff);
    font-size: 12px;
    font-weight: 950;
}

.score-badge {
    right: 10px;
}

.rank-num {
    left: 10px;
}

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

.card-title {
    display: -webkit-box;
    min-height: 48px;
    color: #ffffff;
    font-weight: 900;
    line-height: 1.45;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-title:hover {
    color: #fde68a;
}

.card-meta {
    margin: 8px 0;
    color: var(--soft);
    font-size: 12px;
}

.card-desc {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    color: #d1d5db;
    font-size: 13px;
    line-height: 1.7;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.ranking-panel {
    position: sticky;
    top: 94px;
    padding: 22px;
}

.ranking-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.ranking-list .movie-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
}

.ranking-list .poster-link img {
    height: 142px;
}

.ranking-list .card-desc,
.ranking-list .tag-row {
    display: none;
}

.section-more.full {
    width: 100%;
    margin-top: 18px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
}

.page-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 80px 24px 42px;
}

.page-hero.slim {
    padding-top: 72px;
}

.page-hero h1 {
    font-size: clamp(42px, 6vw, 72px);
}

.category-hero {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.filter-panel {
    display: grid;
    gap: 16px;
    padding: 24px;
}

.filter-panel.stacked {
    align-items: stretch;
}

.year-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.year-filters button {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: #fee2e2;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.year-filters button.active,
.year-filters button:hover {
    color: #7f1d1d;
    background: linear-gradient(135deg, #fde047, #ffffff);
}

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

.category-card {
    overflow: hidden;
    transition: 0.25s ease;
}

.category-cover {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 180px;
    background: #111827;
}

.category-cover img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.category-card-body {
    padding: 22px;
}

.category-card-body h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

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

.detail-backdrop {
    position: absolute;
    inset: 0;
    filter: blur(1px);
}

.detail-backdrop::after {
    display: block;
}

.detail-wrap {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 24px 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #fecaca;
    font-size: 14px;
}

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

.detail-grid {
    margin-top: 34px;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 30px;
    box-shadow: var(--shadow);
}

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

.detail-info h1 {
    font-size: clamp(42px, 6vw, 78px);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

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

.movie-player {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.13);
    box-shadow: var(--shadow);
}

.player-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 0;
    color: #ffffff;
    background: #000000;
    cursor: pointer;
}

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

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5) saturate(1.1);
}

.play-ring {
    position: relative;
    z-index: 2;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gold), var(--red));
    box-shadow: 0 22px 60px rgba(220, 38, 38, 0.45);
}

.play-ring span {
    margin-left: 6px;
    font-size: 36px;
}

.detail-content {
    display: grid;
    gap: 22px;
}

.article-panel {
    padding: 28px;
}

.article-panel.large {
    max-width: 900px;
}

.article-panel p {
    margin: 12px 0 0;
    font-size: 16px;
    line-height: 1.95;
}

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

.pager-links a {
    padding: 16px 18px;
    border-radius: 18px;
    color: #fee2e2;
    background: rgba(127, 29, 29, 0.44);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

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

.site-empty {
    margin: 30px 0 0;
    padding: 24px;
    border-radius: 18px;
    text-align: center;
    color: #fecaca;
    background: rgba(127, 29, 29, 0.3);
}

.site-footer {
    margin-top: 70px;
    padding: 52px 24px 28px;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.2), #000000);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px;
}

.footer-grid h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.footer-links {
    display: grid;
    gap: 8px;
}

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

.feature-list {
    margin: 0;
    padding-left: 18px;
}

.footer-bottom {
    max-width: 1280px;
    margin: 32px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    font-size: 13px;
}

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

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

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

    .ranking-panel {
        position: static;
    }
}

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

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

    .hero,
    .hero-content {
        min-height: 720px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 52px;
    }

    .hero-poster {
        width: 220px;
        transform: none;
    }

    .search-shell,
    .detail-grid,
    .footer-grid,
    .pager-links {
        grid-template-columns: 1fr;
    }

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

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

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

    .brand-text strong {
        font-size: 17px;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 40px;
    }

    .hero-line,
    .page-hero p,
    .detail-line {
        font-size: 16px;
    }

    .panel-section,
    .content-section,
    .filter-panel,
    .player-section,
    .page-hero,
    .detail-wrap {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .card-body {
        padding: 12px;
    }

    .card-title {
        min-height: 44px;
        font-size: 14px;
    }

    .card-desc,
    .tag-row {
        display: none;
    }

    .section-head {
        align-items: start;
        flex-direction: column;
    }

    .category-cover {
        min-height: 120px;
    }

    .category-cover img {
        height: 120px;
    }

    .play-ring {
        width: 72px;
        height: 72px;
    }
}
