:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111c33;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.22);
    --cyan: #06b6d4;
    --blue: #2563eb;
    --amber: #f59e0b;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(8, 145, 178, 0.18), transparent 34rem), var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.86);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    box-shadow: 0 12px 32px rgba(6, 182, 212, 0.25);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.02em;
}

.brand-text em {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

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

.nav-link,
.mobile-link {
    color: #cbd5e1;
    border-radius: 12px;
    transition: 0.25s ease;
}

.nav-link {
    padding: 10px 14px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: white;
    background: rgba(30, 41, 59, 0.9);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 6px;
}

.header-search input,
.mobile-search input,
.wide-search input,
.filter-bar input,
.filter-bar select {
    color: var(--text);
    outline: none;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.92);
    border-radius: 14px;
    transition: 0.25s ease;
}

.header-search input {
    width: 220px;
    padding: 10px 12px;
}

.header-search button,
.mobile-search button,
.wide-search button {
    cursor: pointer;
    border: none;
    border-radius: 14px;
    padding: 10px 15px;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.header-search input:focus,
.mobile-search input:focus,
.wide-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(6, 182, 212, 0.75);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    color: white;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.8);
    border-radius: 12px;
    padding: 9px 12px;
}

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

.mobile-nav.is-open {
    display: block;
}

.mobile-link {
    display: block;
    padding: 12px 14px;
}

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

.mobile-search input {
    flex: 1;
    padding: 11px 12px;
}

.hero-slider {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: #030712;
}

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

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.16)), linear-gradient(0deg, #020617 0%, transparent 35%);
}

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

.hero-kicker,
.page-hero span,
.section-heading span {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    color: #67e8f9;
    background: rgba(8, 145, 178, 0.16);
    border: 1px solid rgba(103, 232, 249, 0.18);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    letter-spacing: 0.04em;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 20px 0 16px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-lead {
    max-width: 760px;
    color: #cbd5e1;
    font-size: 17px;
}

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

.hero-tags {
    margin: 24px 0;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.72);
    padding: 6px 10px;
    font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    transition: 0.25s ease;
    font-weight: 700;
}

.primary-btn {
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    padding: 13px 22px;
    box-shadow: 0 15px 32px rgba(37, 99, 235, 0.25);
}

.ghost-btn {
    color: #dbeafe;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.72);
    padding: 12px 20px;
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: absolute;
    right: max(16px, calc((100% - 1320px) / 2));
    bottom: 70px;
    z-index: 3;
    width: min(28vw, 310px);
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.hero-poster img,
.poster-link img,
.detail-poster img,
.top-card img,
.category-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.hero-dot {
    width: 34px;
    height: 6px;
    cursor: pointer;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

.hero-dot.is-active {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.section-panel,
.content-section,
.split-section,
.footer-grid,
.footer-bottom {
    width: min(1320px, calc(100% - 32px));
    margin: 0 auto;
}

.section-panel {
    position: relative;
    z-index: 4;
    margin-top: -46px;
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    gap: 24px;
    align-items: center;
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.section-panel h2,
.section-heading h2,
.story-card h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.03em;
}

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

.wide-search {
    display: flex;
    gap: 10px;
}

.wide-search input {
    flex: 1;
    padding: 14px 16px;
}

.wide-search button {
    padding: 0 22px;
}

.content-section {
    padding: 70px 0 0;
}

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

.section-heading h2 {
    margin-top: 10px;
}

.section-heading a,
.text-link {
    color: #67e8f9;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.68));
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    transition: 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(6, 182, 212, 0.42);
    box-shadow: 0 22px 70px rgba(8, 145, 178, 0.2);
}

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

.poster-link img {
    transition: transform 0.35s ease;
}

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

.rating-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, var(--amber));
    padding: 4px 8px;
    font-weight: 800;
    font-size: 12px;
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    opacity: 0;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.9);
    transform: translate(-50%, -50%) scale(0.84);
    transition: 0.25s ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: #67e8f9;
}

.movie-card p {
    min-height: 48px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.tag-row span {
    padding: 4px 8px;
    color: #bfdbfe;
    font-size: 12px;
}

.category-grid,
.channel-grid,
.top-grid {
    display: grid;
    gap: 18px;
}

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

.category-tile {
    position: relative;
    min-height: 160px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 6px;
    padding: 18px;
    border-radius: 22px;
    isolation: isolate;
    background: #0f172a;
}

.category-tile::after,
.top-card::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.1));
}

.category-tile img,
.top-card img {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.category-tile span {
    font-size: 22px;
    font-weight: 800;
}

.category-tile em {
    color: #cbd5e1;
    font-style: normal;
    font-size: 13px;
}

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

.split-section .content-section {
    width: auto;
}

.ranking-panel {
    position: sticky;
    top: 92px;
    margin-top: 70px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.8);
    padding: 20px;
}

.compact-title {
    margin-bottom: 16px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 44px 54px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 70px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.45);
    transition: 0.22s ease;
}

.rank-item:hover {
    border-color: rgba(6, 182, 212, 0.42);
    transform: translateX(4px);
}

.rank-number {
    color: #67e8f9;
    font-size: 18px;
    font-weight: 900;
    text-align: center;
}

.rank-item img {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-title {
    overflow: hidden;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-score {
    color: var(--amber);
    font-weight: 800;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: #030712;
}

.page-hero {
    min-height: 330px;
    display: flex;
    align-items: center;
    padding: 72px max(16px, calc((100% - 1320px) / 2));
    background: radial-gradient(circle at 16% 10%, rgba(6, 182, 212, 0.24), transparent 24rem), linear-gradient(135deg, #020617, #0f172a);
}

.channel-hero {
    min-height: 390px;
}

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

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

.channel-card {
    overflow: hidden;
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 18px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.78);
    padding: 16px;
}

.channel-cover {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    overflow: hidden;
    min-height: 170px;
    border-radius: 16px;
}

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

.channel-card h2 {
    margin: 8px 0;
}

.channel-card p {
    color: var(--muted);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 220px 180px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.78);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    padding: 13px 14px;
}

.empty-state {
    margin-top: 24px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed rgba(148, 163, 184, 0.25);
    border-radius: 18px;
    padding: 30px;
}

.top-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 28px;
}

.top-card {
    position: relative;
    min-height: 360px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    isolation: isolate;
    border-radius: 24px;
    padding: 22px;
    background: #0f172a;
}

.top-rank {
    width: fit-content;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, var(--amber));
    padding: 6px 10px;
    font-weight: 900;
}

.top-card strong {
    font-size: 24px;
}

.top-card em {
    color: #dbeafe;
    font-style: normal;
}

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

.detail-hero {
    min-height: 640px;
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.38)), linear-gradient(0deg, #020617 0%, transparent 28%);
}

.detail-inner {
    position: relative;
    z-index: 2;
    width: min(1320px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0 80px;
}

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

.breadcrumb a:hover {
    color: #67e8f9;
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: end;
    min-height: 500px;
}

.detail-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.detail-poster span {
    position: absolute;
    right: 14px;
    top: 14px;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, var(--amber));
    padding: 6px 10px;
    font-weight: 900;
}

.detail-info h1 {
    font-size: clamp(36px, 5vw, 68px);
}

.detail-meta {
    margin: 18px 0 0;
}

.player-section {
    padding-top: 34px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 26px;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    border: none;
    color: white;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.22), rgba(2, 6, 23, 0.28));
    transition: 0.25s ease;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 48px rgba(6, 182, 212, 0.35);
    font-size: 32px;
}

.play-overlay:hover span {
    transform: scale(1.06);
}

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

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

.story-card {
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.76);
    padding: 26px;
}

.story-card p {
    margin: 16px 0 0;
    color: #cbd5e1;
    font-size: 16px;
}

.site-footer {
    margin-top: 80px;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.4), #020617);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 30px;
    padding: 46px 0;
}

.footer-grid h2,
.footer-grid h3 {
    margin: 0 0 14px;
}

.footer-grid p {
    margin: 0;
    color: var(--muted);
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a {
    color: #cbd5e1;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 0 28px;
    color: var(--muted);
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

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

    .ranking-panel {
        position: static;
        margin-top: 0;
    }
}

@media (max-width: 920px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

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

    .hero-content {
        width: min(100% - 32px, 720px);
        margin-left: 16px;
        padding-right: 0;
    }

    .hero-poster {
        display: none;
    }

    .section-panel,
    .filter-bar,
    .detail-layout,
    .article-section,
    .footer-grid,
    .top-grid,
    .full-rank-list {
        grid-template-columns: 1fr;
    }

    .wide-search {
        flex-direction: column;
    }

    .channel-card {
        grid-template-columns: 140px 1fr;
    }
}

@media (max-width: 680px) {
    .header-inner {
        height: 66px;
        width: min(100% - 24px, 1320px);
    }

    .brand-text em {
        display: none;
    }

    .brand-icon {
        width: 38px;
        height: 38px;
    }

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

    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 36px;
    }

    .section-panel,
    .content-section,
    .split-section,
    .footer-grid,
    .footer-bottom,
    .detail-inner {
        width: min(100% - 24px, 1320px);
    }

    .section-panel {
        padding: 20px;
    }

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

    .movie-card-body {
        padding: 12px;
    }

    .movie-card p {
        min-height: auto;
    }

    .category-tile {
        min-height: 140px;
    }

    .channel-card {
        grid-template-columns: 1fr;
    }

    .channel-cover {
        min-height: 190px;
    }

    .detail-hero {
        min-height: auto;
    }

    .detail-layout {
        gap: 24px;
        min-height: 0;
        padding-top: 30px;
    }

    .detail-poster {
        width: min(260px, 78vw);
    }

    .footer-bottom {
        flex-direction: column;
    }
}

@media (max-width: 430px) {
    .movie-grid,
    .compact-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .mobile-search {
        flex-direction: column;
    }
}
