:root {
    color-scheme: dark;
    --bg: #090a13;
    --panel: rgba(17, 24, 39, 0.78);
    --panel-solid: #111827;
    --soft: rgba(255, 255, 255, 0.08);
    --soft-strong: rgba(255, 255, 255, 0.14);
    --text: #f8fafc;
    --muted: #a7b0c0;
    --line: rgba(255, 255, 255, 0.11);
    --gold: #facc15;
    --pink: #f472b6;
    --purple: #8b5cf6;
    --blue: #38bdf8;
    --green: #34d399;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(139, 92, 246, 0.28), transparent 36rem),
        radial-gradient(circle at 85% 15%, rgba(244, 114, 182, 0.18), transparent 30rem),
        linear-gradient(180deg, #0f1020 0%, #090a13 45%, #070812 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(49, 46, 129, 0.95), rgba(88, 28, 135, 0.95), rgba(131, 24, 67, 0.95));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(16px);
}

.header-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--gold), var(--pink));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(250, 204, 21, 0.16);
    color: var(--gold);
    border: 1px solid rgba(250, 204, 21, 0.32);
    font-size: 14px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.main-nav a,
.nav-dropdown button {
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.84);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.nav-dropdown button:hover,
.main-nav a.active {
    color: var(--gold);
}

.nav-dropdown {
    position: relative;
    padding: 22px 0;
}

.dropdown-panel {
    position: absolute;
    top: 64px;
    left: 0;
    min-width: 172px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.22s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-panel a {
    display: block;
    padding: 11px 12px;
    border-radius: 12px;
}

.dropdown-panel a:hover {
    background: rgba(255, 255, 255, 0.08);
}

.header-search {
    display: flex;
    align-items: center;
    min-width: 260px;
}

.header-search input,
.search-panel input,
.search-panel select {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border-radius: 999px;
    padding: 12px 16px;
    outline: none;
}

.header-search input {
    border-radius: 999px 0 0 999px;
}

.header-search button {
    border: 0;
    color: #0f172a;
    background: var(--gold);
    padding: 13px 16px;
    border-radius: 0 999px 999px 0;
    font-weight: 900;
    cursor: pointer;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.08);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-toggle span {
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 2px;
}

.hero-carousel {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #080914;
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(8, 9, 20, 0.96) 0%, rgba(8, 9, 20, 0.78) 36%, rgba(8, 9, 20, 0.16) 78%),
        linear-gradient(0deg, #090a13 0%, transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 70px 0 130px;
    max-width: 1240px;
}

.eyebrow,
.page-title span {
    color: var(--gold);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 760px;
    margin: 18px 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero-content p {
    max-width: 640px;
    color: #d1d5db;
    font-size: 18px;
    line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span,
.meta-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(59, 130, 246, 0.16);
    border: 1px solid rgba(147, 197, 253, 0.18);
    font-size: 12px;
    font-weight: 800;
}

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

.primary-btn,
.ghost-btn,
.category-panel-head a,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    min-height: 44px;
    padding: 0 22px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #111827;
    background: linear-gradient(90deg, var(--gold), var(--pink));
    box-shadow: 0 14px 30px rgba(250, 204, 21, 0.18);
}

.ghost-btn {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
}

.primary-btn:hover,
.ghost-btn:hover,
.category-panel-head a:hover,
.section-more:hover {
    transform: translateY(-2px);
}

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

.hero-dots button {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
}

.hero-dots button.active {
    background: var(--gold);
}

.hero-mini-list {
    position: absolute;
    z-index: 4;
    right: max(24px, calc((100vw - 1240px) / 2));
    bottom: 34px;
    display: grid;
    grid-template-columns: repeat(4, 104px);
    gap: 12px;
}

.hero-mini-card {
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.hero-mini-card img {
    width: 100%;
    height: 68px;
    object-fit: cover;
}

.hero-mini-card span {
    display: block;
    padding: 8px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

main,
.page-main,
.detail-main {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.section-block,
.channel-section,
.category-panel,
.search-panel {
    margin: 58px 0;
}

.gradient-section {
    width: auto;
    padding: 36px;
    border-radius: var(--radius);
    background: linear-gradient(90deg, rgba(127, 29, 29, 0.28), rgba(124, 45, 18, 0.26));
    border: 1px solid var(--line);
}

.section-heading,
.category-panel-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.section-heading h2,
.category-panel h2,
.side-list h2,
.detail-content h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 36px);
    letter-spacing: -0.04em;
}

.section-more,
.category-panel-head a {
    color: var(--gold);
    background: rgba(250, 204, 21, 0.08);
    border: 1px solid rgba(250, 204, 21, 0.2);
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    background: rgba(17, 24, 39, 0.72);
    border: 1px solid var(--line);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(250, 204, 21, 0.28);
    background: rgba(31, 41, 55, 0.88);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.22), rgba(244, 114, 182, 0.18));
}

.wide-card .poster-link,
.compact-section .poster-link {
    aspect-ratio: 16 / 10;
}

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

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

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 900;
}

.play-chip {
    right: 10px;
    bottom: 10px;
    padding: 6px 10px;
    color: #111827;
    background: var(--gold);
    font-size: 12px;
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.24s ease;
}

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

.rank-badge {
    left: 10px;
    top: 10px;
    min-width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, #ef4444, #f97316);
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.28);
}

.movie-info {
    padding: 14px;
}

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

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

.meta-row,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
}

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

.channel-box {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    border-radius: 22px;
    background: var(--panel-solid);
    border: 1px solid var(--line);
}

.channel-box img {
    width: 100%;
    height: 100%;
    min-height: 150px;
    object-fit: cover;
    opacity: 0.7;
    transition: transform 0.35s ease;
}

.channel-box:hover img {
    transform: scale(1.08);
}

.channel-box span {
    position: absolute;
    inset: auto 14px 14px 14px;
    font-size: 20px;
    font-weight: 900;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.page-title {
    position: relative;
    margin: 44px 0 36px;
    padding: 44px;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at 18% 15%, rgba(250, 204, 21, 0.18), transparent 22rem),
        linear-gradient(135deg, rgba(49, 46, 129, 0.58), rgba(88, 28, 135, 0.48), rgba(131, 24, 67, 0.34));
    box-shadow: var(--shadow);
}

.page-title h1 {
    margin: 12px 0;
    font-size: clamp(36px, 6vw, 68px);
    letter-spacing: -0.06em;
}

.page-title p {
    max-width: 760px;
    color: #d1d5db;
    font-size: 17px;
    line-height: 1.8;
}

.category-panel {
    padding: 28px;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--line);
}

.category-panel-head p {
    margin: 10px 0 0;
    color: var(--muted);
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr 220px 180px;
    gap: 14px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(17, 24, 39, 0.72);
    border: 1px solid var(--line);
}

.search-panel select option {
    background: #111827;
    color: white;
}

.detail-main {
    padding-top: 28px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
    margin: 14px 0 24px;
}

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

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

.player-card {
    position: relative;
    border-radius: 26px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-ring {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #111827;
    background: linear-gradient(135deg, var(--gold), var(--pink));
    font-size: 32px;
    box-shadow: 0 0 0 14px rgba(255, 255, 255, 0.08);
}

.detail-content,
.poster-card,
.side-list {
    margin-top: 22px;
    padding: 26px;
    border-radius: 24px;
    background: rgba(17, 24, 39, 0.72);
    border: 1px solid var(--line);
}

.detail-content h1 {
    margin: 0 0 18px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.06em;
}

.detail-content p {
    color: #d1d5db;
    line-height: 1.9;
    font-size: 16px;
}

.lead-text {
    font-size: 18px !important;
    color: #eef2ff !important;
}

.poster-card {
    margin-top: 0;
}

.poster-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
}

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

.side-list a {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    align-items: center;
    margin-top: 14px;
    color: #e5e7eb;
    font-weight: 800;
}

.side-list a:hover {
    color: var(--gold);
}

.side-list img {
    width: 64px;
    height: 84px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.08);
}

.related-block {
    margin-bottom: 70px;
}

.site-footer {
    margin-top: 80px;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.7), #03040a);
    border-top: 1px solid var(--line);
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
}

.footer-inner p {
    max-width: 540px;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-content: center;
}

.footer-links a {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.footer-links a:hover {
    color: var(--gold);
}

.is-filtered-out {
    display: none !important;
}

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

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

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

    .hero-mini-list {
        display: none;
    }

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

    .side-column {
        display: grid;
        grid-template-columns: 280px 1fr;
        gap: 20px;
    }
}

@media (max-width: 820px) {
    .header-inner {
        min-height: 66px;
    }

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

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

    .main-nav a,
    .nav-dropdown button {
        padding: 13px 10px;
        text-align: left;
    }

    .nav-dropdown {
        padding: 0;
    }

    .dropdown-panel {
        position: static;
        margin-top: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        border: 0;
        padding: 0 0 0 12px;
    }

    .mobile-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .brand {
        font-size: 20px;
    }

    .hero-carousel,
    .hero-content {
        min-height: 68vh;
    }

    .hero-shade {
        background:
            linear-gradient(0deg, #090a13 0%, rgba(8, 9, 20, 0.55) 58%, rgba(8, 9, 20, 0.2) 100%),
            linear-gradient(90deg, rgba(8, 9, 20, 0.82), rgba(8, 9, 20, 0.28));
    }

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

    .hero-content h1 {
        font-size: 42px;
    }

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

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

    .section-heading,
    .category-panel-head,
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-panel {
        grid-template-columns: 1fr;
    }

    .page-title {
        padding: 28px;
    }

    .side-column {
        display: block;
    }
}

@media (max-width: 520px) {
    main,
    .page-main,
    .detail-main,
    .header-inner,
    .footer-inner,
    .hero-content {
        width: min(100% - 24px, 1240px);
    }

    .movie-grid,
    .small-grid,
    .library-grid,
    .category-grid,
    .channel-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        display: grid;
    }

    .gradient-section,
    .category-panel,
    .detail-content,
    .poster-card,
    .side-list {
        padding: 18px;
    }
}
