:root {
    color-scheme: light;
    --blue: #2563eb;
    --blue-dark: #1e3a8a;
    --cyan: #06b6d4;
    --cyan-dark: #0e7490;
    --purple: #7c3aed;
    --pink: #db2777;
    --orange: #ea580c;
    --red: #dc2626;
    --slate: #334155;
    --emerald: #059669;
    --teal: #0d9488;
    --text: #111827;
    --muted: #64748b;
    --soft: #f1f5f9;
    --line: #e2e8f0;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
    --radius: 18px;
}

* {
    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(--text);
    background: #f8fafc;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.container.narrow {
    width: min(980px, calc(100% - 32px));
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #2563eb, #1d4ed8 48%, #0891b2);
    color: #fff;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

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

.brand-mark,
.footer-brand span {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    background: #fff;
    border-radius: 11px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18);
}

.brand-name {
    font-size: 21px;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.main-nav a {
    padding: 10px 13px;
    border-radius: 12px;
    font-size: 14px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

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

.header-search input,
.mobile-search input,
.filter-panel input {
    border: 1px solid rgba(255, 255, 255, 0.38);
    outline: none;
    border-radius: 999px;
    padding: 10px 15px;
}

.header-search input,
.mobile-search input {
    width: 220px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.header-search button,
.mobile-search button,
.filter-panel button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 10px 15px;
    color: #1e3a8a;
    background: #fff;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    border: 0;
    cursor: pointer;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 22px;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

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

.mobile-link {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
}

.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #1d4ed8 48%, #0e7490);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 14% 16%, rgba(56, 189, 248, 0.38), transparent 32%),
        radial-gradient(circle at 86% 22%, rgba(129, 140, 248, 0.35), transparent 28%),
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: auto, auto, 54px 54px, 54px 54px;
    opacity: 0.9;
}

.hero-inner {
    position: relative;
    min-height: 610px;
    padding: 76px 0 42px;
}

.hero-slide {
    display: none;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    align-items: center;
    gap: 54px;
}

.hero-slide.is-active {
    display: grid;
    animation: fadeUp 0.55s ease both;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #0369a1;
    background: #e0f2fe;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: #cffafe;
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(12px);
}

.hero h1,
.hero h2 {
    margin: 0;
    max-width: 780px;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero h3 {
    margin: 16px 0 0;
    font-size: clamp(24px, 3vw, 38px);
    color: #a5f3fc;
}

.hero p {
    max-width: 660px;
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: 19px;
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-tags span,
.detail-tags span {
    padding: 6px 12px;
    border-radius: 999px;
    color: #eff6ff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 13px;
}

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

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

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

.btn.primary {
    color: #1e3a8a;
    background: #fff;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.22);
}

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

.btn.ghost.light {
    color: #1e3a8a;
    border-color: #bfdbfe;
    background: #eff6ff;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    display: block;
    border-radius: 28px;
    box-shadow: 0 32px 70px rgba(2, 6, 23, 0.42);
    transform: rotate(1deg);
}

.hero-poster:hover {
    transform: rotate(0deg) scale(1.02);
    transition: transform 0.25s ease;
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: #0f172a;
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 38%, rgba(2, 6, 23, 0.82));
}

.hero-play,
.poster-play {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    color: #2563eb;
    background: rgba(255, 255, 255, 0.92);
    transform: translate(-50%, -50%);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.28);
}

.hero-poster-text {
    position: absolute;
    z-index: 2;
    left: 24px;
    right: 24px;
    bottom: 22px;
    display: grid;
    gap: 4px;
}

.hero-poster-text strong {
    font-size: 22px;
}

.hero-poster-text small {
    color: #dbeafe;
}

.hero-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 34px;
}

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

.hero-controls > button {
    width: 40px;
    height: 40px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    font-size: 28px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
}

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

.section {
    padding: 66px 0;
}

.white-section {
    background: #fff;
}

.soft-section {
    background: linear-gradient(135deg, #f8fafc, #e0f2fe);
}

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

.section-head h2,
.page-hero h1,
.detail-info h1,
.player-section h2,
.article-block h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.16;
    letter-spacing: -0.03em;
}

.section-more {
    color: #2563eb;
    font-weight: 800;
}

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

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

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

.movie-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.movie-card.compact {
    border-radius: 15px;
}

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #dbeafe;
}

.poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.25s ease;
}

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

.poster::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(15, 23, 42, 0.74));
    transition: opacity 0.2s ease;
}

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

.poster-play {
    width: 52px;
    height: 52px;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 999px;
    color: #fff;
    background: #dc2626;
    font-size: 12px;
    font-weight: 800;
}

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

.card-body h3 {
    min-height: 48px;
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.45;
}

.card-body h3 a:hover {
    color: #2563eb;
}

.card-meta,
.card-line,
.rank-meta,
.footer-grid p,
.page-hero p,
.detail-lead,
.article-block p,
.rank-content p {
    color: var(--muted);
}

.card-meta,
.card-line {
    margin: 0;
    font-size: 13px;
}

.card-line {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 8px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.category-tile,
.category-card a {
    display: grid;
    min-height: 182px;
    padding: 22px;
    border-radius: 20px;
    color: #fff;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-card a:hover {
    transform: translateY(-5px);
    box-shadow: 0 28px 58px rgba(15, 23, 42, 0.2);
}

.category-icon,
.category-card span {
    font-size: 38px;
}

.category-tile strong,
.category-card h2 {
    margin: 12px 0 4px;
    font-size: 22px;
}

.category-tile small,
.category-card p {
    color: rgba(255, 255, 255, 0.86);
}

.blue,
.category-hero.blue {
    background: linear-gradient(135deg, #2563eb, #0891b2);
}

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

.purple,
.category-hero.purple {
    background: linear-gradient(135deg, #7c3aed, #2563eb);
}

.slate,
.category-hero.slate {
    background: linear-gradient(135deg, #0f172a, #475569);
}

.orange,
.category-hero.orange {
    background: linear-gradient(135deg, #ea580c, #f59e0b);
}

.pink,
.category-hero.pink {
    background: linear-gradient(135deg, #db2777, #f43f5e);
}

.red,
.category-hero.red {
    background: linear-gradient(135deg, #dc2626, #f97316);
}

.indigo,
.category-hero.indigo {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.emerald,
.category-hero.emerald {
    background: linear-gradient(135deg, #059669, #10b981);
}

.teal,
.category-hero.teal {
    background: linear-gradient(135deg, #0d9488, #06b6d4);
}

.stacked-sections {
    padding: 24px 0 72px;
}

.channel-section {
    padding: 42px 0 0;
}

.page-main {
    background: #fff;
}

.page-hero {
    padding: 78px 0;
    color: #0f172a;
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.page-hero.category-hero,
.ranking-hero,
.search-hero {
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #1d4ed8 50%, #0891b2);
}

.page-hero.category-hero .section-kicker,
.ranking-hero .section-kicker,
.search-hero .section-kicker {
    color: #cffafe;
    background: rgba(255, 255, 255, 0.16);
}

.page-hero.category-hero h1,
.page-hero.category-hero p,
.ranking-hero h1,
.ranking-hero p,
.search-hero h1,
.search-hero p {
    color: #fff;
}

.page-hero p {
    max-width: 720px;
    margin: 14px 0 0;
    font-size: 18px;
}

.filter-panel {
    position: sticky;
    top: 82px;
    z-index: 5;
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    padding: 14px;
    border: 1px solid #dbeafe;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.filter-panel input {
    flex: 1;
    color: #0f172a;
    background: #f8fafc;
    border-color: #cbd5e1;
}

.filter-panel button {
    color: #fff;
    background: #2563eb;
}

.empty-state {
    display: none;
    margin: 26px 0;
    padding: 24px;
    border-radius: 18px;
    text-align: center;
    color: #64748b;
    background: #f8fafc;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 70px 92px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.rank-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    border-radius: 18px;
    font-size: 20px;
    font-weight: 900;
}

.rank-cover img {
    width: 92px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.rank-content h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-content p {
    margin: 6px 0 0;
}

.rank-heat {
    color: #dc2626;
    font-weight: 900;
}

.detail-hero {
    color: #fff;
    background:
        radial-gradient(circle at 15% 20%, rgba(14, 165, 233, 0.35), transparent 28%),
        linear-gradient(135deg, #020617, #1e3a8a 58%, #0e7490);
    padding: 68px 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 44px;
    align-items: center;
}

.detail-cover {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 30px 65px rgba(0, 0, 0, 0.32);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #c7d2fe;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #fff;
}

.detail-info h1 {
    color: #fff;
    font-size: clamp(34px, 5vw, 58px);
}

.detail-lead {
    max-width: 760px;
    margin: 18px 0 0;
    color: #dbeafe;
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #1e3a8a;
    background: #fff;
    font-size: 13px;
    font-weight: 800;
}

.player-section {
    background: #020617;
    color: #fff;
}

.player-section h2 {
    color: #fff;
    margin-bottom: 22px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
}

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

.video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.52));
}

.video-overlay span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    color: #2563eb;
    background: #fff;
    font-size: 34px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

.player-frame.is-playing .video-overlay {
    display: none;
}

.article-block article {
    padding: 34px;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 15px 38px rgba(15, 23, 42, 0.08);
}

.article-block h2 + p {
    margin-top: 14px;
}

.article-block p {
    font-size: 17px;
}

.site-footer {
    padding-top: 54px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr;
    gap: 38px;
}

.footer-brand {
    color: #fff;
    font-size: 21px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
}

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

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

.footer-bottom {
    margin-top: 36px;
    padding: 22px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

    .movie-grid,
    .mini-grid,
    .library-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

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

    .hero-inner {
        min-height: auto;
        padding-top: 48px;
    }

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

    .hero-poster {
        transform: none;
    }

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

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

    .rank-row {
        grid-template-columns: 54px 82px minmax(0, 1fr);
    }

    .rank-heat {
        grid-column: 3;
    }
}

@media (max-width: 620px) {
    .brand-name {
        font-size: 18px;
    }

    .hero h1,
    .hero h2 {
        font-size: 38px;
    }

    .section {
        padding: 46px 0;
    }

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

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

    .filter-panel {
        position: static;
        flex-direction: column;
    }

    .rank-row {
        grid-template-columns: 48px 72px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .rank-content h2 {
        font-size: 17px;
    }

    .rank-content p {
        display: none;
    }

    .detail-cover {
        max-width: 260px;
    }

    .article-block article {
        padding: 22px;
    }
}
