:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-2: #0f172a;
    --panel: rgba(15, 23, 42, 0.74);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --border: rgba(30, 64, 175, 0.38);
    --cyan: #22d3ee;
    --cyan-2: #38bdf8;
    --blue: #2563eb;
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --gold: #facc15;
    --shadow: 0 22px 60px rgba(8, 47, 73, 0.35);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.18), transparent 32rem),
        radial-gradient(circle at 90% 12%, rgba(37, 99, 235, 0.20), transparent 34rem),
        linear-gradient(135deg, #020617 0%, #0f172a 42%, #082f49 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 58, 138, 0.92), rgba(15, 23, 42, 0.94));
    backdrop-filter: blur(16px);
    box-shadow: 0 14px 36px rgba(2, 6, 23, 0.28);
}

.top-nav,
.mobile-panel,
.page-shell,
.footer-grid,
.footer-bottom {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
}

.top-nav {
    min-height: 72px;
    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.02em;
    background: linear-gradient(90deg, var(--cyan), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand {
    font-size: 28px;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 12px;
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.22);
}

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

.nav-link {
    color: var(--muted);
    font-size: 15px;
    font-weight: 650;
    transition: color 0.24s ease, transform 0.24s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--cyan);
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 0 0 18px;
}

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

.mobile-link {
    padding: 10px 12px;
    color: var(--muted);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.56);
}

.page-shell {
    position: relative;
    z-index: 1;
    padding: 34px 0 0;
}

.hero-slider {
    position: relative;
    min-height: 590px;
    overflow: hidden;
    border: 1px solid rgba(30, 64, 175, 0.36);
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

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

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.64) 46%, rgba(2, 6, 23, 0.16)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 52%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(680px, calc(100% - 48px));
    min-height: 590px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 0 72px 46px;
}

.eyebrow,
.year-pill,
.tag-row span,
.type-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.eyebrow {
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 13px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.14);
    border: 1px solid rgba(34, 211, 238, 0.32);
    backdrop-filter: blur(8px);
}

.hero-content h1,
.hero-content h2,
.page-hero h1 {
    margin: 0;
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero-content h1,
.hero-content h2 {
    font-size: clamp(40px, 7vw, 76px);
}

.hero-content p {
    width: min(660px, 100%);
    margin: 18px 0 24px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.75;
}

.hero-meta,
.detail-meta,
.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--soft);
    font-size: 14px;
}

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

.primary-button,
.secondary-button,
.section-more,
.filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.primary-button {
    width: fit-content;
    padding: 14px 26px;
    color: white;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 16px 36px rgba(6, 182, 212, 0.28);
}

.primary-button:hover,
.secondary-button:hover,
.filter-button:hover {
    transform: translateY(-2px) scale(1.01);
}

.secondary-button,
.filter-button {
    padding: 12px 18px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--border);
}

.hero-controls {
    position: absolute;
    z-index: 4;
    right: 24px;
    bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-arrow {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.56);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    transition: width 0.24s ease, background 0.24s ease;
}

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

.quick-panel,
.page-hero,
.detail-hero,
.player-panel,
.story-panel,
.search-panel,
.category-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.24);
}

.quick-panel {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 24px;
    margin-top: 24px;
    padding: 24px;
}

.quick-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.quick-search input,
.filter-control,
.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 46px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.48);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0 14px;
    outline: none;
}

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

.quick-tags a,
.category-links a {
    padding: 9px 12px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(30, 64, 175, 0.32);
    border-radius: 999px;
    transition: color 0.24s ease, border-color 0.24s ease;
}

.quick-tags a:hover,
.category-links a:hover {
    color: var(--cyan);
    border-color: rgba(34, 211, 238, 0.45);
}

.content-section {
    margin-top: 64px;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    letter-spacing: -0.025em;
    background: linear-gradient(90deg, var(--cyan), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-heading::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.48), transparent);
}

.section-more {
    order: 3;
    flex: none;
    padding: 9px 13px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.24);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.64);
    transition: transform 0.26s ease, border-color 0.26s ease, box-shadow 0.26s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.62);
    box-shadow: 0 18px 38px rgba(6, 182, 212, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.04) 56%);
    opacity: 0.82;
}

.year-pill {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 9px;
    color: #422006;
    background: rgba(250, 204, 21, 0.92);
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: white;
    font-weight: 900;
    border-radius: 11px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.24);
}

.play-pill {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    justify-content: center;
    padding: 9px 12px;
    color: white;
    font-size: 13px;
    font-weight: 800;
    border-radius: 12px;
    background: rgba(6, 182, 212, 0.88);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-pill {
    opacity: 1;
    transform: translateY(0);
}

.movie-info {
    padding: 14px;
}

.movie-info h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.38;
}

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

.movie-info p {
    min-height: 44px;
    margin: 0 0 12px;
    color: var(--soft);
    font-size: 13px;
    line-height: 1.55;
}

.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #64748b;
    font-size: 12px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.tag-row span,
.type-pill {
    padding: 5px 8px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.10);
    border: 1px solid rgba(34, 211, 238, 0.18);
}

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

.category-card {
    padding: 22px;
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.56);
}

.category-card h2 {
    margin: 0 0 12px;
    color: var(--text);
}

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

.page-hero {
    padding: 36px;
}

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

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

.filter-bar,
.search-controls {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
    margin: 26px 0 28px;
}

.empty-result {
    display: none;
    padding: 30px;
    text-align: center;
    color: var(--soft);
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.52);
}

.empty-result.is-visible {
    display: block;
}

.ranking-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 26px;
    align-items: start;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 14px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.58);
}

.rank-row:hover {
    border-color: rgba(34, 211, 238, 0.48);
}

.rank-row img {
    width: 70px;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-row strong,
.rank-row small {
    display: block;
}

.rank-row small {
    margin-top: 6px;
    color: var(--soft);
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    padding: 28px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid var(--border);
    aspect-ratio: 2 / 3;
    background: #0f172a;
}

.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-content h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
}

.detail-content p {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.85;
}

.breadcrumbs {
    margin: 0 0 18px;
}

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

.player-panel {
    position: relative;
    margin-top: 32px;
    padding: 20px;
}

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

.player-title h2 {
    margin: 0;
    font-size: 26px;
}

.video-box {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: black;
    aspect-ratio: 16 / 9;
}

.video-box video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: black;
    cursor: pointer;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    color: white;
    border: 0;
    background-position: center;
    background-size: cover;
    cursor: pointer;
}

.player-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.38));
}

.player-cover span {
    position: relative;
    z-index: 1;
}

.player-cover .play-icon {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 18px 40px rgba(6, 182, 212, 0.34);
}

.player-cover.is-hidden {
    display: none;
}

.story-panel {
    margin-top: 28px;
    padding: 28px;
}

.story-panel h2 {
    margin: 0 0 14px;
    color: var(--cyan);
}

.story-panel p {
    color: var(--muted);
    line-height: 1.9;
}

.search-panel {
    padding: 24px;
    margin-top: 26px;
}

.search-results {
    margin-top: 24px;
}

.site-footer {
    position: relative;
    z-index: 1;
    margin-top: 70px;
    border-top: 1px solid var(--border);
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(8, 47, 73, 0.92), rgba(2, 6, 23, 0.96));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 34px;
    padding: 40px 0;
}

.footer-brand {
    margin-bottom: 12px;
    font-size: 24px;
}

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

.site-footer h2 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: 18px;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li + li {
    margin-top: 8px;
}

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

.footer-bottom {
    padding: 18px 0 30px;
    color: #64748b;
    text-align: center;
    border-top: 1px solid rgba(30, 64, 175, 0.28);
}

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

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

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

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

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

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

    .hero-content {
        padding: 0 24px 78px;
        width: 100%;
    }

    .hero-controls {
        left: 22px;
        right: 22px;
        justify-content: space-between;
    }

    .hero-dots {
        order: -1;
    }

    .quick-panel,
    .detail-hero,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar,
    .search-controls,
    .quick-search {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 620px) {
    .top-nav,
    .mobile-panel,
    .page-shell,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 24px, 1220px);
    }

    .brand {
        font-size: 22px;
    }

    .page-shell {
        padding-top: 20px;
    }

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

    .hero-content p {
        font-size: 15px;
    }

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

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

    .movie-info {
        padding: 12px;
    }

    .movie-info p,
    .tag-row {
        display: none;
    }

    .page-hero,
    .detail-hero,
    .story-panel,
    .search-panel {
        padding: 20px;
    }

    .player-panel {
        padding: 12px;
    }
}

.mini-posters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 18px;
}

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