:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111c31;
    --line: #1e293b;
    --line-soft: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --cyan: #06b6d4;
    --cyan-soft: rgba(6, 182, 212, 0.16);
    --cyan-strong: #0891b2;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 0%, rgba(8, 145, 178, 0.18), transparent 28rem),
        radial-gradient(circle at 90% 12%, rgba(14, 165, 233, 0.16), transparent 26rem),
        var(--bg);
    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%;
}

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(30, 41, 59, 0.9);
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.24);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 12px 30px rgba(8, 145, 178, 0.35);
    font-size: 13px;
}

.brand-name {
    font-size: 22px;
    letter-spacing: 0.02em;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.desktop-nav a,
.mobile-links a {
    color: var(--muted-strong);
    font-size: 15px;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-links a:hover {
    color: #ffffff;
}

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

.header-search input,
.mobile-search input,
.filter-bar input,
.search-panel input {
    width: 100%;
    border: 1px solid #334155;
    border-radius: 999px;
    background: #0b1220;
    color: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    padding: 10px 14px;
}

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

.header-search button,
.mobile-search button,
.search-panel button {
    border: 0;
    border-radius: 999px;
    background: var(--cyan-strong);
    color: #ffffff;
    padding: 10px 18px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-panel button:hover {
    background: var(--cyan);
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

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

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

.mobile-search input {
    padding: 12px 14px;
}

.mobile-links {
    display: grid;
    gap: 12px;
}

.hero {
    position: relative;
    min-height: 76vh;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.7s ease, transform 1.2s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.66;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.74) 44%, rgba(2, 6, 23, 0.3) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 42%, rgba(2, 6, 23, 0.32) 100%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - 1200px) / 2));
    bottom: 86px;
    z-index: 2;
    width: min(680px, calc(100% - 64px));
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #67e8f9;
    border: 1px solid rgba(103, 232, 249, 0.28);
    background: rgba(8, 145, 178, 0.16);
    border-radius: 999px;
    padding: 8px 13px;
    font-size: 14px;
    font-weight: 700;
}

.hero-content h1 {
    margin: 22px 0 0;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content h2 {
    margin: 16px 0 0;
    font-size: clamp(28px, 4vw, 50px);
    line-height: 1.08;
}

.hero-content p {
    margin: 18px 0 0;
    color: var(--muted-strong);
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.75;
}

.hero-meta,
.movie-meta-line,
.detail-meta,
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}

.hero-meta {
    margin-top: 18px;
}

.hero-meta span,
.movie-meta-line span,
.detail-meta span,
.breadcrumbs a,
.breadcrumbs span {
    color: var(--muted);
    font-size: 14px;
}

.hero-meta span:first-child,
.movie-meta-line span:first-child,
.detail-meta span:first-child {
    color: #ffffff;
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    padding: 14px 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    box-shadow: 0 18px 42px rgba(6, 182, 212, 0.34);
}

.btn-secondary,
.btn-ghost {
    padding: 13px 22px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(15, 23, 42, 0.72);
}

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

.hero-controls {
    position: absolute;
    right: max(32px, calc((100vw - 1200px) / 2));
    bottom: 42px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-control,
.hero-dot {
    border: 0;
    color: #ffffff;
    cursor: pointer;
}

.hero-control {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.66);
    font-size: 24px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 99px;
    background: #475569;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--cyan);
}

.page-section,
.page-hero,
.detail-wrap {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.page-section {
    padding: 72px 0;
}

.page-section + .page-section {
    padding-top: 0;
}

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

.section-head h2,
.page-hero h1,
.detail-main h1 {
    margin: 0;
    letter-spacing: -0.04em;
}

.section-head h2 {
    font-size: clamp(28px, 3vw, 40px);
}

.section-head p,
.page-hero p,
.category-card p,
.detail-main p,
.search-panel p {
    color: var(--muted-strong);
    line-height: 1.75;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72));
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(6, 182, 212, 0.42);
    box-shadow: 0 26px 62px rgba(0, 0, 0, 0.32);
}

.poster-wrap {
    position: relative;
    display: block;
    height: 270px;
    overflow: hidden;
    background: #0f172a;
}

.movie-card-compact .poster-wrap {
    height: 210px;
}

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

.movie-card:hover .poster-wrap img,
.category-mini:hover img,
.rank-row:hover img {
    transform: scale(1.08);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 48%);
}

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

.play-chip {
    right: 14px;
    bottom: 14px;
    padding: 7px 12px;
    color: #ffffff;
    background: rgba(8, 145, 178, 0.9);
}

.rank-badge {
    left: 14px;
    top: 14px;
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.32);
}

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

.movie-meta-line {
    min-height: 22px;
    margin-bottom: 10px;
}

.movie-card h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.35;
}

.movie-card h2 a {
    transition: color 0.2s ease;
}

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

.movie-card p {
    display: -webkit-box;
    min-height: 50px;
    margin: 10px 0 0;
    overflow: hidden;
    color: var(--muted-strong);
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-list span {
    color: #7dd3fc;
    background: rgba(8, 145, 178, 0.12);
    border: 1px solid rgba(8, 145, 178, 0.18);
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
}

.feature-panel,
.category-card,
.search-panel,
.filter-bar,
.detail-card,
.ranking-panel {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.86));
    box-shadow: var(--shadow);
}

.feature-panel {
    position: relative;
    overflow: hidden;
    padding: 34px;
}

.feature-panel::before,
.page-hero::before,
.detail-hero::before {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.12);
    filter: blur(40px);
    pointer-events: none;
}

.feature-panel::before {
    top: -120px;
    right: -80px;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
}

.category-card h2,
.category-card h3,
.ranking-panel h2 {
    margin: 0 0 12px;
}

.category-mini-list {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}

.category-mini {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 14px;
    align-items: center;
}

.category-mini img,
.rank-row img {
    width: 100%;
    height: 76px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.category-mini strong,
.rank-info strong {
    display: block;
    line-height: 1.4;
}

.category-mini span,
.rank-info em {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.rank-layout {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 24px;
}

.ranking-panel {
    padding: 28px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: auto 96px 1fr auto;
    gap: 14px;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.36);
    padding: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
    border-color: rgba(6, 182, 212, 0.45);
    background: rgba(8, 145, 178, 0.1);
}

.list-rank {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(8, 145, 178, 0.28);
    font-weight: 900;
}

.rank-arrow {
    color: #67e8f9;
    font-size: 28px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin-top: 42px;
    padding: 52px;
    border: 1px solid var(--line-soft);
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(8, 145, 178, 0.18), rgba(15, 23, 42, 0.78)),
        linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.92));
    box-shadow: var(--shadow);
}

.page-hero::before {
    right: -90px;
    bottom: -90px;
}

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

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

.filter-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 34px 0 26px;
    padding: 18px;
}

.filter-bar input {
    padding: 13px 16px;
}

.filter-bar span {
    color: var(--muted);
    white-space: nowrap;
}

.search-panel {
    margin: 38px auto 0;
    padding: 28px;
}

.search-panel form {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.search-panel input {
    padding: 15px 18px;
}

.search-results {
    margin-top: 32px;
}

.empty-state {
    color: var(--muted-strong);
    text-align: center;
    padding: 44px 0;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 32px 0 48px;
    background:
        radial-gradient(circle at 18% 0%, rgba(6, 182, 212, 0.18), transparent 24rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0));
}

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

.breadcrumbs {
    grid-column: 1 / -1;
    margin-bottom: 6px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    background: #000000;
    box-shadow: var(--shadow);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: #000000;
    color: #ffffff;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
}

.player-cover span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 82px;
    height: 82px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(8, 145, 178, 0.88);
    box-shadow: 0 20px 46px rgba(6, 182, 212, 0.36);
    transform: translate(-50%, -50%);
    font-size: 28px;
}

.detail-card {
    padding: 28px;
}

.detail-main h1 {
    font-size: clamp(32px, 4.2vw, 54px);
    line-height: 1.08;
}

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

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.detail-content {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    padding: 40px 0 72px;
}

.article-panel {
    display: grid;
    gap: 24px;
}

.article-panel section,
.side-panel {
    border: 1px solid var(--line-soft);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.82);
    padding: 28px;
}

.article-panel h2,
.side-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.article-panel p {
    margin: 0;
    color: var(--muted-strong);
    font-size: 17px;
    line-height: 1.95;
}

.side-panel {
    position: sticky;
    top: 92px;
}

.side-list {
    display: grid;
    gap: 14px;
}

.next-prev {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.next-prev a {
    flex: 1;
    min-width: 180px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.96);
}

.footer-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 36px;
    padding: 46px 0;
}

.footer-brand p {
    color: var(--muted);
    line-height: 1.75;
}

.footer-group h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

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

.footer-links a {
    color: var(--muted);
    transition: color 0.2s ease;
}

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

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: var(--muted);
    text-align: center;
    padding: 18px;
}

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

    .menu-button {
        display: block;
        margin-left: auto;
    }

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

    .rank-layout,
    .detail-wrap,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .side-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .header-inner {
        width: min(100% - 24px, 1200px);
        height: 62px;
    }

    .brand-name {
        font-size: 19px;
    }

    .mobile-menu,
    .page-section,
    .page-hero,
    .detail-wrap,
    .detail-content,
    .footer-inner {
        width: min(100% - 24px, 1200px);
    }

    .hero {
        min-height: 78vh;
    }

    .hero-content {
        left: 20px;
        bottom: 118px;
        width: calc(100% - 40px);
    }

    .hero-actions {
        gap: 10px;
    }

    .btn-primary,
    .btn-secondary,
    .btn-ghost {
        width: 100%;
    }

    .hero-controls {
        left: 20px;
        right: auto;
        bottom: 32px;
    }

    .section-head {
        display: block;
    }

    .section-head .btn-ghost {
        width: auto;
        margin-top: 18px;
    }

    .movie-grid,
    .movie-grid.large-grid,
    .category-preview-grid {
        grid-template-columns: 1fr;
    }

    .poster-wrap,
    .movie-card-compact .poster-wrap {
        height: 235px;
    }

    .page-section {
        padding: 48px 0;
    }

    .page-hero {
        margin-top: 24px;
        padding: 30px 22px;
        border-radius: 24px;
    }

    .filter-bar,
    .search-panel form {
        display: grid;
    }

    .category-mini,
    .rank-row {
        grid-template-columns: 92px 1fr auto;
    }

    .rank-row .list-rank {
        grid-column: 1 / -1;
    }

    .detail-poster img {
        height: 280px;
    }

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