:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --cyan-500: #06b6d4;
    --cyan-600: #0891b2;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --red-500: #ef4444;
    --yellow-500: #eab308;
    --radius-xl: 20px;
    --shadow-card: 0 14px 40px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--slate-800);
    background: linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
    line-height: 1.6;
}

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: 100;
    color: #fff;
    background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.24);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 800;
    white-space: nowrap;
    background: linear-gradient(90deg, #67e8f9, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--cyan-500), var(--blue-500));
    box-shadow: 0 10px 24px rgba(6, 182, 212, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
    font-size: 15px;
}

.desktop-nav a,
.mobile-nav a {
    color: rgba(255, 255, 255, 0.88);
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: #67e8f9;
}

.header-search {
    position: relative;
    width: 260px;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    outline: 0;
    color: #fff;
    background: rgba(51, 65, 85, 0.9);
    padding: 10px 42px 10px 16px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--cyan-500);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.18);
}

.header-search button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: #cbd5e1;
    cursor: pointer;
    background: transparent;
}

.header-search button:hover {
    color: #67e8f9;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    padding: 8px 12px;
    cursor: pointer;
}

.mobile-panel {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: var(--slate-800);
    padding: 16px;
}

.mobile-search {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.mobile-search button {
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(90deg, var(--cyan-500), var(--blue-500));
    padding: 0 18px;
}

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

.mobile-nav a {
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.45);
    padding: 10px 12px;
}

.hero-slider {
    position: relative;
    height: 560px;
    overflow: hidden;
    background: var(--slate-950);
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.25), transparent 32%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.42), rgba(15, 23, 42, 0.08)),
        linear-gradient(180deg, transparent 52%, rgba(2, 6, 23, 0.72));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 1180px;
    color: #fff;
}

.hero-content > * {
    max-width: 650px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    color: #fff;
    background: var(--cyan-500);
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero-content h1,
.page-hero h1 {
    margin: 16px 0 12px;
    color: #fff;
    font-size: clamp(30px, 5vw, 54px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(16px, 2vw, 19px);
}

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

.hero-meta span,
.detail-meta span,
.meta-row span,
.list-meta span {
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    padding: 4px 10px;
    font-size: 13px;
}

.hero-meta span {
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(12px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    font-weight: 800;
    padding: 0 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #fff;
    background: linear-gradient(90deg, var(--cyan-500), var(--blue-500));
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

.primary-btn:hover,
.ghost-btn:hover,
.category-tile:hover,
.movie-card:hover,
.list-card:hover,
.overview-card:hover {
    transform: translateY(-3px);
}

.ghost-btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 32px;
    background: #fff;
}

.section {
    padding: 58px 0;
}

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

.section-head h2 {
    margin: 0;
    color: var(--slate-900);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-head p {
    margin: 8px 0 0;
    color: var(--slate-600);
}

.section-head a {
    color: var(--cyan-600);
    font-weight: 800;
    white-space: nowrap;
}

.section-head.compact {
    align-items: flex-start;
    margin-bottom: 18px;
}

.section-head.compact h2 {
    font-size: 26px;
}

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

.category-tile,
.overview-card {
    min-height: 148px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: var(--radius-xl);
    color: #fff;
    padding: 24px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.overview-card:hover,
.movie-card:hover,
.list-card:hover {
    box-shadow: var(--shadow-card);
}

.category-icon,
.overview-card span {
    font-size: 34px;
    line-height: 1;
    margin-bottom: 14px;
}

.category-tile strong,
.overview-card h2 {
    font-size: 21px;
    font-weight: 900;
}

.category-tile small,
.overview-card small,
.overview-card p {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.82);
}

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

.movie-card,
.list-card,
.panel,
.ranking-panel,
.filter-panel,
.empty-state {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
}

.movie-card,
.list-card {
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card figure,
.list-card figure {
    position: relative;
    margin: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--slate-900);
}

.movie-card img,
.list-card img,
.cover-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.card-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 34px;
    opacity: 0;
    background: rgba(2, 6, 23, 0.35);
    transition: opacity 0.2s ease;
}

.movie-card:hover .card-play,
.list-card:hover .card-play {
    opacity: 1;
}

.card-duration,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #fff;
    background: rgba(2, 6, 23, 0.72);
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 800;
}

.card-duration {
    right: 10px;
    bottom: 10px;
}

.rank-badge {
    top: 10px;
    left: 10px;
    background: linear-gradient(90deg, #ef4444, #f97316);
}

.card-body {
    padding: 16px;
}

.card-body h3,
.list-card h3,
.cover-panel h2 {
    margin: 0 0 8px;
    color: var(--slate-900);
    font-size: 17px;
    line-height: 1.35;
    font-weight: 800;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-body p,
.list-card p,
.cover-panel p {
    margin: 0 0 12px;
    color: var(--slate-600);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-row {
    justify-content: space-between;
    color: var(--slate-600);
}

.meta-row span {
    background: var(--slate-100);
}

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

.tag-row span,
.detail-tags a {
    display: inline-flex;
    border-radius: 999px;
    color: var(--slate-700);
    background: var(--slate-100);
    padding: 4px 9px;
    font-size: 12px;
}

.detail-tags a:hover {
    color: #fff;
    background: var(--cyan-500);
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
    gap: 28px;
    align-items: start;
}

.list-stack,
.rank-stack {
    display: grid;
    gap: 14px;
}

.list-card {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 18px;
    padding: 0;
}

.list-card figure {
    height: 134px;
    aspect-ratio: auto;
}

.list-card > div {
    padding: 16px 18px 16px 0;
}

.list-meta span {
    color: var(--slate-600);
    background: var(--slate-100);
    font-size: 12px;
    font-style: normal;
}

.ranking-panel,
.panel,
.filter-panel,
.empty-state {
    padding: 22px;
}

.rank-row {
    display: grid;
    grid-template-columns: 32px 58px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    border-radius: 14px;
    padding: 8px;
    transition: background 0.2s ease;
}

.rank-row:hover {
    background: var(--slate-100);
}

.rank-row span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, var(--cyan-500), var(--blue-500));
    font-weight: 900;
}

.rank-row img {
    width: 58px;
    height: 42px;
    border-radius: 9px;
    object-fit: cover;
}

.rank-row strong {
    overflow: hidden;
    color: var(--slate-900);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-row em {
    color: var(--yellow-500);
    font-style: normal;
    font-weight: 900;
}

.page-hero {
    color: #fff;
    padding: 78px 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(103, 232, 249, 0.16), transparent 34%),
        linear-gradient(135deg, var(--slate-900), var(--slate-800));
}

.small-hero h1 {
    max-width: 850px;
}

.small-hero p {
    max-width: 760px;
}

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

.dark-hero {
    background: linear-gradient(135deg, #111827, #0f172a 52%, #164e63);
}

.search-hero {
    background: linear-gradient(135deg, #164e63, #0f172a 58%, #1e293b);
}

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

.overview-card {
    min-height: 240px;
    justify-content: flex-start;
}

.overview-card h2 {
    margin: 0;
    color: #fff;
}

.overview-card p {
    margin: 10px 0 0;
}

.ranking-grid,
.search-grid,
.related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-card .card-body h3 {
    font-size: 16px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 26px;
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: var(--slate-700);
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    color: var(--slate-900);
    background: #fff;
    border-color: #dbe3ef;
    border-radius: 14px;
    padding: 11px 12px;
}

.empty-state {
    text-align: center;
    color: var(--slate-600);
    font-weight: 800;
    margin-bottom: 24px;
}

.hidden-by-filter {
    display: none !important;
}

.detail-wrap {
    padding: 28px 0 20px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--slate-600);
    font-size: 14px;
    margin-bottom: 18px;
}

.breadcrumb a:hover {
    color: var(--cyan-600);
}

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

.detail-main {
    display: grid;
    gap: 22px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.32);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.04), rgba(2, 6, 23, 0.48));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 34px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.28);
    transition: transform 0.2s ease, background 0.2s ease;
}

.player-overlay:hover span {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.28);
}

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

.movie-info h1 {
    margin: 0 0 12px;
    color: var(--slate-900);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.16;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.detail-meta {
    margin-bottom: 20px;
}

.detail-meta span {
    color: var(--cyan-700, #0e7490);
    background: #ecfeff;
    font-weight: 800;
}

.lead-text {
    color: #0e7490;
    font-weight: 800;
}

.movie-info h2,
.panel h2 {
    margin: 24px 0 10px;
    color: var(--slate-900);
    font-size: 22px;
    font-weight: 900;
}

.movie-info p,
.panel p {
    color: var(--slate-700);
    margin: 0 0 12px;
}

.detail-side {
    display: grid;
    gap: 18px;
}

.cover-panel img {
    aspect-ratio: 16 / 10;
    border-radius: 16px;
    margin-bottom: 16px;
}

.block-btn {
    width: 100%;
    margin-top: 16px;
}

.small-tags {
    margin-top: 0;
}

.site-footer {
    margin-top: 24px;
    color: #cbd5e1;
    background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 34px;
    padding: 54px 0;
}

.footer-brand {
    color: #fff;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

.site-footer h2 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 17px;
}

.site-footer p,
.site-footer ul {
    margin: 0;
    padding: 0;
    color: #94a3b8;
    list-style: none;
}

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

.site-footer a:hover {
    color: #67e8f9;
}

.copyright {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    text-align: center;
    padding: 18px;
}

.grad-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.grad-orange {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.grad-green {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.grad-cyan {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.grad-purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.grad-pink {
    background: linear-gradient(135deg, #ec4899, #db2777);
}

.grad-indigo {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.grad-red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.grad-teal {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
}

.grad-slate {
    background: linear-gradient(135deg, #475569, #1e293b);
}

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

    .header-search {
        margin-left: auto;
    }

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

    .split-section,
    .detail-grid {
        grid-template-columns: 1fr;
    }

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

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

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

@media (max-width: 760px) {
    .nav-wrap {
        height: 62px;
    }

    .header-search {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .hero-slider {
        height: 520px;
    }

    .hero-content {
        justify-content: flex-end;
        padding-bottom: 90px;
    }

    .hero-meta,
    .hero-actions,
    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .category-grid,
    .movie-grid,
    .ranking-grid,
    .search-grid,
    .related-grid,
    .overview-grid,
    .detail-side,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .list-card {
        grid-template-columns: 122px minmax(0, 1fr);
    }

    .list-card figure {
        height: 100%;
    }

    .list-card > div {
        padding: 14px 14px 14px 0;
    }

    .page-hero {
        padding: 54px 0;
    }

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

@media (max-width: 480px) {
    .container,
    .nav-wrap,
    .hero-content,
    .footer-grid {
        width: min(100% - 22px, 1180px);
    }

    .brand,
    .footer-brand {
        font-size: 18px;
    }

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

    .hero-slider {
        height: 500px;
    }

    .section {
        padding: 42px 0;
    }

    .card-body {
        padding: 14px;
    }

    .ranking-panel,
    .panel,
    .filter-panel,
    .empty-state {
        padding: 18px;
    }

    .player-overlay span {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
