:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-panel: rgba(15, 23, 42, 0.82);
    --panel: #111827;
    --panel-2: #1e293b;
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #cbd5e1;
    --brand: #f59e0b;
    --brand-2: #f97316;
    --brand-soft: rgba(245, 158, 11, 0.16);
    --danger: #ef4444;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.15), transparent 34rem),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.13), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(2, 6, 23, 0.78);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-radius: 14px;
    box-shadow: 0 14px 32px rgba(245, 158, 11, 0.32);
}

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

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

.brand-text small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.72rem;
}

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

.desktop-nav a,
.mobile-nav a {
    padding: 9px 12px;
    color: var(--muted-2);
    border-radius: 12px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: white;
    background: rgba(148, 163, 184, 0.14);
    transform: translateY(-1px);
}

.header-search {
    display: flex;
    align-items: center;
    overflow: hidden;
    min-width: 260px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.8);
    border-radius: 999px;
}

.header-search input {
    width: 100%;
    min-width: 0;
    padding: 10px 14px;
    color: white;
    background: transparent;
    border: 0;
    outline: 0;
}

.header-search button,
.hero-search button {
    padding: 10px 16px;
    color: #111827;
    font-weight: 700;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    border: 0;
    cursor: pointer;
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    color: white;
    background: rgba(148, 163, 184, 0.14);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--line);
    border-radius: 18px;
}

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

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

.hero-track {
    position: relative;
    min-height: 690px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(2, 6, 23, 0.7)),
        radial-gradient(circle at 70% 30%, rgba(245, 158, 11, 0.35), transparent 26rem);
}

.hero-backdrop::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 38%, rgba(2, 6, 23, 0.25) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, transparent 35%);
}

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

.hero-backdrop img.is-missing,
.poster-wrap img.is-missing {
    opacity: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 132px 0 190px;
}

.eyebrow {
    margin: 0 0 10px;
    color: #fbbf24;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    max-width: 860px;
    margin: 0;
    font-size: clamp(2.4rem, 7vw, 5.7rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-desc,
.page-hero p,
.detail-one-line {
    max-width: 760px;
    margin: 22px 0 0;
    color: var(--muted-2);
    font-size: clamp(1rem, 2.5vw, 1.2rem);
}

.hero-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.hero-meta span,
.card-meta span {
    padding: 6px 11px;
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
}

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

.hero-tags,
.detail-tags {
    margin-top: 18px;
}

.tag-row span {
    padding: 6px 10px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 999px;
    font-size: 0.83rem;
}

.tag-row.compact {
    margin-top: 14px;
}

.tag-row.compact span {
    padding: 4px 8px;
    font-size: 0.74rem;
}

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

.button {
    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, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button.primary {
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 16px 36px rgba(249, 115, 22, 0.28);
}

.button.ghost {
    color: white;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
}

.button.small {
    min-height: 38px;
    padding: 0 14px;
    font-size: 0.9rem;
}

.hero-controls {
    position: absolute;
    right: max(16px, calc((100% - var(--container)) / 2));
    bottom: 118px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-controls button {
    color: white;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid var(--line);
    cursor: pointer;
}

.hero-controls > button {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 1.8rem;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    opacity: 0.5;
}

.hero-dot.is-active {
    width: 28px;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    opacity: 1;
}

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 36px;
    z-index: 6;
    display: flex;
    width: min(760px, calc(100% - 32px));
    overflow: hidden;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow);
    transform: translateX(-50%);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    padding: 18px 22px;
    color: white;
    background: transparent;
    border: 0;
    outline: 0;
}

.content-section {
    padding: 64px 0;
}

.intro-section {
    padding-bottom: 28px;
}

.intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 28px;
    align-items: center;
    padding: 28px;
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.intro-grid h2,
.section-title-row h2,
.category-overview-head h2,
.text-panel h2,
.info-panel h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    line-height: 1.15;
}

.intro-grid p,
.section-title-row span,
.category-overview-head span,
.text-panel p,
.info-panel dd,
.category-tile small,
.category-tile em {
    color: var(--muted-2);
}

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

.stat-grid div {
    padding: 18px;
    background: rgba(30, 41, 59, 0.76);
    border: 1px solid var(--line);
    border-radius: 18px;
}

.stat-grid strong {
    display: block;
    color: #fbbf24;
    font-size: 2rem;
    line-height: 1;
}

.stat-grid span {
    color: var(--muted);
    font-size: 0.9rem;
}

.section-title-row,
.category-overview-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.text-link {
    color: #fbbf24;
    font-weight: 800;
}

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

.category-tile,
.category-rank-card,
.category-overview-card,
.text-panel,
.info-panel {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.2);
}

.category-tile {
    display: flex;
    min-height: 210px;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.movie-card:hover {
    border-color: rgba(251, 191, 36, 0.42);
    transform: translateY(-4px);
}

.category-tile span {
    color: #fde68a;
    font-weight: 900;
}

.category-tile strong {
    font-size: 2rem;
}

.category-tile em {
    font-size: 0.82rem;
    font-style: normal;
}

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

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

.movie-card {
    overflow: hidden;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid var(--line);
    border-radius: 20px;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(245, 158, 11, 0.18), rgba(15, 23, 42, 0.84)),
        radial-gradient(circle at 40% 25%, rgba(251, 191, 36, 0.22), transparent 10rem);
}

.poster-wrap::after {
    position: absolute;
    inset: auto 14px 16px;
    display: none;
    content: attr(data-title);
    color: rgba(255, 255, 255, 0.76);
    font-weight: 900;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.46);
}

.poster-wrap:has(img.is-missing)::after {
    display: block;
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.2s ease;
}

.movie-card:hover .poster-wrap img {
    transform: scale(1.05);
}

.quality-badge,
.play-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 900;
}

.quality-badge {
    top: 10px;
    right: 10px;
    padding: 5px 8px;
    color: #111827;
    background: #fbbf24;
}

.play-badge {
    right: 10px;
    bottom: 10px;
    padding: 6px 10px;
    color: white;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.rank-badge {
    top: 10px;
    left: 10px;
    padding: 5px 8px;
    color: white;
    background: rgba(239, 68, 68, 0.9);
}

.card-body {
    padding: 14px;
}

.card-title {
    display: block;
    overflow: hidden;
    color: white;
    font-size: 1rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-body p {
    display: -webkit-box;
    height: 44px;
    margin: 8px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.86rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-meta {
    gap: 6px;
    margin-top: 12px;
}

.card-meta span {
    padding: 4px 7px;
    color: var(--muted-2);
    font-size: 0.74rem;
}

.ranking-panel {
    padding-top: 20px;
}

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

.ranking-list.compact-list {
    grid-template-columns: 1fr;
}

.ranking-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.ranking-item strong {
    color: #fbbf24;
    font-size: 1.1rem;
}

.ranking-item span {
    overflow: hidden;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-item em {
    color: var(--muted);
    font-style: normal;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 86px 0 74px;
    background:
        radial-gradient(circle at 78% 20%, rgba(245, 158, 11, 0.22), transparent 28rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
    border-bottom: 1px solid var(--line);
}

.small-hero {
    padding: 78px 0 64px;
}

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

.breadcrumb a {
    color: #fbbf24;
}

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

.filter-bar.wide {
    grid-template-columns: minmax(260px, 1fr) 180px 180px;
}

.filter-bar label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 800;
}

.filter-bar input,
.filter-bar select {
    min-height: 46px;
    padding: 0 14px;
    color: white;
    background: rgba(2, 6, 23, 0.62);
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: 0;
}

.empty-message {
    margin: 28px 0 0;
    padding: 22px;
    color: var(--muted-2);
    text-align: center;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid var(--line);
    border-radius: 18px;
}

.category-overview-list {
    display: grid;
    gap: 24px;
    padding: 56px 0;
}

.category-overview-card,
.category-rank-card {
    padding: 24px;
}

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

.detail-poster.large {
    aspect-ratio: 2 / 3;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.detail-info h1 {
    font-size: clamp(2.2rem, 5vw, 4.8rem);
}

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

.text-panel,
.info-panel {
    padding: 28px;
}

.review-panel {
    grid-column: 1 / -1;
}

.text-panel p {
    margin: 16px 0 0;
    font-size: 1.03rem;
}

.info-panel dl {
    display: grid;
    gap: 12px;
    margin: 18px 0 0;
}

.info-panel div {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.info-panel dt {
    color: var(--muted);
    font-weight: 800;
}

.info-panel dd {
    margin: 0;
}

.video-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background:
        radial-gradient(circle at center, rgba(245, 158, 11, 0.18), transparent 22rem),
        #020617;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.video-frame video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    gap: 14px;
    place-content: center;
    color: white;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.76));
    border: 0;
    cursor: pointer;
}

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

.player-start span {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    margin: 0 auto;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    border-radius: 999px;
    box-shadow: 0 18px 48px rgba(249, 115, 22, 0.34);
}

.player-start strong {
    font-size: 1.2rem;
}

.player-status {
    position: absolute;
    left: 18px;
    bottom: 16px;
    margin: 0;
    padding: 8px 12px;
    color: var(--muted-2);
    background: rgba(2, 6, 23, 0.68);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.85rem;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
}

.footer-brand {
    margin-bottom: 16px;
}

.site-footer p {
    color: var(--muted-2);
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 1.05rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a {
    padding: 8px 11px;
    color: var(--muted-2);
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid var(--line);
    border-radius: 999px;
}

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

    .mobile-menu-button {
        display: block;
        margin-left: auto;
    }

    .header-search {
        display: none;
    }

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

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

    .footer-grid,
    .intro-grid,
    .detail-content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .container,
    .content-section {
        width: min(100% - 24px, var(--container));
    }

    .header-inner {
        min-height: 64px;
    }

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

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

    .hero-content {
        padding: 96px 0 210px;
    }

    .hero-controls {
        right: 16px;
        bottom: 126px;
    }

    .hero-search {
        flex-direction: column;
        border-radius: 22px;
    }

    .hero-search button {
        width: 100%;
        padding: 14px;
    }

    .section-title-row,
    .category-overview-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .category-grid,
    .category-rank-grid,
    .movie-grid,
    .movie-grid.mini-grid,
    .ranking-list,
    .filter-bar,
    .filter-bar.wide,
    .detail-layout,
    .footer-grid,
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .movie-grid {
        gap: 14px;
    }

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

    .poster-wrap {
        min-height: 180px;
    }

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

    .video-frame {
        border-radius: 18px;
    }
}

@media (max-width: 480px) {
    .movie-card {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .card-body {
        padding: 12px;
    }

    .card-body p {
        height: 40px;
    }

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        letter-spacing: -0.04em;
    }
}
