:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --panel-light: #1e293b;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --cyan: #06b6d4;
    --cyan-dark: #0891b2;
    --blue: #2563eb;
    --red: #ef4444;
    --orange: #f97316;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

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

.nav-bar {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, #22d3ee, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 182, 212, 0.15);
    color: #22d3ee;
    border: 1px solid rgba(34, 211, 238, 0.35);
    font-size: 13px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    color: #e5e7eb;
    font-weight: 600;
}

.main-nav a {
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: #22d3ee;
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: #e5e7eb;
    font-size: 28px;
    cursor: pointer;
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: radial-gradient(circle at 70% 35%, rgba(8, 145, 178, 0.32), transparent 32%), #020617;
}

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

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: saturate(1.06);
}

.hero-slide > img.is-missing,
.movie-card img.is-missing,
.detail-poster img.is-missing {
    opacity: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.82) 42%, rgba(2, 6, 23, 0.26));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-text {
    max-width: 710px;
    padding-top: 24px;
}

.hero-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

.hero-tags span {
    display: inline-flex;
    padding: 7px 16px;
    border-radius: 999px;
    background: var(--cyan);
    color: white;
    font-weight: 800;
    font-size: 14px;
}

.hero-tags strong {
    color: #67e8f9;
    font-weight: 700;
}

.hero-tags em {
    color: var(--muted);
    font-style: normal;
}

.hero-tags.compact {
    margin-bottom: 18px;
}

.hero-text h1,
.inner-hero h1 {
    margin: 0 0 20px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-text p,
.inner-hero p {
    margin: 0;
    max-width: 760px;
    color: #cbd5e1;
    font-size: 18px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 12px 28px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn.primary {
    background: var(--cyan);
    color: white;
}

.btn.primary:hover {
    background: var(--cyan-dark);
}

.btn.ghost {
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(15, 23, 42, 0.56);
    color: #e2e8f0;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.52);
    color: white;
    font-size: 28px;
    transform: translateY(-50%);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.hero-arrow.prev {
    left: 18px;
}

.hero-arrow.next {
    right: 18px;
}

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

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

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

.content-section {
    padding: 70px 0;
    background: var(--panel);
}

.content-section:nth-of-type(odd) {
    background: linear-gradient(180deg, var(--bg), var(--panel));
}

.content-section:nth-of-type(even) {
    background: var(--panel-soft);
}

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

.section-title > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title span {
    font-size: 30px;
}

.section-title h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.15;
}

.more-link {
    color: #22d3ee;
    font-weight: 700;
}

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

.movie-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 260px;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 16px;
    scrollbar-width: thin;
}

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: #1e293b;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #0e7490 45%, #1e293b);
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 25%, rgba(0, 0, 0, 0.75));
    opacity: 0.76;
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.type-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 6px 9px;
    border-radius: 10px;
    background: rgba(6, 182, 212, 0.92);
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.movie-info {
    padding: 16px;
}

.movie-info h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-info h3 a:hover {
    color: #22d3ee;
}

.movie-info p {
    height: 44px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    overflow: hidden;
}

.meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #22d3ee;
    font-size: 12px;
    font-weight: 700;
}

.meta-row span {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.meta-row em {
    padding: 3px 7px;
    border-radius: 7px;
    background: #334155;
    color: #cbd5e1;
    font-style: normal;
    font-weight: 600;
}

.inner-hero {
    padding: 86px 0 64px;
    background: radial-gradient(circle at 80% 20%, rgba(8, 145, 178, 0.35), transparent 30%), linear-gradient(180deg, #020617, #0f172a);
    border-bottom: 1px solid var(--line);
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 190px;
    gap: 14px;
    margin-bottom: 28px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.86);
    color: var(--text);
    padding: 14px 16px;
    font: inherit;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(34, 211, 238, 0.65);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

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

.category-card {
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(37, 99, 235, 0.1)), #111827;
    border: 1px solid var(--line);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.category-card strong {
    display: block;
    font-size: 22px;
    margin-bottom: 10px;
}

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

.rank-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.rank-panel {
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.78);
}

.rank-panel h2 {
    margin: 0;
    padding: 20px 22px;
    background: rgba(30, 41, 59, 0.72);
}

.rank-list {
    display: grid;
}

.rank-item {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 22px;
    border-top: 1px solid var(--line);
}

.rank-item:hover {
    background: rgba(6, 182, 212, 0.08);
}

.rank-num {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #334155;
    color: #e2e8f0;
    font-weight: 900;
}

.rank-item:nth-child(-n + 3) .rank-num {
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: white;
}

.rank-title {
    font-weight: 800;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-meta {
    color: var(--muted);
    font-size: 13px;
}

.detail-hero {
    padding: 70px 0;
    background: radial-gradient(circle at 82% 16%, rgba(6, 182, 212, 0.26), transparent 28%), linear-gradient(180deg, #020617, #0f172a);
}

.detail-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 36px;
    align-items: start;
}

.detail-poster {
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #164e63);
    box-shadow: var(--shadow);
}

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

.detail-info h1 {
    margin: 0 0 14px;
    font-size: clamp(36px, 6vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-info .one-line {
    margin: 0 0 22px;
    color: #cbd5e1;
    font-size: 18px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 0;
}

.chips span {
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.92);
    border: 1px solid var(--line);
    color: #dbeafe;
    font-size: 13px;
}

.player-section {
    padding: 64px 0;
    background: #020617;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: black;
    box-shadow: var(--shadow);
}

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

.start-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.82));
    color: white;
    font: inherit;
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.start-layer.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.start-icon {
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--cyan);
    font-size: 30px;
    box-shadow: 0 16px 36px rgba(6, 182, 212, 0.28);
}

.article-block {
    padding: 68px 0;
    background: var(--panel);
}

.article-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 30px;
}

.article-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    padding: 26px;
}

.article-card h2,
.article-card h3 {
    margin-top: 0;
}

.article-card p {
    color: #cbd5e1;
}

.site-footer {
    padding: 58px 0 24px;
    background: linear-gradient(180deg, #0f172a, #020617);
    color: #cbd5e1;
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 34px;
}

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

.site-footer p {
    color: var(--muted);
}

.footer-links {
    display: grid;
    gap: 10px;
    color: var(--muted);
}

.footer-links a:hover {
    color: #22d3ee;
}

.copyright {
    margin: 42px auto 0;
    width: min(1180px, calc(100% - 32px));
    padding-top: 22px;
    border-top: 1px solid var(--line);
    color: #64748b;
    font-size: 14px;
}

.is-hidden {
    display: none !important;
}

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

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

@media (max-width: 820px) {
    .menu-toggle {
        display: inline-flex;
    }

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

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

    .main-nav a {
        padding: 12px;
    }

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

    .hero-overlay {
        background: linear-gradient(180deg, rgba(2, 6, 23, 0.48), rgba(2, 6, 23, 0.98));
    }

    .hero-actions {
        flex-wrap: wrap;
    }

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

    .movie-row {
        grid-auto-columns: 220px;
    }

    .filter-panel,
    .rank-layout,
    .detail-layout,
    .article-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

    .rank-meta {
        grid-column: 2;
    }

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