:root {
    color-scheme: dark;
    --bg-950: #020617;
    --bg-925: #07111f;
    --bg-900: #0f172a;
    --bg-850: #111c31;
    --bg-800: #1e293b;
    --bg-700: #334155;
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --amber: #f59e0b;
    --amber-light: #fbbf24;
    --orange: #fb923c;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg-950);
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

.nav-inner {
    width: min(1180px, calc(100% - 32px));
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--bg-950);
    background: linear-gradient(135deg, var(--amber-light), var(--orange));
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.45);
    font-size: 15px;
}

.brand-name,
.footer-brand {
    font-size: 26px;
    line-height: 1;
    background: linear-gradient(90deg, var(--amber-light), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-links {
    display: flex;
    align-items: center;
    gap: 28px;
    color: var(--muted);
    font-weight: 650;
}

.desktop-links a,
.nav-dropdown > a {
    transition: color 0.2s ease;
}

.desktop-links a:hover,
.desktop-links a.is-active,
.nav-dropdown > a:hover,
.nav-dropdown > a.is-active {
    color: var(--amber-light);
}

.nav-dropdown {
    position: relative;
    padding: 20px 0;
}

.dropdown-panel {
    position: absolute;
    top: 58px;
    left: -18px;
    width: 190px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-panel a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--muted);
}

.dropdown-panel a:hover {
    background: rgba(245, 158, 11, 0.12);
}

.nav-search {
    position: relative;
    width: 270px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search input,
.page-filter input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.22);
    outline: none;
    border-radius: 999px;
    background: rgba(51, 65, 85, 0.74);
    color: var(--text);
    padding: 10px 16px;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input:focus,
.page-filter input:focus {
    border-color: rgba(251, 191, 36, 0.78);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
    background: rgba(51, 65, 85, 0.92);
}

.nav-search button {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    background: var(--amber);
    color: white;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(51, 65, 85, 0.7);
    color: white;
}

.mobile-links {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 10px 0 18px;
    gap: 8px;
    flex-wrap: wrap;
}

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

.mobile-links a {
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(51, 65, 85, 0.7);
    color: var(--muted);
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: var(--bg-950);
}

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

.hero-slide {
    opacity: 0;
    visibility: hidden;
    background-size: cover;
    background-position: center;
    transition: opacity 0.7s ease, visibility 0.7s ease, transform 3s ease;
    transform: scale(1.03);
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.hero-shade,
.detail-hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.68) 48%, rgba(2, 6, 23, 0.15));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1180px;
}

.hero-content > * {
    max-width: 650px;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--amber-light);
    font-weight: 800;
    margin-bottom: 18px;
}

.hero-meta span,
.detail-meta span {
    padding: 6px 12px;
    border: 1px solid rgba(251, 191, 36, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.hero h1,
.hero h2 {
    margin: 0 0 20px;
    font-size: clamp(42px, 8vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.075em;
    color: white;
}

.hero p {
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
    max-width: 610px;
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 26px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: white;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 14px 32px rgba(245, 158, 11, 0.34);
}

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

.ghost-button {
    color: white;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.hero-tags,
.detail-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 13px;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    color: white;
    font-size: 32px;
    line-height: 1;
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 18px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    transition: width 0.25s ease, background 0.25s ease;
}

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

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

.section-dark {
    background: linear-gradient(180deg, var(--bg-950), var(--bg-900));
}

.section-darker {
    background: var(--bg-900);
}

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

.section-kicker {
    display: inline-block;
    color: var(--amber-light);
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.section-heading h2,
.page-hero h1,
.detail-copy h2,
.info-card h2 {
    margin: 0;
    color: white;
    letter-spacing: -0.05em;
}

.section-heading h2 {
    font-size: clamp(28px, 4vw, 38px);
}

.section-heading p,
.page-hero p {
    margin: 10px 0 0;
    color: var(--subtle);
    line-height: 1.75;
}

.section-more {
    color: var(--amber-light);
    font-weight: 800;
    white-space: nowrap;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    background: rgba(30, 41, 59, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-800), var(--bg-950));
}

.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) contrast(1.08);
}

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 28%, rgba(0, 0, 0, 0.78));
}

.poster-badge,
.poster-meta {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.poster-badge {
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    color: white;
    background: var(--amber);
}

.poster-meta {
    left: 12px;
    bottom: 12px;
    padding: 6px 10px;
    color: white;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(10px);
}

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

.movie-card h3 {
    margin: 0 0 10px;
    color: white;
    font-size: 19px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--amber-light);
}

.movie-card p {
    margin: 0 0 14px;
    color: var(--subtle);
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card.compact h3 {
    font-size: 17px;
}

.movie-card.compact .movie-card-body {
    padding: 15px;
}

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

.category-tile,
.category-card {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    border-radius: 22px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.category-tile::before,
.category-card-shade {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.88));
}

.category-tile span,
.category-tile small,
.category-card strong,
.category-card small {
    position: relative;
    z-index: 2;
}

.category-tile span,
.category-card strong {
    color: white;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.category-tile small,
.category-card small {
    color: var(--muted);
    line-height: 1.6;
    margin-top: 8px;
}

.page-shell {
    min-height: 70vh;
    background: var(--bg-950);
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 64px 0;
    background:
        radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.22), transparent 32%),
        linear-gradient(135deg, var(--bg-950), var(--bg-900));
}

.compact-hero {
    padding-left: max(16px, calc((100vw - 1180px) / 2));
    padding-right: max(16px, calc((100vw - 1180px) / 2));
}

.page-hero h1 {
    font-size: clamp(34px, 5vw, 56px);
}

.page-filter {
    width: min(620px, 100%);
    margin-top: 26px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--subtle);
    margin-bottom: 20px;
}

.breadcrumb a:hover {
    color: var(--amber-light);
}

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

.rank-item {
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.14);
    overflow: hidden;
}

.rank-link {
    display: grid;
    grid-template-columns: 58px 92px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
}

.rank-number {
    color: var(--amber-light);
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.rank-link img {
    width: 92px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-copy strong {
    display: block;
    color: white;
    margin-bottom: 6px;
}

.rank-copy small {
    color: var(--subtle);
    line-height: 1.5;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.detail-hero-content {
    position: relative;
    z-index: 2;
    padding: 80px 0;
}

.detail-hero h1 {
    max-width: 850px;
    margin: 0 0 22px;
    color: white;
    font-size: clamp(34px, 5.8vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.07em;
}

.detail-hero p {
    max-width: 760px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
    margin: 0 0 28px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: black;
    border: 1px solid rgba(251, 191, 36, 0.18);
    box-shadow: var(--shadow);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: black;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    border: 0;
    color: white;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.18), rgba(2, 6, 23, 0.56));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 0 42px rgba(245, 158, 11, 0.45);
    font-size: 30px;
    padding-left: 4px;
}

.player-cover span:last-child {
    font-size: 18px;
    font-weight: 900;
}

.detail-copy,
.info-card {
    margin-top: 24px;
    padding: 26px;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.detail-copy h2 {
    font-size: 26px;
    margin-top: 8px;
    margin-bottom: 14px;
}

.detail-copy p {
    color: var(--muted);
    line-height: 1.95;
    margin: 0 0 22px;
}

.info-card {
    position: sticky;
    top: 92px;
    margin-top: 0;
}

.info-card h2 {
    font-size: 24px;
    margin-bottom: 18px;
}

.info-card dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    margin: 0;
}

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

.info-card dd {
    margin: 0;
    color: white;
    line-height: 1.6;
}

.site-footer {
    background: var(--bg-950);
    border-top: 1px solid var(--line);
    padding: 42px 0 28px;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 32px;
}

.footer-inner p {
    max-width: 520px;
    color: var(--subtle);
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    justify-content: flex-end;
    gap: 14px;
}

.footer-links a {
    color: var(--muted);
}

.footer-links a:hover {
    color: var(--amber-light);
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto 0;
    color: #64748b;
    font-size: 14px;
}

[hidden],
.is-hidden-by-filter {
    display: none !important;
}

@media (max-width: 1024px) {
    .desktop-links,
    .nav-search {
        display: none;
    }

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

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

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .info-card {
        position: static;
    }
}

@media (max-width: 720px) {
    .hero {
        height: 76vh;
        min-height: 620px;
    }

    .hero-content {
        padding: 58px 0 70px;
        justify-content: flex-end;
    }

    .hero-arrow {
        display: none;
    }

    .hero h1,
    .hero h2 {
        font-size: clamp(36px, 13vw, 54px);
    }

    .section-heading,
    .footer-inner {
        display: block;
    }

    .section-more {
        display: inline-block;
        margin-top: 12px;
    }

    .featured-grid,
    .small-grid,
    .catalog-grid,
    .spotlight-grid,
    .category-grid,
    .category-overview-grid,
    .rank-list {
        grid-template-columns: 1fr;
    }

    .rank-link {
        grid-template-columns: 48px 82px 1fr;
    }

    .rank-link img {
        width: 82px;
        height: 52px;
    }

    .detail-hero {
        min-height: 620px;
    }

    .detail-hero-content {
        padding: 70px 0 54px;
    }

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