:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: #0f172a;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --amber: #f59e0b;
    --orange: #f97316;
    --red: #ef4444;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 32rem),
        radial-gradient(circle at top right, rgba(239, 68, 68, 0.10), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 58%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

.header-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 76px;
    margin: 0 auto;
    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: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--red));
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.24);
}

.brand-text strong {
    display: block;
    color: #fff;
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: 0.02em;
}

.brand-text em {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

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

.nav-link {
    position: relative;
    color: var(--soft);
    font-size: 15px;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
}

.nav-link.active::after,
.nav-link:hover::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -12px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--amber), var(--red));
}

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

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

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

.mobile-link {
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.62);
}

.hero {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: stretch;
}

.hero-stage {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

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

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

.hero-slide img,
.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.72) 46%, rgba(15, 23, 42, 0.12)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.80), transparent 46%);
}

.hero-copy {
    position: absolute;
    inset: 0;
    max-width: 720px;
    padding: 72px 58px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.eyebrow {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.eyebrow span,
.tag-row span,
.tag-cloud span,
.genre-cloud span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.13);
    font-size: 12px;
    font-weight: 700;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 620px;
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: 18px;
}

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

.primary-button,
.ghost-button,
.panel-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #fb7185);
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.28);
}

.ghost-button,
.panel-link {
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    background: rgba(15, 23, 42, 0.62);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #fff;
    background: rgba(2, 6, 23, 0.62);
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

.hero-dots {
    position: absolute;
    left: 58px;
    bottom: 38px;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.64);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 34px;
    background: var(--amber);
}

.hero-side,
.side-panel,
.info-card,
.story-card,
.category-card,
.ranking-hero,
.filter-panel {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.64);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.hero-side {
    padding: 24px;
}

.hero-side h2,
.side-panel h2,
.info-card h2,
.story-card h2 {
    margin: 0 0 18px;
    font-size: 22px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: auto 70px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.30);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    border-color: rgba(245, 158, 11, 0.44);
    background: rgba(30, 41, 59, 0.72);
    transform: translateY(-2px);
}

.rank-row img {
    width: 70px;
    height: 54px;
    object-fit: cover;
    border-radius: 12px;
    background: #111827;
}

.rank-row strong,
.rank-row em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-row strong {
    font-size: 14px;
    color: #fff;
}

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

.row-rank {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #fb7185);
    font-weight: 900;
    font-size: 12px;
}

.section,
.category-strip,
.page-main {
    padding-top: 60px;
}

.category-strip h2,
.section-head h2,
.page-title h1 {
    margin: 0;
}

.chip-grid,
.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.chip-grid a,
.category-nav a {
    padding: 11px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.56);
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.chip-grid a:hover,
.category-nav a:hover,
.category-nav a.active {
    color: #fff;
    border-color: rgba(245, 158, 11, 0.48);
    background: rgba(245, 158, 11, 0.14);
}

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

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

.section-head span,
.page-title span {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--amber);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-head h2,
.page-title h1 {
    color: #fff;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.section-head p,
.page-title p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.54);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(245, 158, 11, 0.46);
    box-shadow: 0 20px 50px rgba(245, 158, 11, 0.10);
    transform: translateY(-5px);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, filter 0.45s ease;
}

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.80), transparent 58%);
}

.play-float {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #111827;
    background: rgba(251, 191, 36, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #fb7185);
    font-size: 13px;
}

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

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

.movie-card h3 {
    margin: 8px 0 7px;
    color: #fff;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: #fde68a;
}

.movie-card p {
    min-height: 3.2em;
    margin: 0;
    color: #aab6c7;
    font-size: 13px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-row span {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 11px;
}

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

.panel-link {
    width: 100%;
    margin-top: 16px;
}

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

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

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

.breadcrumb > * + *::before {
    content: "/";
    margin-right: 8px;
    color: #475569;
}

.page-title {
    padding: 38px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(239, 68, 68, 0.06)),
        rgba(15, 23, 42, 0.58);
    box-shadow: var(--shadow);
}

.category-page-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 26px;
}

.category-card {
    overflow: hidden;
}

.category-card a {
    display: block;
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    height: 150px;
    overflow: hidden;
    background: #111827;
}

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

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

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

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

.category-card-body span {
    color: #fde68a;
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 14px;
    margin: 24px 0;
    padding: 16px;
}

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

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    outline: none;
    color: #fff;
    background: rgba(2, 6, 23, 0.58);
    padding: 0 14px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(245, 158, 11, 0.52);
}

.detail-main {
    padding-top: 34px;
}

.detail-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.42fr) minmax(320px, 0.72fr);
    gap: 26px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: var(--shadow);
}

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

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.84), rgba(15, 23, 42, 0.86));
}

.player-column,
.detail-copy {
    position: relative;
    z-index: 1;
}

.player-column {
    padding: 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    background: #020617;
    box-shadow: 0 22px 80px rgba(0, 0, 0, 0.42);
}

.movie-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.18), rgba(2, 6, 23, 0.72));
}

.player-overlay span {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #fb7185);
    box-shadow: 0 24px 60px rgba(245, 158, 11, 0.32);
    font-size: 30px;
}

.player-overlay.is-hidden {
    display: none;
}

.detail-copy {
    padding: 46px 34px 46px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-copy h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.detail-one-line {
    margin: 18px 0 0;
    color: #dbeafe;
    font-size: 17px;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    margin-top: 24px;
}

.story-card,
.info-card {
    padding: 24px;
}

.story-card p {
    margin: 0;
    color: #cbd5e1;
    font-size: 16px;
}

.info-card {
    grid-row: span 2;
}

.info-card dl {
    display: grid;
    gap: 12px;
    margin: 0 0 20px;
}

.info-card dl div {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
}

.info-card dt {
    color: var(--muted);
}

.info-card dd {
    margin: 0;
    color: #fff;
}

.tag-cloud,
.genre-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.related-section {
    padding-bottom: 70px;
}

.ranking-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 24px;
    margin-top: 26px;
    padding: 24px;
}

.ranking-hero h2 {
    margin: 0 0 18px;
}

.ranking-poster {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    border-radius: 22px;
    background: #111827;
}

.ranking-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.ranking-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.90), transparent 58%);
}

.ranking-poster strong,
.ranking-poster span {
    position: absolute;
    z-index: 1;
    left: 22px;
    right: 22px;
}

.ranking-poster strong {
    bottom: 82px;
    color: #fff;
    font-size: 28px;
    line-height: 1.1;
}

.ranking-poster span {
    bottom: 24px;
    color: var(--soft);
}

.site-footer {
    margin-top: 72px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.78);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 30px;
    color: var(--muted);
}

.footer-brand {
    color: #fff;
    font-size: 20px;
    font-weight: 900;
}

.footer-inner p {
    max-width: 440px;
    margin: 8px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    justify-content: flex-end;
}

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

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

@media (max-width: 1080px) {
    .hero,
    .two-column,
    .detail-hero,
    .detail-content,
    .ranking-hero,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .hero-side,
    .side-panel {
        position: static;
    }

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

    .detail-copy {
        padding: 0 28px 34px;
    }

    .info-card {
        grid-row: auto;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero-stage {
        min-height: 500px;
    }

    .hero-copy {
        padding: 58px 28px;
    }

    .hero-dots {
        left: 28px;
    }

    .latest-section .latest-list,
    .category-page-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

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

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .container,
    .header-inner,
    .mobile-nav,
    .hero,
    .footer-inner {
        width: min(100% - 22px, 1180px);
    }

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

    .brand-text em {
        display: none;
    }

    .hero {
        margin-top: 18px;
        gap: 14px;
    }

    .hero-stage {
        min-height: 460px;
        border-radius: 22px;
    }

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

    .hero-copy p {
        font-size: 15px;
    }

    .hero-arrow {
        display: none;
    }

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

    .movie-card {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        min-height: 168px;
    }

    .poster-link {
        aspect-ratio: auto;
        height: 100%;
    }

    .movie-card p {
        min-height: 0;
    }

    .player-column {
        padding: 14px;
    }

    .detail-copy,
    .page-title,
    .story-card,
    .info-card {
        padding: 22px;
    }

    .player-overlay span {
        width: 68px;
        height: 68px;
    }
}
