:root {
    color-scheme: dark;
    --bg: #080b12;
    --bg-soft: #111827;
    --panel: rgba(17, 24, 39, 0.78);
    --panel-solid: #111827;
    --line: rgba(255, 255, 255, 0.1);
    --text: #f8fafc;
    --muted: #b6c0d3;
    --muted-2: #7b879c;
    --red: #ef4444;
    --red-dark: #b91c1c;
    --orange: #f97316;
    --yellow: #facc15;
    --blue: #60a5fa;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
    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:
        radial-gradient(circle at 12% 8%, rgba(239, 68, 68, 0.16), transparent 26rem),
        radial-gradient(circle at 84% 12%, rgba(249, 115, 22, 0.15), transparent 24rem),
        linear-gradient(180deg, #111827 0%, #070a10 45%, #000 100%);
    color: var(--text);
    min-height: 100vh;
}

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

img {
    width: 100%;
    display: block;
    background: linear-gradient(135deg, #111827, #1f2937);
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 13, 20, 0.88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-weight: 900;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 14px 35px rgba(239, 68, 68, 0.35);
}

.brand-text {
    font-size: 22px;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, #f87171, #fb923c, #fde68a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    padding: 9px 12px;
    border-radius: 999px;
    color: #d1d5db;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(239, 68, 68, 0.16);
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(360px, 30vw);
}

.top-search input,
.filter-input,
.filter-select {
    width: 100%;
    min-height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 0 16px;
    color: #fff;
    background: rgba(31, 41, 55, 0.92);
    outline: none;
    transition: 0.2s ease;
}

.filter-select {
    width: auto;
    padding-right: 38px;
}

.top-search input:focus,
.filter-input:focus,
.filter-select:focus {
    border-color: rgba(239, 68, 68, 0.76);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.16);
}

.top-search button,
.primary-btn,
.ghost-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    min-height: 42px;
    padding: 0 18px;
    font-weight: 800;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button,
.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 16px 34px rgba(239, 68, 68, 0.3);
}

.primary-btn.small,
.ghost-btn.small {
    min-height: 34px;
    padding: 0 14px;
    font-size: 14px;
}

.ghost-btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.top-search button:hover,
.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
}

.text-link {
    color: #fca5a5;
    min-height: auto;
    padding: 0;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

main {
    overflow: hidden;
}

.hero-carousel {
    position: relative;
    min-height: 720px;
    background: #05070c;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
    background-image:
        linear-gradient(90deg, rgba(5, 7, 12, 0.96) 0%, rgba(5, 7, 12, 0.74) 42%, rgba(5, 7, 12, 0.35) 100%),
        var(--hero-image);
    background-size: cover;
    background-position: center;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 74% 24%, rgba(239, 68, 68, 0.28), transparent 22rem),
        linear-gradient(0deg, #080b12 0%, transparent 36%);
}

.hero-content {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    min-height: 720px;
    padding: 130px 24px 90px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 380px;
    align-items: center;
    gap: 64px;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    font-size: clamp(42px, 6vw, 78px);
    line-height: 0.95;
    letter-spacing: -0.06em;
    margin: 12px 0 22px;
}

.eyebrow,
.section-kicker {
    color: #fca5a5;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-desc,
.page-hero p,
.detail-copy p,
.section-head p,
.article-section p,
.category-overview-card p,
.movie-card p,
.rank-info p,
.site-footer p {
    color: var(--muted);
    line-height: 1.8;
}

.hero-desc {
    max-width: 760px;
    font-size: 18px;
}

.hero-tags,
.tag-row,
.detail-meta,
.card-meta,
.quick-links,
.inline-links,
.hero-actions,
.filter-bar,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-tags span,
.tag-row span,
.tag-row a,
.detail-meta span,
.card-meta span,
.card-meta a,
.quick-links a,
.inline-links a {
    border-radius: 999px;
    padding: 6px 11px;
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
}

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

.hero-poster {
    display: block;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: perspective(900px) rotateY(-8deg);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    transition: 0.25s ease;
}

.hero-dot.active {
    width: 36px;
    background: linear-gradient(90deg, var(--red), var(--orange));
}

.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 24px 0;
}

.section-head {
    margin-bottom: 26px;
}

.section-head h2,
.article-section h2,
.player-section h2,
.category-overview-card h2,
.rank-info h2 {
    margin: 6px 0 0;
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.row-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end;
}

.movie-grid {
    display: grid;
    gap: 22px;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(17, 24, 39, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
    transition: 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(239, 68, 68, 0.45);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

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

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

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: 35% 0 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
}

.poster-badge,
.poster-score {
    position: absolute;
    z-index: 2;
    top: 12px;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
}

.poster-badge {
    left: 12px;
    background: rgba(239, 68, 68, 0.92);
}

.poster-score {
    right: 12px;
    color: #111827;
    background: var(--yellow);
}

.card-body {
    padding: 15px;
}

.card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.8em;
    overflow: hidden;
    font-size: 18px;
    line-height: 1.38;
    font-weight: 900;
}

.card-title:hover,
.rank-info h2 a:hover,
.category-overview-card h2 a:hover {
    color: #fb7185;
}

.card-body p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 3.4em;
    overflow: hidden;
    margin: 9px 0 12px;
    font-size: 14px;
}

.card-meta {
    gap: 7px;
    color: var(--muted-2);
}

.tag-row {
    margin-top: 11px;
}

.tag-row span,
.tag-row a {
    font-size: 12px;
    padding: 4px 8px;
}

.gradient-panel {
    max-width: calc(1280px - 48px);
    margin-top: 72px;
    padding: 44px 32px;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.28), rgba(88, 28, 135, 0.24));
    border: 1px solid rgba(255, 255, 255, 0.09);
}

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

.category-card {
    min-height: 180px;
    padding: 22px;
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(239, 68, 68, 0.14), rgba(249, 115, 22, 0.06)),
        rgba(17, 24, 39, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(249, 115, 22, 0.45);
}

.category-card span {
    display: block;
    margin-bottom: 8px;
    font-size: 22px;
    font-weight: 900;
}

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

.category-card em,
.inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    font-style: normal;
}

.category-card em a {
    color: #fed7aa;
    font-size: 13px;
}

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

.mini-card {
    display: grid;
    grid-template-columns: auto 58px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: rgba(17, 24, 39, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mini-card img {
    height: 78px;
    object-fit: cover;
    border-radius: 12px;
}

.mini-card strong,
.mini-card em {
    display: block;
}

.mini-card em {
    margin-top: 4px;
    color: var(--muted-2);
    font-style: normal;
    font-size: 13px;
}

.rank-num {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, #fb923c);
    font-weight: 900;
}

.page-hero,
.detail-hero {
    position: relative;
    padding: 108px 24px 64px;
    background:
        radial-gradient(circle at 20% 10%, rgba(239, 68, 68, 0.18), transparent 28rem),
        linear-gradient(135deg, #111827, #030712);
}

.page-hero > div,
.detail-inner {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
}

.small-hero {
    min-height: 360px;
    display: flex;
    align-items: center;
}

.filter-panel {
    padding-top: 48px;
}

.filter-bar {
    margin-bottom: 28px;
    padding: 16px;
    border-radius: 24px;
    background: rgba(17, 24, 39, 0.72);
    border: 1px solid var(--line);
}

.filter-bar .filter-input {
    flex: 1 1 360px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 26px;
    padding: 22px;
    border-radius: 30px;
    background: rgba(17, 24, 39, 0.78);
    border: 1px solid var(--line);
}

.category-poster-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: 210px;
    border-radius: 22px;
    overflow: hidden;
}

.category-poster-strip img {
    height: 100%;
    object-fit: cover;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 96px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: 24px;
    background: rgba(17, 24, 39, 0.78);
    border: 1px solid var(--line);
}

.rank-cover {
    position: relative;
}

.rank-cover img {
    height: 128px;
    object-fit: cover;
    border-radius: 16px;
}

.rank-cover span {
    position: absolute;
    left: -8px;
    top: -8px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, #fb923c);
    font-weight: 900;
}

.detail-hero {
    background-image:
        linear-gradient(90deg, rgba(4, 7, 12, 0.97), rgba(4, 7, 12, 0.76), rgba(4, 7, 12, 0.42)),
        var(--hero-image);
    background-size: cover;
    background-position: center;
}

.detail-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #080b12 0%, transparent 46%);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #d1d5db;
    margin-bottom: 28px;
}

.breadcrumb a {
    color: #fca5a5;
}

.detail-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 30px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.detail-copy h1 {
    max-width: 860px;
}

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

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

.player-shell {
    position: relative;
    margin-top: 18px;
    border-radius: 28px;
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 16px;
    color: #fff;
    border: 0;
    background:
        radial-gradient(circle at center, rgba(239, 68, 68, 0.3), rgba(0, 0, 0, 0.62)),
        rgba(0, 0, 0, 0.45);
    cursor: pointer;
    z-index: 4;
}

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

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 18px 40px rgba(239, 68, 68, 0.35);
    font-size: 32px;
}

.player-cover strong {
    font-size: 22px;
}

.article-section {
    max-width: 960px;
}

.article-section h2 + p {
    margin-top: 12px;
}

.article-section p + h2 {
    margin-top: 28px;
}

.site-footer {
    margin-top: 88px;
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.36);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 28px;
}

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

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

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

@media (max-width: 1100px) {
    .top-search {
        display: none;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

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

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

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

@media (max-width: 780px) {
    .header-inner {
        height: auto;
        min-height: 66px;
        flex-wrap: wrap;
        padding: 12px 16px;
    }

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

    .menu-toggle {
        display: grid;
        place-items: center;
        margin-left: auto;
    }

    .site-nav {
        order: 4;
        width: 100%;
        display: none;
        grid-template-columns: repeat(4, 1fr);
        margin-left: 0;
    }

    .site-nav.is-open {
        display: grid;
    }

    .nav-link {
        text-align: center;
        padding: 10px 6px;
    }

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

    .hero-content {
        padding: 96px 18px 72px;
    }

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

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

    .row-head,
    .detail-layout,
    .category-overview-card,
    .footer-inner,
    .rank-row {
        grid-template-columns: 1fr;
    }

    .row-head {
        display: grid;
        align-items: start;
    }

    .detail-poster {
        width: min(260px, 78vw);
    }

    .featured-grid,
    .all-grid,
    .compact-grid,
    .category-grid,
    .ranking-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .category-poster-strip {
        min-height: 160px;
    }

    .rank-cover img {
        height: 210px;
    }
}

@media (max-width: 480px) {
    .featured-grid,
    .all-grid,
    .compact-grid,
    .category-grid,
    .ranking-list {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .filter-bar {
        display: grid;
    }

    .filter-select {
        width: 100%;
    }
}
