:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(30, 41, 59, 0.86);
    --line: rgba(59, 130, 246, 0.24);
    --line-soft: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --blue: #3b82f6;
    --cyan: #06b6d4;
    --green: #10b981;
    --yellow: #f59e0b;
    --red: #ef4444;
    --shadow: 0 24px 80px rgba(15, 23, 42, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.24), transparent 34rem),
        radial-gradient(circle at top right, rgba(8, 145, 178, 0.18), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #000000 100%);
}

body.no-scroll {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.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 {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.brand-mark {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.35);
}

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

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

.nav-links a {
    color: #cbd5e1;
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s ease;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-form {
    position: relative;
}

.search-form input,
.filter-input,
.select-input {
    width: 240px;
    border: 1px solid rgba(30, 64, 175, 0.42);
    border-radius: 999px;
    outline: none;
    color: #e5e7eb;
    background: rgba(15, 23, 42, 0.76);
    padding: 11px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus,
.filter-input:focus,
.select-input:focus {
    border-color: rgba(96, 165, 250, 0.72);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.search-form input::placeholder,
.filter-input::placeholder {
    color: #64748b;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(59, 130, 246, 0.24);
    border-radius: 12px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.72);
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.98);
}

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

.mobile-nav {
    display: grid;
    gap: 10px;
    padding: 16px 0 20px;
}

.mobile-nav a {
    border-radius: 12px;
    color: #cbd5e1;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.58);
}

.mobile-nav a.active {
    color: #60a5fa;
    background: rgba(30, 58, 138, 0.48);
}

.hero {
    position: relative;
    height: 620px;
    overflow: hidden;
    border-bottom: 1px solid rgba(59, 130, 246, 0.12);
}

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

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

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

.hero-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.72) 42%, rgba(0, 0, 0, 0.12) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.16) 42%, rgba(2, 6, 23, 0.24) 100%);
}

.hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    height: 100%;
    align-items: center;
}

.hero-copy {
    width: min(680px, 100%);
    padding-top: 30px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    border: 1px solid rgba(96, 165, 250, 0.38);
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.18);
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 700;
    backdrop-filter: blur(12px);
}

.hero h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-title {
    display: block;
    margin-top: 8px;
    font-size: clamp(26px, 4vw, 46px);
    color: #e0f2fe;
}

.hero-summary {
    margin: 0 0 26px;
    max-width: 720px;
    color: #cbd5e1;
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.75;
}

.hero-meta,
.card-meta,
.detail-meta,
.tag-row,
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.meta-pill,
.tag {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    padding: 6px 10px;
    font-size: 13px;
    line-height: 1;
}

.hero-actions,
.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hero-actions {
    justify-content: flex-start;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: white;
    background: linear-gradient(90deg, #2563eb, #0891b2);
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.34);
}

.btn-primary:hover {
    box-shadow: 0 22px 48px rgba(37, 99, 235, 0.46);
}

.btn-ghost {
    color: #dbeafe;
    border-color: rgba(96, 165, 250, 0.3);
    background: rgba(15, 23, 42, 0.55);
}

.btn-ghost:hover {
    border-color: rgba(96, 165, 250, 0.66);
    background: rgba(30, 41, 59, 0.78);
}

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

.hero-dot {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
}

.hero-dot.active {
    background: linear-gradient(90deg, #60a5fa, #67e8f9);
}

.page-main {
    padding: 54px 0 72px;
}

.section {
    margin-bottom: 70px;
}

.section-head {
    margin-bottom: 26px;
}

.title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-bar {
    width: 5px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(180deg, #3b82f6, #06b6d4);
}

.title-bar.red {
    background: linear-gradient(180deg, #ef4444, #f97316);
}

.title-bar.green {
    background: linear-gradient(180deg, #22c55e, #10b981);
}

.title-bar.yellow {
    background: linear-gradient(180deg, #eab308, #f97316);
}

.section h2,
.page-title,
.detail-title {
    margin: 0;
    color: white;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.section-subtitle,
.page-lead,
.detail-lead {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.view-more {
    color: #60a5fa;
    font-weight: 700;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.56);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.14);
    transition: transform 0.26s ease, border-color 0.26s ease, box-shadow 0.26s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.58);
    box-shadow: 0 24px 60px rgba(30, 64, 175, 0.24);
}

.card-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.44), rgba(8, 145, 178, 0.24));
}

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

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

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 28%, rgba(0, 0, 0, 0.78) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .card-cover::after {
    opacity: 1;
}

.cover-badge,
.score-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    border-radius: 10px;
    color: white;
    background: rgba(0, 0, 0, 0.68);
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.cover-badge {
    left: 10px;
    bottom: 10px;
    background: rgba(37, 99, 235, 0.88);
}

.score-badge {
    top: 10px;
    right: 10px;
    color: #fde68a;
}

.rank-badge {
    top: -12px;
    left: -12px;
    width: 46px;
    height: 46px;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    box-shadow: 0 14px 34px rgba(239, 68, 68, 0.32);
    font-size: 17px;
}

.card-body {
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 8px;
    overflow: hidden;
    color: white;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    transition: color 0.2s ease;
}

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

.card-desc {
    display: -webkit-box;
    min-height: 42px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-meta {
    justify-content: space-between;
    color: var(--muted-2);
    font-size: 12px;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 142px;
    border: 1px solid rgba(51, 65, 85, 0.76);
    border-radius: 20px;
    background: rgba(30, 41, 59, 0.58);
    padding: 22px;
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(96, 165, 250, 0.58);
    box-shadow: 0 22px 54px rgba(30, 64, 175, 0.22);
}

.category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.16;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.category-card.tone-green::before,
.category-card.tone-emerald::before {
    background: linear-gradient(135deg, #16a34a, #10b981);
}

.category-card.tone-yellow::before,
.category-card.tone-orange::before {
    background: linear-gradient(135deg, #ca8a04, #f97316);
}

.category-card.tone-red::before,
.category-card.tone-pink::before {
    background: linear-gradient(135deg, #ef4444, #ec4899);
}

.category-card.tone-purple::before {
    background: linear-gradient(135deg, #9333ea, #06b6d4);
}

.category-card-content {
    position: relative;
    z-index: 2;
}

.category-card h2,
.category-card h3 {
    margin: 0 0 8px;
    color: white;
    font-size: 20px;
}

.category-card p {
    margin: 0;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.65;
}

.category-count {
    display: inline-flex;
    margin-top: 16px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.56);
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 800;
}

.page-hero {
    margin-bottom: 34px;
    border: 1px solid rgba(59, 130, 246, 0.18);
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(30, 58, 138, 0.28), rgba(8, 145, 178, 0.12)),
        rgba(15, 23, 42, 0.6);
    padding: clamp(26px, 5vw, 48px);
    box-shadow: var(--shadow);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.filter-input {
    width: min(420px, 100%);
    border-radius: 16px;
}

.filter-chip {
    border: 1px solid rgba(59, 130, 246, 0.24);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.6);
    padding: 10px 14px;
}

.filter-chip.active,
.filter-chip:hover {
    color: white;
    border-color: rgba(96, 165, 250, 0.66);
    background: rgba(37, 99, 235, 0.5);
}

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

.category-panel {
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.64);
    padding: 22px;
}

.category-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.category-panel h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

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

.mini-item,
.related-item {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border-radius: 14px;
    padding: 8px;
    transition: background 0.2s ease;
}

.mini-item:hover,
.related-item:hover {
    background: rgba(51, 65, 85, 0.45);
}

.mini-item img,
.related-item img {
    width: 112px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
}

.mini-title {
    display: -webkit-box;
    margin: 0 0 6px;
    overflow: hidden;
    color: white;
    font-weight: 800;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.breadcrumb {
    margin-bottom: 24px;
    color: #93c5fd;
    font-size: 14px;
}

.breadcrumb span {
    color: var(--muted);
}

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

.detail-main,
.detail-side,
.content-panel {
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.68);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.detail-main {
    overflow: hidden;
}

.player-head {
    padding: 24px 24px 18px;
}

.detail-title {
    margin-bottom: 12px;
}

.detail-lead {
    font-size: 17px;
}

.movie-player {
    padding: 0 24px 26px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: black;
    aspect-ratio: 16 / 9;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

.video-shell video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: white;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.48));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
    display: inline-flex;
    width: 86px;
    height: 86px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 18px 48px rgba(37, 99, 235, 0.48);
    font-size: 32px;
    transform: translateX(3px);
}

.movie-player.is-playing .play-overlay {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

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

.content-panel h2,
.detail-side h2 {
    margin: 0 0 16px;
    color: white;
    font-size: 24px;
}

.content-panel p {
    margin: 0 0 16px;
    color: #cbd5e1;
    line-height: 1.9;
}

.detail-side {
    position: sticky;
    top: 94px;
    padding: 20px;
}

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

.site-footer {
    border-top: 1px solid rgba(30, 64, 175, 0.3);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.8), rgba(0, 0, 0, 0.96));
    padding: 38px 0;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

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

.empty-state {
    display: none;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 20px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.66);
    padding: 26px;
    text-align: center;
}

.empty-state.show {
    display: block;
}

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

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

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

    .detail-side {
        position: static;
    }
}

@media (max-width: 820px) {
    .nav-links,
    .header-actions .search-form {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero {
        height: 650px;
    }

    .hero-mask {
        background:
            linear-gradient(180deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.84) 100%),
            linear-gradient(0deg, #020617 0%, transparent 50%);
    }

    .hero-content {
        align-items: flex-end;
        padding-bottom: 86px;
    }

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

    .category-panel-head {
        display: block;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .brand {
        font-size: 16px;
    }

    .brand-mark {
        width: 32px;
        height: 32px;
    }

    .hero {
        height: 620px;
    }

    .hero-actions {
        display: grid;
    }

    .btn {
        width: 100%;
    }

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

    .mini-item,
    .related-item {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .mini-item img,
    .related-item img {
        width: 96px;
        height: 58px;
    }

    .movie-player,
    .player-head {
        padding-left: 14px;
        padding-right: 14px;
    }

    .content-panel {
        padding: 20px;
    }
}
