:root {
    --bg-0: #020617;
    --bg-1: #0f172a;
    --bg-2: #1e293b;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(30, 41, 59, 0.92);
    --line: rgba(148, 163, 184, 0.18);
    --line-soft: rgba(245, 158, 11, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #cbd5e1;
    --amber: #f59e0b;
    --amber-2: #f97316;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 36rem),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.10), transparent 32rem),
        linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 48%, var(--bg-0) 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.page-shell {
    min-height: 100vh;
    overflow-x: hidden;
}

.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.88);
    border-bottom: 1px solid var(--line-soft);
    backdrop-filter: blur(14px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.site-logo-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--amber-2));
    border-radius: 14px;
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.28);
    transition: transform 0.25s ease;
}

.site-logo:hover .site-logo-mark {
    transform: scale(1.05) rotate(-3deg);
}

.site-logo-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.site-logo-copy strong {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fbbf24, #fb923c);
    -webkit-background-clip: text;
    color: transparent;
}

.site-logo-copy small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.75rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.main-nav a,
.mobile-nav a {
    color: var(--muted-2);
    font-weight: 600;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: #fbbf24;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: rgba(30, 41, 59, 0.78);
    border-radius: 12px;
    color: white;
}

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

.mobile-nav {
    display: none;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0 16px 16px;
}

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

.hero-carousel {
    position: relative;
    height: min(80vh, 760px);
    min-height: 520px;
    overflow: hidden;
    background: var(--bg-1);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
}

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
    filter: saturate(1.08);
}

.hero-vignette {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, var(--bg-0) 0%, rgba(15, 23, 42, 0.52) 42%, rgba(15, 23, 42, 0.18) 100%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.42) 46%, rgba(2, 6, 23, 0.10) 100%);
}

.hero-content {
    position: absolute;
    inset: auto 0 82px 0;
    z-index: 2;
}

.hero-content h1 {
    max-width: 780px;
    margin: 14px 0 18px;
    font-size: clamp(2.3rem, 6vw, 5.4rem);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.75;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 13px;
    color: #fff;
    background: rgba(245, 158, 11, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.hero-tags,
.tag-row,
.genre-row,
.rank-meta,
.detail-meta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span,
.genre-row span,
.rank-meta span,
.detail-meta-grid span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.20);
    border-radius: 999px;
    font-size: 0.78rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.hero-actions-left {
    justify-content: flex-start;
}

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

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

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--amber-2));
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.22);
}

.btn-ghost {
    color: #fff;
    background: rgba(15, 23, 42, 0.60);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    transform: translateY(-50%);
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    font-size: 2rem;
    backdrop-filter: blur(12px);
}

.hero-arrow:hover {
    background: rgba(245, 158, 11, 0.85);
}

.hero-arrow-left {
    left: 22px;
}

.hero-arrow-right {
    right: 22px;
}

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

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

.hero-dots button.is-active {
    width: 32px;
    background: var(--amber);
}

.section-block {
    padding: 74px 0;
}

.section-band {
    padding: 74px 0;
    background: rgba(15, 23, 42, 0.50);
    border-top: 1px solid rgba(148, 163, 184, 0.10);
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

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

.section-heading span,
.sub-hero > span,
.rank-feature-copy > span {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--amber);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-heading h2,
.sub-hero h1,
.detail-copy h1,
.rank-feature-copy h2 {
    margin: 0;
    color: #fff;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-heading h2 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.section-heading p,
.sub-hero p {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.section-link,
.category-more,
.rank-action,
.detail-quick a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.10);
    border: 1px solid rgba(245, 158, 11, 0.16);
    border-radius: 999px;
    font-weight: 800;
}

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

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

.movie-grid-featured .movie-card:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.72));
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(245, 158, 11, 0.34);
    box-shadow: 0 24px 70px rgba(245, 158, 11, 0.16);
}

.movie-card.is-filtered {
    display: none;
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(51, 65, 85, 0.75));
}

.movie-grid-featured .movie-card:first-child .movie-cover {
    aspect-ratio: 21 / 10;
}

.site-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.25s ease;
}

.site-image.image-error,
.hero-image.image-error {
    opacity: 0;
}

.movie-card:hover .site-image {
    transform: scale(1.09);
}

.cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(2, 6, 23, 0.90) 100%);
}

.card-play,
.player-play-icon {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    color: #fff;
    background: rgba(245, 158, 11, 0.88);
    border-radius: 999px;
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.28);
}

.card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.78);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-category,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    color: #fff;
    background: rgba(15, 23, 42, 0.80);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 10px;
    font-size: 0.74rem;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.card-category {
    top: 12px;
    left: 12px;
}

.rank-badge {
    top: 12px;
    right: 12px;
    color: #fde68a;
}

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

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

.movie-card h3 a:hover,
.rank-content h3 a:hover,
.rank-feature-copy h2 a:hover {
    color: #fbbf24;
}

.movie-meta,
.movie-line {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.65;
}

.movie-line {
    display: -webkit-box;
    min-height: 2.8em;
    margin-top: 8px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

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

.category-grid-large {
    margin-top: 28px;
}

.category-panel {
    padding: 18px;
}

.category-panel-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.category-panel-head span {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, var(--amber), var(--amber-2));
    border-radius: 15px;
    font-weight: 900;
}

.category-panel-head strong {
    font-size: 1.1rem;
}

.category-panel p {
    min-height: 5.6em;
    margin: 0;
    color: var(--muted-2);
    line-height: 1.75;
    font-size: 0.92rem;
}

.category-samples {
    display: grid;
    gap: 8px;
    margin: 18px 0;
}

.category-samples a,
.category-strip small {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.84rem;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.category-strip {
    display: grid;
    gap: 10px;
    padding: 18px;
    background: rgba(15, 23, 42, 0.70);
    border: 1px solid var(--line);
    border-radius: 18px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-strip:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.35);
}

.category-strip span {
    color: var(--amber);
    font-size: 0.8rem;
    font-weight: 900;
}

.category-strip strong {
    color: #fff;
}

.home-search {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 28px 0 0;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(520px, 100%);
    min-height: 50px;
    padding: 0 16px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid var(--line);
    border-radius: 16px;
    backdrop-filter: blur(12px);
}

.search-box.wide {
    width: min(720px, 100%);
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    color: white;
    background: transparent;
}

.search-box input::placeholder {
    color: #64748b;
}

.quick-links,
.chip-row,
.detail-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-links a,
.chip {
    min-height: 38px;
    padding: 8px 14px;
    color: var(--muted-2);
    background: rgba(30, 41, 59, 0.72);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-weight: 700;
}

.chip {
    color: var(--muted-2);
}

.quick-links a:hover,
.chip:hover,
.chip.is-active {
    color: #fff;
    background: rgba(245, 158, 11, 0.82);
    border-color: rgba(245, 158, 11, 0.32);
}

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

.toolbar-sticky {
    position: sticky;
    top: 88px;
    z-index: 8;
    padding: 14px;
    background: rgba(2, 6, 23, 0.80);
    border: 1px solid var(--line);
    border-radius: 20px;
    backdrop-filter: blur(14px);
}

.sub-hero {
    padding: 74px 0 30px;
}

.sub-hero h1,
.detail-copy h1 {
    font-size: clamp(2rem, 5vw, 4.4rem);
    line-height: 1.05;
}

.category-hero,
.ranking-hero {
    position: relative;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 120px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
}

.rank-number {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.20);
    border-radius: 15px;
    font-weight: 900;
}

.rank-poster {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-2);
    border-radius: 14px;
}

.rank-content h3 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 1.1rem;
}

.rank-content p {
    display: -webkit-box;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--muted);
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-feature {
    display: grid;
    grid-template-columns: minmax(260px, 0.85fr) 1fr;
    gap: 28px;
    align-items: center;
    padding: 22px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.72));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.rank-feature-cover {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-2);
    border-radius: 22px;
}

.rank-feature-copy h2 {
    margin-bottom: 12px;
    font-size: clamp(2rem, 4vw, 3.8rem);
}

.rank-feature-copy p {
    margin: 0 0 16px;
    color: var(--muted-2);
    line-height: 1.8;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 28px 0 16px;
    color: var(--muted);
    font-size: 0.92rem;
}

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

.player-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: white;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.20), rgba(2, 6, 23, 0.72));
    border: 0;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-overlay strong {
    font-size: 1.15rem;
}

.watch-aside {
    display: grid;
    gap: 16px;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.detail-main {
    padding: 36px 0 74px;
}

.detail-copy {
    max-width: 940px;
}

.detail-copy h1 {
    margin: 16px 0;
}

.detail-one-line {
    margin: 0 0 20px;
    color: var(--muted-2);
    font-size: 1.12rem;
    line-height: 1.8;
}

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

.detail-tags {
    margin-bottom: 30px;
}

.detail-copy h2 {
    margin: 30px 0 12px;
    color: #fff;
    font-size: 1.5rem;
}

.detail-copy p {
    margin: 0;
    color: var(--muted-2);
    font-size: 1.02rem;
    line-height: 1.9;
}

.genre-row {
    margin-top: 24px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr 0.6fr;
    gap: 30px;
}

.site-footer p {
    max-width: 520px;
    margin: 18px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #fff;
}

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

.site-footer a:not(.site-logo):hover {
    color: #fbbf24;
}

.footer-bottom {
    margin-top: 34px;
    padding-top: 22px;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.10);
    text-align: center;
    font-size: 0.86rem;
}

@media (max-width: 1180px) {
    .movie-grid-featured,
    .movie-grid-small,
    .category-grid,
    .category-strip-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

    .nav-toggle {
        display: block;
    }

    .site-logo-copy small {
        display: none;
    }

    .hero-carousel {
        min-height: 560px;
        height: 72vh;
    }

    .hero-content {
        inset: auto 0 72px 0;
    }

    .hero-arrow {
        display: none;
    }

    .home-search,
    .toolbar,
    .section-heading,
    .player-layout,
    .rank-feature,
    .footer-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

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

    .movie-grid-featured .movie-card:first-child {
        grid-column: span 2;
    }

    .rank-row {
        grid-template-columns: 44px 84px 1fr;
    }

    .rank-action {
        grid-column: 2 / -1;
        width: fit-content;
    }

    .player-layout {
        display: grid;
    }

    .watch-aside {
        grid-template-columns: 120px 1fr;
        align-items: start;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

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

    .site-logo-mark {
        width: 38px;
        height: 38px;
    }

    .site-logo-copy strong {
        font-size: 1rem;
    }

    .hero-content h1 {
        font-size: 2.35rem;
    }

    .hero-actions,
    .quick-links,
    .chip-row {
        align-items: stretch;
    }

    .btn,
    .quick-links a,
    .chip {
        justify-content: center;
    }

    .movie-grid-featured,
    .movie-grid-small,
    .category-grid,
    .category-strip-grid {
        grid-template-columns: 1fr;
    }

    .movie-grid-featured .movie-card:first-child {
        grid-column: auto;
    }

    .rank-row {
        grid-template-columns: 40px 76px 1fr;
        gap: 10px;
    }

    .rank-content p,
    .rank-meta {
        display: none;
    }

    .watch-aside {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        display: none;
    }
}
