:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --border: rgba(148, 163, 184, 0.18);
    --text: #ffffff;
    --muted: #cbd5e1;
    --dim: #94a3b8;
    --amber: #f59e0b;
    --amber-dark: #d97706;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 34rem),
        radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.10), transparent 32rem),
        var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    background: rgba(15, 23, 42, 0.88);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1220px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-size: 14px;
    box-shadow: 0 12px 35px rgba(245, 158, 11, 0.35);
}

.brand-text {
    font-size: 20px;
}

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

.nav-link {
    color: #d1d5db;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--amber);
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    padding: 9px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #fff;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 10px 24px 18px;
    border-top: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.98);
}

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

.mobile-link {
    padding: 12px 14px;
    border-radius: 12px;
    color: #d1d5db;
}

.mobile-link.active,
.mobile-link:hover {
    background: rgba(245, 158, 11, 0.16);
    color: var(--amber);
}

main {
    min-height: 70vh;
}

.hero {
    position: relative;
    height: 72vh;
    min-height: 620px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1) brightness(0.7);
    transform: scale(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.35) 100%),
        linear-gradient(0deg, #020617 0%, transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1220px;
    height: 100%;
    margin: 0 auto;
    padding: 110px 24px 86px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) 360px;
    align-items: center;
    gap: 56px;
}

.hero-copy {
    max-width: 720px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--amber);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 18px 0 18px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.02;
    font-weight: 900;
    text-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.hero-meta,
.movie-meta-line,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #d1d5db;
}

.hero-meta span,
.detail-meta span {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.07);
    border-radius: 999px;
    padding: 6px 12px;
}

.hero p {
    margin: 22px 0 32px;
    color: #e5e7eb;
    font-size: 19px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.primary-button,
.ghost-button,
.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.primary-button {
    min-height: 48px;
    padding: 0 24px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.28);
}

.ghost-button {
    min-height: 48px;
    padding: 0 22px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

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

.hero-poster {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transform: perspective(1000px) rotateY(-8deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 30px;
    z-index: 5;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: #fff;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    font-size: 30px;
    line-height: 1;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    padding: 0;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.quick-search,
.content-section,
.filter-panel,
.detail-layout,
.page-hero {
    max-width: 1220px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

.quick-search {
    margin-top: -36px;
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr 1.2fr auto;
    gap: 20px;
    align-items: center;
    padding-top: 24px;
    padding-bottom: 24px;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid var(--border);
    border-radius: 26px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search h2 {
    margin: 8px 0 0;
    font-size: 24px;
}

.search-box input,
.filter-panel input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    outline: none;
    padding: 0 16px;
}

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

.quick-links a,
.filter-panel button {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 10px 14px;
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.06);
}

.quick-links a:hover,
.filter-panel button:hover,
.filter-panel button.active {
    color: #fff;
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.5);
}

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

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

.section-head h2 {
    margin: 8px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
}

.section-head p {
    max-width: 540px;
    color: var(--dim);
    line-height: 1.8;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid var(--border);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent);
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #fff;
    font-weight: 800;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 8px 12px;
    background: rgba(245, 158, 11, 0.94);
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: rgba(239, 68, 68, 0.95);
}

.movie-info {
    padding: 16px;
}

.movie-meta-line {
    font-size: 12px;
    color: var(--dim);
    margin-bottom: 10px;
}

.movie-info h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

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

.movie-info p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 48px;
    overflow: hidden;
    margin: 10px 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

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

.tag-row span,
.detail-tags span {
    color: #fde68a;
    border: 1px solid rgba(245, 158, 11, 0.28);
    background: rgba(245, 158, 11, 0.10);
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
}

.compact-card .movie-info p {
    -webkit-line-clamp: 1;
    min-height: 24px;
}

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

.category-card {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.55) saturate(1.1);
    transition: transform 0.35s ease;
}

.category-card:hover img {
    transform: scale(1.06);
}

.category-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.18));
}

.category-card div {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
}

.category-card h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.category-card p {
    margin: 0;
    color: #d1d5db;
    font-size: 13px;
    line-height: 1.7;
}

.page-hero {
    padding-top: 132px;
    padding-bottom: 48px;
}

.small-hero,
.category-hero {
    min-height: 360px;
    display: flex;
    align-items: center;
}

.page-hero > div {
    max-width: 760px;
}

.page-hero h1 {
    margin: 12px 0 16px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.08;
}

.page-hero p {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
}

.compact-actions {
    margin-top: 24px;
}

.filter-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding-top: 20px;
    padding-bottom: 14px;
}

.filter-panel input {
    flex: 1 1 280px;
}

.filter-panel button {
    cursor: pointer;
}

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

.category-overview-card,
.detail-card,
.side-card {
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.86);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.category-overview-card {
    padding: 26px;
}

.category-title {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 26px;
    font-weight: 900;
}

.category-title:hover,
.mini-links a:hover,
.side-links a:hover {
    color: var(--amber);
}

.category-overview-card p {
    color: var(--muted);
    line-height: 1.8;
}

.mini-links {
    display: grid;
    gap: 8px;
    margin: 18px 0 22px;
}

.mini-links a {
    color: #e5e7eb;
}

.text-button {
    color: var(--amber);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    padding-top: 104px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--dim);
    margin: 0 0 16px;
    font-size: 14px;
}

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

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.video-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.15), rgba(2, 6, 23, 0.45));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.big-play {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    box-shadow: 0 18px 45px rgba(245, 158, 11, 0.35);
    font-size: 30px;
    padding-left: 4px;
}

.detail-card {
    margin-top: 22px;
    padding: 28px;
}

.detail-card h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.12;
}

.detail-card h2,
.side-card h2 {
    margin: 28px 0 12px;
    font-size: 24px;
}

.detail-card p {
    color: var(--muted);
    line-height: 1.9;
    font-size: 16px;
}

.lead-text {
    color: #fff !important;
    font-size: 18px !important;
}

.detail-tags {
    margin-top: 22px;
}

.detail-side {
    position: sticky;
    top: 92px;
    align-self: start;
}

.side-poster {
    display: block;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.side-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.side-card {
    margin-top: 18px;
    padding: 22px;
}

.side-card h2 {
    margin-top: 0;
}

.side-links {
    display: grid;
    gap: 12px;
}

.side-links a {
    display: grid;
    gap: 4px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.side-links small {
    color: var(--dim);
}

.related-section {
    padding-top: 48px;
}

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

.footer-grid {
    max-width: 1220px;
    margin: 0 auto;
    padding: 42px 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
}

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

.site-footer p,
.site-footer a {
    color: var(--dim);
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 12px;
}

.site-footer a {
    display: block;
    margin: 7px 0;
}

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

.footer-bottom {
    max-width: 1220px;
    margin: 0 auto;
    padding: 18px 24px 28px;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.is-filtered-out {
    display: none !important;
}

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

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

    .hero-content {
        grid-template-columns: 1fr 280px;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero {
        height: auto;
        min-height: 720px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding-top: 108px;
        gap: 28px;
    }

    .hero-poster {
        max-width: 250px;
        transform: none;
    }

    .quick-search {
        grid-template-columns: 1fr;
        margin-top: -18px;
    }

    .section-head,
    .footer-grid,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .section-head {
        align-items: start;
    }

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

    .detail-side {
        position: static;
    }
}

@media (max-width: 560px) {
    .header-inner {
        padding: 0 16px;
    }

    .brand-text {
        font-size: 18px;
    }

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

    .hero p {
        font-size: 16px;
    }

    .hero-actions,
    .quick-links,
    .filter-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-button,
    .ghost-button,
    .quick-links a,
    .filter-panel button {
        width: 100%;
    }

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

    .content-section,
    .quick-search,
    .filter-panel,
    .detail-layout,
    .page-hero {
        padding-left: 16px;
        padding-right: 16px;
    }
}
