:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --card: rgba(30, 41, 59, 0.78);
    --card-soft: rgba(30, 41, 59, 0.52);
    --line: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --amber: #f59e0b;
    --orange: #f97316;
    --blue: #3b82f6;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
    --radius: 24px;
}

* {
    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% -10%, rgba(245, 158, 11, 0.18), transparent 34rem),
        radial-gradient(circle at 88% 8%, rgba(59, 130, 246, 0.18), transparent 28rem),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
}

body::-webkit-scrollbar {
    width: 10px;
}

body::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.8);
}

body::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.65);
    border-radius: 999px;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.66));
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

.site-header.is-scrolled {
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
}

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

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    white-space: nowrap;
    background: linear-gradient(90deg, #fbbf24, #f97316, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #020617;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.42);
}

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

.main-nav a {
    color: var(--soft);
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.25s ease, background 0.25s ease;
}

.main-nav a:hover {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
}

.quick-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    background: rgba(2, 6, 23, 0.54);
    border-radius: 999px;
}

.quick-search input {
    width: 160px;
    border: 0;
    color: var(--text);
    outline: none;
    background: transparent;
    padding: 6px 8px;
}

.quick-search button,
.primary-btn,
.ghost-btn,
.section-more {
    border: 0;
    border-radius: 999px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.quick-search button,
.primary-btn {
    color: #111827;
    font-weight: 800;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    padding: 10px 18px;
    box-shadow: 0 14px 32px rgba(245, 158, 11, 0.28);
}

.primary-btn:hover,
.quick-search button:hover,
.section-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(245, 158, 11, 0.34);
}

.ghost-btn,
.section-more {
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.34);
    background: rgba(245, 158, 11, 0.1);
    padding: 10px 18px;
    font-weight: 800;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.78);
    border-radius: 14px;
    padding: 10px;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--text);
    border-radius: 999px;
}

.hero {
    min-height: 720px;
    position: relative;
    overflow: hidden;
    padding-top: 72px;
}

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

.hero-slider {
    top: 72px;
}

.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-backdrop {
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 44%, rgba(2, 6, 23, 0.32) 100%),
        radial-gradient(circle at 76% 22%, rgba(245, 158, 11, 0.18), transparent 28rem);
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.32;
    filter: saturate(1.16) contrast(1.08);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    min-height: 648px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 760px;
    margin-left: max(16px, calc((100vw - 1280px) / 2));
    padding: 80px 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: #fbbf24;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 7px 12px;
    border: 1px solid rgba(245, 158, 11, 0.26);
    background: rgba(245, 158, 11, 0.08);
    border-radius: 999px;
}

.hero h1 {
    margin: 22px 0 14px;
    font-size: clamp(44px, 8vw, 86px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero p,
.page-hero p,
.section-title p,
.detail-one-line,
.movie-card p,
.site-footer p {
    color: var(--muted);
    line-height: 1.8;
}

.hero p {
    max-width: 660px;
    font-size: 18px;
}

.hero-meta,
.detail-meta,
.meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--soft);
    margin: 18px 0;
}

.hero-meta span,
.detail-meta span,
.meta-line span {
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    padding: 6px 10px;
    font-size: 13px;
}

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

.tag-row span {
    color: #fbbf24;
    font-size: 12px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    background: rgba(245, 158, 11, 0.08);
    border-radius: 999px;
    padding: 5px 9px;
}

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

.hero-poster {
    position: absolute;
    right: max(16px, calc((100vw - 1280px) / 2));
    top: 50%;
    z-index: 2;
    width: min(350px, 30vw);
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.28), rgba(59, 130, 246, 0.18));
    box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.08);
    transform: translateY(-50%) rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    color: #111827;
    background: #fbbf24;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 900;
}

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

.hero-dot {
    width: 38px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

.hero-dot.active {
    background: #fbbf24;
}

.quick-categories,
.content-section,
.page-shell,
.detail-shell,
.site-footer {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.quick-categories {
    position: relative;
    z-index: 5;
    margin-top: -48px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.quick-categories a,
.category-tile,
.movie-card,
.rank-row,
.search-panel,
.detail-content article,
.detail-content aside,
.player-shell {
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.62));
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(18px);
}

.quick-categories a,
.category-tile {
    display: flex;
    min-height: 118px;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
    border-radius: 22px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.quick-categories a:hover,
.category-tile:hover,
.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.44);
}

.quick-categories strong,
.category-tile span {
    font-size: 18px;
    color: var(--text);
}

.quick-categories span,
.category-tile p {
    color: var(--muted);
    line-height: 1.6;
    margin-top: 8px;
}

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

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

.section-title h2,
.page-hero h1,
.detail-info h1 {
    margin: 12px 0 8px;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(59, 130, 246, 0.15)),
        rgba(15, 23, 42, 0.85);
}

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

.rating {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    color: #111827;
    background: #fbbf24;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 900;
}

.play-mark {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 2;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #111827;
    background: rgba(251, 191, 36, 0.94);
    border-radius: 999px;
    font-size: 14px;
}

.card-body {
    padding: 14px;
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

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

.movie-card p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 50px;
    margin: 0 0 12px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 13px;
}

.meta-line {
    margin: 0;
    gap: 6px;
}

.meta-line span {
    font-size: 11px;
    padding: 4px 7px;
}

.page-shell,
.detail-shell {
    padding-top: 112px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.62)),
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.22), transparent 22rem);
    border-radius: 30px;
    padding: 46px;
    margin-bottom: 34px;
    box-shadow: var(--shadow);
}

.small-hero h1 {
    max-width: 850px;
}

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

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

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 42px 0 10px;
}

.page-num,
.pagination .gap {
    min-width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--soft);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.78);
    border-radius: 12px;
}

.page-num.active,
.page-num:hover {
    color: #111827;
    background: #fbbf24;
    border-color: #fbbf24;
}

.rank-list {
    display: grid;
    gap: 10px;
}

.rank-head,
.rank-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 90px 120px;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border-radius: 18px;
}

.rank-head {
    color: var(--muted);
    background: rgba(15, 23, 42, 0.5);
}

.rank-index {
    color: #fbbf24;
    font-size: 26px;
    font-weight: 900;
}

.rank-score {
    color: #fbbf24;
    font-weight: 900;
}

.rank-views {
    color: var(--muted);
}

.mini-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.mini-cover {
    width: 58px;
    height: 78px;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(59, 130, 246, 0.16));
}

.mini-info {
    min-width: 0;
}

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

.mini-info em {
    color: var(--muted);
    font-style: normal;
    margin-top: 6px;
}

.search-panel {
    display: flex;
    gap: 12px;
    max-width: 780px;
    padding: 12px;
    border-radius: 20px;
    margin-top: 24px;
}

.search-panel input,
.search-panel select {
    min-height: 48px;
    color: var(--text);
    border: 1px solid rgba(148, 163, 184, 0.16);
    outline: none;
    background: rgba(2, 6, 23, 0.5);
    border-radius: 14px;
    padding: 0 14px;
}

.search-panel input {
    flex: 1;
}

.detail-hero {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
    margin-bottom: 32px;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(59, 130, 246, 0.18));
    box-shadow: var(--shadow);
}

.detail-info {
    padding: 38px;
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.64));
    border-radius: 30px;
}

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

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

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

.player-section {
    margin-bottom: 34px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000;
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-start {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    color: var(--text);
    border: 0;
    background:
        radial-gradient(circle at center, rgba(245, 158, 11, 0.22), transparent 18rem),
        rgba(2, 6, 23, 0.58);
    cursor: pointer;
}

.player-start span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    color: #111827;
    font-size: 32px;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    border-radius: 999px;
    box-shadow: 0 18px 58px rgba(245, 158, 11, 0.38);
}

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

.player-shell.is-playing .player-start {
    display: none;
}

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

.detail-content article,
.detail-content aside {
    border-radius: 26px;
    padding: 28px;
}

.detail-content h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-content p {
    color: var(--soft);
    line-height: 1.95;
    margin: 0 0 24px;
}

dl {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 12px 16px;
    margin: 0;
}

dt {
    color: var(--muted);
}

dd {
    margin: 0;
    color: var(--soft);
}

.site-footer {
    margin-top: 84px;
    padding: 42px 0 56px;
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
}

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

.site-footer a:not(.footer-logo) {
    display: block;
    color: var(--muted);
    margin: 10px 0;
}

.site-footer a:hover {
    color: #fbbf24;
}

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

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

    .hero-poster {
        opacity: 0.72;
    }
}

@media (max-width: 860px) {
    .header-inner {
        height: 64px;
    }

    .nav-toggle {
        display: block;
        margin-left: auto;
    }

    .main-nav {
        position: absolute;
        top: 64px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        background: rgba(15, 23, 42, 0.98);
        border: 1px solid var(--line);
        border-radius: 20px;
    }

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

    .quick-search {
        display: none;
    }

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

    .hero-content {
        margin-left: auto;
        padding-top: 40px;
    }

    .hero-poster {
        display: none;
    }

    .quick-categories,
    .category-grid,
    .movie-grid,
    .listing-grid,
    .footer-grid,
    .detail-hero,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .section-title,
    .search-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .rank-head,
    .rank-row {
        grid-template-columns: 48px minmax(0, 1fr) 64px;
    }

    .rank-head span:last-child,
    .rank-views {
        display: none;
    }

    .page-hero,
    .detail-info {
        padding: 28px;
    }

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

@media (max-width: 520px) {
    .movie-grid,
    .listing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .content-section {
        padding-top: 52px;
    }

    .card-body {
        padding: 11px;
    }

    .movie-card p {
        display: none;
    }

    .hero h1 {
        font-size: 44px;
    }

    .page-shell,
    .detail-shell {
        padding-top: 92px;
    }
}
