:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-strong: #0f172a;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --brand: #facc15;
    --brand-2: #fb923c;
    --danger: #ef4444;
    --radius: 22px;
    --shadow: 0 28px 80px rgba(2, 6, 23, 0.48);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(250, 204, 21, 0.16), transparent 30rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    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.025) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent 80%);
}

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

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

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

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #020617;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 10px 30px rgba(250, 204, 21, 0.28);
    font-size: 15px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    overflow: hidden;
}

.desktop-nav a,
.mobile-panel a,
.footer-links a {
    color: var(--soft);
    transition: color 0.25s ease, transform 0.25s ease;
}

.desktop-nav a {
    position: relative;
    font-size: 14px;
    white-space: nowrap;
}

.desktop-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -8px;
    height: 2px;
    border-radius: 99px;
    background: var(--brand);
    transition: right 0.25s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
    color: var(--brand);
}

.desktop-nav a:hover::after {
    right: 0;
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
    width: 220px;
    padding: 11px 16px;
}

.header-search button,
.mobile-search button,
.primary-btn,
.ghost-btn {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.header-search button,
.mobile-search button,
.primary-btn {
    color: #020617;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 14px 36px rgba(250, 204, 21, 0.24);
}

.header-search button,
.mobile-search button {
    padding: 11px 18px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(250, 204, 21, 0.75);
    box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.12);
    background: rgba(255, 255, 255, 0.12);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    font-size: 22px;
}

.mobile-panel {
    display: none;
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.94);
}

.mobile-panel.open {
    display: grid;
    gap: 12px;
}

.mobile-search input {
    width: 100%;
    padding: 12px 16px;
}

.hero-shell {
    position: relative;
    min-height: 720px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.08);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 76% 38%, rgba(250, 204, 21, 0.16), transparent 24rem), linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.96));
}

.hero-content {
    position: relative;
    width: min(1440px, calc(100% - 32px));
    min-height: 720px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 380px;
    gap: 54px;
    align-items: center;
    padding: 76px 0 92px;
}

.hero-copy {
    max-width: 850px;
}

.eyebrow,
.section-head span,
.page-hero span,
.feature-text span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: var(--brand);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

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

.hero-copy p,
.page-hero p,
.detail-copy .lead {
    color: var(--soft);
    font-size: 18px;
    line-height: 1.9;
}

.hero-copy p {
    max-width: 760px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 30px;
}

.hero-tags span,
.badge,
.play-chip,
.detail-poster span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.hero-tags span {
    padding: 8px 12px;
    color: var(--brand);
    background: rgba(250, 204, 21, 0.12);
    border: 1px solid rgba(250, 204, 21, 0.24);
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
}

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

.text-link {
    color: var(--brand);
    font-weight: 900;
}

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

.hero-poster {
    position: relative;
    display: block;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow), 0 0 0 10px rgba(255, 255, 255, 0.05);
    transform: rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    left: 20px;
    bottom: 20px;
    padding: 10px 16px;
    color: #020617;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    font-weight: 900;
}

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

.hero-dot {
    width: 34px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.26);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 66px;
    background: var(--brand);
}

.content-wrap,
.category-strip,
.feature-section {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    padding: 64px 0;
}

.two-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 410px;
    gap: 34px;
    align-items: start;
}

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

.section-head h2 {
    margin: 6px 0 0;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.section-head.compact h2 {
    font-size: clamp(24px, 3vw, 34px);
}

.section-head a {
    color: var(--brand);
    font-weight: 900;
    white-space: nowrap;
}

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

.category-tile,
.category-overview-card a {
    position: relative;
    min-height: 168px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.72));
    box-shadow: 0 20px 50px rgba(2, 6, 23, 0.22);
}

.category-tile::before,
.category-overview-card a::before,
.movie-card::before,
.player-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    pointer-events: none;
    background: radial-gradient(circle at top right, rgba(250, 204, 21, 0.20), transparent 12rem);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.category-tile:hover::before,
.category-overview-card a:hover::before,
.movie-card:hover::before,
.player-card:hover::before {
    opacity: 1;
}

.category-tile span,
.category-overview-card span {
    color: var(--brand);
    font-weight: 900;
}

.category-tile strong,
.category-overview-card p {
    color: var(--soft);
    line-height: 1.7;
}

.category-tile em,
.category-overview-card strong {
    color: var(--text);
    font-style: normal;
    font-weight: 900;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.24);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(250, 204, 21, 0.38);
    box-shadow: 0 24px 70px rgba(250, 204, 21, 0.10);
}

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

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

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

.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    color: #020617;
    background: var(--brand);
}

.play-chip {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 8px 12px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.movie-info {
    position: relative;
    padding: 16px;
}

.movie-info h2 {
    margin: 0 0 10px;
    font-size: 17px;
    line-height: 1.35;
}

.movie-info h2 a:hover,
.feature-text h2 a:hover {
    color: var(--brand);
}

.movie-info p {
    min-height: 46px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
}

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

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

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

.compact-card {
    display: grid;
    grid-template-columns: auto 70px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.compact-card:hover {
    transform: translateX(4px);
    border-color: rgba(250, 204, 21, 0.32);
    background: rgba(250, 204, 21, 0.08);
}

.compact-card img {
    width: 70px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    background: #111827;
}

.compact-card strong {
    display: block;
    margin-bottom: 6px;
    line-height: 1.35;
}

.compact-card span:not(.rank-no) {
    color: var(--muted);
    font-size: 13px;
}

.rank-no {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: #020617;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    font-weight: 900;
}

.feature-list {
    display: grid;
    gap: 34px;
}

.feature-row {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 34px;
    align-items: center;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: rgba(15, 23, 42, 0.72);
}

.feature-row.reverse {
    grid-template-columns: 1.1fr 0.9fr;
}

.feature-row.reverse .feature-image {
    order: 2;
}

.feature-image img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: 24px;
    background: #111827;
}

.feature-text h2 {
    margin: 12px 0;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.05;
}

.feature-text p {
    color: var(--soft);
    line-height: 1.9;
}

.page-main {
    min-height: 60vh;
}

.page-hero {
    width: min(1440px, calc(100% - 32px));
    margin: 36px auto 0;
    padding: 80px 46px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(circle at 82% 20%, rgba(250, 204, 21, 0.22), transparent 18rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.82));
    box-shadow: var(--shadow);
}

.page-hero.slim {
    padding: 62px 42px;
}

.page-hero p {
    max-width: 820px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 220px 220px;
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    padding: 13px 16px;
}

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

.category-overview-card h2 {
    margin: 16px 0 8px;
}

.detail-hero {
    width: min(1440px, calc(100% - 32px));
    margin: 34px auto 0;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 38px;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(circle at 80% 16%, rgba(250, 204, 21, 0.18), transparent 18rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.80));
    box-shadow: var(--shadow);
}

.detail-poster {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: #111827;
    box-shadow: 0 22px 60px rgba(2, 6, 23, 0.38);
}

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

.detail-poster span {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 8px 12px;
    color: #020617;
    background: var(--brand);
}

.detail-copy {
    align-self: center;
}

.detail-copy h1 {
    font-size: clamp(40px, 5vw, 72px);
}

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

.detail-meta span {
    padding: 10px 13px;
    color: var(--soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 13px;
}

.player-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #000;
    box-shadow: var(--shadow);
}

.movie-player {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000;
}

.player-start {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    color: var(--text);
    border: 0;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.76));
    cursor: pointer;
}

.player-start span {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    padding-left: 4px;
    color: #020617;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 18px 50px rgba(250, 204, 21, 0.26);
    font-size: 30px;
}

.player-start strong {
    font-size: 18px;
}

.player-card.playing .player-start {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.detail-article {
    margin-top: 30px;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.76);
}

.detail-article h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.detail-article p {
    margin: 0 0 24px;
    color: var(--soft);
    line-height: 2;
    font-size: 17px;
}

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

.site-footer {
    margin-top: 34px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), #020617);
}

.footer-grid {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 30px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr;
    gap: 38px;
}

.footer-grid p {
    color: var(--muted);
    line-height: 1.8;
}

.footer-grid h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

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

.footer-bottom {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 14px;
}

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

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

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

    .header-search {
        margin-left: auto;
    }

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

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

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

    .rank-panel {
        position: static;
    }
}

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

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

    .hero-content {
        grid-template-columns: 1fr;
        align-items: end;
        padding-top: 58px;
    }

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

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

    .filter-panel,
    .detail-layout,
    .feature-row,
    .feature-row.reverse,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .feature-row.reverse .feature-image {
        order: 0;
    }

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

@media (max-width: 560px) {
    .header-inner,
    .content-wrap,
    .category-strip,
    .feature-section,
    .page-hero,
    .detail-hero,
    .footer-grid,
    .footer-bottom,
    .mobile-panel {
        width: min(100% - 22px, 1440px);
    }

    .brand {
        font-size: 20px;
    }

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

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

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

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

    .category-grid,
    .category-overview-grid,
    .movie-grid,
    .movie-grid.dense,
    .related-grid,
    .rank-grid {
        grid-template-columns: 1fr;
    }

    .page-hero,
    .detail-layout,
    .detail-article {
        padding: 26px;
        border-radius: 24px;
    }

    .feature-image img {
        height: 260px;
    }
}
