:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --panel-bright: #1e293b;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --blue: #3b82f6;
    --blue-dark: #2563eb;
    --cyan: #22d3ee;
    --gold: #f59e0b;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 0%, rgba(59, 130, 246, 0.20), transparent 28rem),
        radial-gradient(circle at 82% 8%, rgba(34, 211, 238, 0.14), transparent 26rem),
        var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.no-scroll {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.86);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: white;
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.32);
}

.brand-text {
    font-size: 24px;
    background: linear-gradient(90deg, #60a5fa, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    color: var(--muted);
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #60a5fa;
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 210px;
    padding: 10px 16px;
}

.mobile-search input,
.filter-bar input,
.filter-bar select {
    padding: 12px 16px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(96, 165, 250, 0.88);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.header-search button,
.mobile-search button,
.btn,
.filter-bar button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: white;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.btn:hover,
.filter-bar button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.34);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.34);
    box-shadow: none;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.9);
    color: white;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 99px;
    background: white;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 18px 16px 22px;
    background: rgba(2, 6, 23, 0.96);
}

.mobile-panel.open {
    display: block;
}

.mobile-nav {
    display: grid;
    gap: 14px;
    margin-bottom: 16px;
}

.mobile-search {
    align-items: stretch;
}

.mobile-search input {
    flex: 1;
    min-width: 0;
}

main {
    min-height: 60vh;
}

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

.hero-slider {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.75s ease, transform 1.4s ease;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.38) 100%),
        linear-gradient(0deg, #020617 0%, transparent 34%, rgba(2, 6, 23, 0.68) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    min-height: 650px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 70px 0 90px;
}

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

.hero-label,
.section-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.14);
    border: 1px solid rgba(96, 165, 250, 0.28);
    color: #93c5fd;
    font-weight: 800;
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

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

.hero-meta,
.detail-meta,
.movie-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta {
    margin-bottom: 30px;
}

.hero-meta span,
.detail-meta span,
.movie-meta span {
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
    color: var(--muted);
}

.hero-meta span,
.detail-meta span {
    padding: 8px 13px;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

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

.hero-dots {
    position: absolute;
    z-index: 4;
    right: max(22px, calc((100vw - 1280px) / 2));
    bottom: 48px;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
    width: 34px;
    background: var(--blue);
}

.section {
    padding: 72px 0 0;
}

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

.section-head h2,
.page-head h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.03em;
}

.section-head p,
.page-head p {
    max-width: 780px;
    margin: 10px 0 0;
    color: var(--soft);
    line-height: 1.8;
}

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

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

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

.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(96, 165, 250, 0.45);
    box-shadow: 0 20px 52px rgba(37, 99, 235, 0.18);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(34, 211, 238, 0.10)),
        #0f172a;
}

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

.movie-card:hover .movie-cover img {
    transform: scale(1.08);
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.92);
    color: white;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    box-shadow: 0 18px 44px rgba(59, 130, 246, 0.4);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.movie-title {
    display: block;
    min-height: 48px;
    color: white;
    font-weight: 900;
    line-height: 1.45;
    transition: color 0.2s ease;
}

.movie-card:hover .movie-title {
    color: #60a5fa;
}

.movie-meta {
    margin: 8px 0 10px;
    gap: 6px;
}

.movie-meta span {
    padding: 3px 8px;
    font-size: 12px;
}

.movie-card p {
    min-height: 62px;
    margin: 0 0 12px;
    color: var(--soft);
    font-size: 14px;
    line-height: 1.55;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-list span {
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(59, 130, 246, 0.12);
    color: #bfdbfe;
    font-size: 12px;
}

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

.category-card {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(96, 165, 250, 0.48);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.25;
}

.category-card div {
    position: relative;
    z-index: 2;
    padding: 28px;
}

.category-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.feature-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 24px;
}

.feature-panel {
    display: grid;
    grid-template-columns: 46% 1fr;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.76));
    box-shadow: var(--shadow);
}

.feature-panel img {
    width: 100%;
    height: 100%;
    min-height: 440px;
    object-fit: cover;
}

.feature-copy {
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feature-copy h3 {
    margin: 0 0 16px;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.1;
}

.feature-copy p {
    color: var(--muted);
    line-height: 1.85;
}

.ranking-panel {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
    padding: 24px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 44px 58px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.58);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: rgba(51, 65, 85, 0.78);
    transform: translateX(3px);
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.14);
    color: #93c5fd;
    font-weight: 900;
}

.rank-item img {
    width: 58px;
    height: 78px;
    object-fit: cover;
    border-radius: 12px;
    background: #0f172a;
}

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

.rank-item span:last-child {
    color: var(--soft);
    font-size: 13px;
}

.page-hero {
    padding: 78px 0 36px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.32), transparent),
        radial-gradient(circle at 70% 0%, rgba(59, 130, 246, 0.18), transparent 26rem);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--soft);
    font-size: 14px;
}

.breadcrumbs a {
    color: #93c5fd;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 180px 180px auto;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.78);
    margin-bottom: 28px;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
}

.empty-state {
    display: none;
    padding: 48px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    text-align: center;
    color: var(--muted);
}

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

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

.movie-player {
    position: relative;
    background: #000;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background:
        linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.18)),
        transparent;
    color: white;
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-size: 34px;
    box-shadow: 0 22px 55px rgba(59, 130, 246, 0.45);
}

.player-caption {
    padding: 20px 24px;
    background: rgba(15, 23, 42, 0.92);
}

.player-caption h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4.2vw, 48px);
}

.detail-card,
.detail-section,
.sidebar-card {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.detail-section {
    padding: 28px;
    margin-top: 24px;
}

.detail-section h2,
.sidebar-card h2 {
    margin: 0 0 18px;
    font-size: 24px;
}

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

.detail-poster {
    overflow: hidden;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 26px;
    background: #0f172a;
}

.sidebar-card {
    padding: 22px;
    margin-bottom: 22px;
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

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

.info-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.info-list dt {
    color: var(--soft);
}

.info-list dd {
    margin: 0;
    color: var(--text);
}

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

.compact-card {
    display: block;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.62);
    transition: transform 0.2s ease, background 0.2s ease;
}

.compact-card:hover {
    transform: translateY(-3px);
    background: rgba(51, 65, 85, 0.82);
}

.compact-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #0f172a;
}

.compact-card span {
    display: block;
    padding: 10px;
    min-height: 48px;
    color: white;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.4;
}

.site-footer {
    margin-top: 88px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.70), rgba(2, 6, 23, 0.96));
}

.footer-grid {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 42px;
}

.footer-logo {
    margin-bottom: 16px;
    font-size: 22px;
}

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

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

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

.footer-links a {
    color: var(--soft);
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #60a5fa;
}

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: #64748b;
    font-size: 14px;
}

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

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

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

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

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

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

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

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

    .hero-content {
        padding-top: 50px;
    }

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

    .section-head,
    .page-head {
        align-items: start;
        flex-direction: column;
    }

    .movie-grid,
    .movie-grid.large {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

    .category-strip {
        grid-template-columns: 1fr;
    }

    .feature-panel {
        grid-template-columns: 1fr;
    }

    .feature-panel img {
        min-height: 320px;
    }

    .filter-bar {
        grid-template-columns: 1fr;
    }

    .footer-grid,
    .footer-bottom {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .container,
    .header-inner,
    .hero-content,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 24px, 1280px);
    }

    .movie-grid,
    .movie-grid.large,
    .compact-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        text-align: center;
    }

    .rank-item {
        grid-template-columns: 38px 52px 1fr;
    }
}
