:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: #1e293b;
    --panel-light: #334155;
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --blue: #3b82f6;
    --orange: #fb923c;
    --text: #ffffff;
    --muted: #cbd5e1;
    --muted-2: #94a3b8;
    --line: #1f2a44;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 6%, rgba(34, 211, 238, 0.16), transparent 34%),
        radial-gradient(circle at 88% 18%, rgba(59, 130, 246, 0.12), transparent 32%),
        var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

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

.nav-wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 72px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #001018;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    color: var(--muted);
}

.desktop-nav a {
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--cyan);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search input,
.mobile-panel input,
.search-toolbar input,
.search-toolbar select {
    color: var(--text);
    background: rgba(51, 65, 85, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    outline: none;
}

.nav-search input {
    width: 220px;
    padding: 10px 16px;
}

.nav-search input:focus,
.mobile-panel input:focus,
.search-toolbar input:focus,
.search-toolbar select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16);
}

.nav-search button,
.mobile-panel button,
.btn,
.player-button {
    border: 0;
    border-radius: 999px;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-weight: 800;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.nav-search button {
    padding: 10px 16px;
}

.nav-search button:hover,
.mobile-panel button:hover,
.btn:hover,
.player-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    color: var(--text);
    background: transparent;
    border: 0;
    font-size: 28px;
}

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

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

.mobile-panel a {
    color: var(--muted);
    padding: 8px 0;
}

.mobile-panel form {
    display: flex;
    gap: 8px;
}

.mobile-panel input {
    width: 100%;
    padding: 11px 14px;
}

.mobile-panel button {
    padding: 0 16px;
}

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

.hero-slider {
    position: relative;
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.08);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 42%, rgba(2, 6, 23, 0.20) 100%),
        linear-gradient(0deg, #020617 0%, transparent 36%, rgba(2, 6, 23, 0.48) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.72fr);
    gap: 42px;
    align-items: center;
    padding: 92px 0 72px;
}

.hero-kicker,
.section-kicker,
.breadcrumb {
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 800px;
    margin: 14px 0 18px;
    font-size: clamp(38px, 6vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-desc {
    max-width: 680px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.85;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
}

.btn.secondary {
    color: var(--text);
    background: rgba(30, 41, 59, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.20);
}

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

.hero-tags span,
.tag-row span,
.detail-tags span,
.category-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #cffafe;
    background: rgba(8, 145, 178, 0.18);
    border: 1px solid rgba(34, 211, 238, 0.18);
}

.hero-tags span {
    padding: 7px 12px;
}

.hero-poster {
    position: relative;
    justify-self: end;
    width: min(390px, 100%);
    border-radius: 28px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-poster-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 72px 24px 22px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), transparent);
}

.hero-poster-info strong {
    display: block;
    font-size: 22px;
}

.hero-poster-info span {
    color: var(--muted-2);
}

.hero-controls {
    position: absolute;
    z-index: 5;
    right: max(16px, calc((100vw - 1180px) / 2));
    bottom: 34px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-control {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--text);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
}

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

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

.hero-dot.active {
    background: var(--cyan);
}

.section {
    padding: 58px 0;
}

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

.section-title h2,
.page-title h1 {
    margin: 8px 0 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.section-title p,
.page-title p,
.category-intro,
.detail-summary {
    color: var(--muted);
    line-height: 1.75;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.20);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 22px 70px rgba(6, 182, 212, 0.12);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #000;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.play-hover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 48px;
    background: rgba(0, 0, 0, 0.32);
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.meta-chip,
.rank-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.72);
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    left: 12px;
    right: auto;
    background: linear-gradient(135deg, var(--orange), #ef4444);
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 9px;
    font-size: 18px;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: var(--cyan);
}

.card-body p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0;
    overflow: hidden;
    color: var(--muted-2);
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    color: var(--muted-2);
    font-size: 13px;
}

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

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    padding: 4px 9px;
    font-size: 12px;
}

.feature-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 24px;
}

.feature-layout .movie-card.is-featured .poster-link img {
    aspect-ratio: 16 / 9;
}

.rank-panel,
.category-card,
.info-panel,
.player-panel,
.detail-panel {
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.84);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
}

.rank-panel {
    padding: 22px;
}

.rank-panel h2,
.info-panel h2,
.detail-panel h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.rank-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-list a {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.74);
    transition: background 0.2s ease;
}

.rank-list a:hover {
    background: rgba(51, 65, 85, 0.86);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #001018;
    background: var(--cyan);
    font-weight: 900;
}

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

.rank-meta {
    color: var(--muted-2);
    font-size: 13px;
}

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

.category-card {
    padding: 22px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.52);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 22px;
}

.category-card p {
    margin: 0;
    color: var(--muted-2);
    line-height: 1.65;
}

.page-hero {
    padding: 54px 0 34px;
    background: linear-gradient(135deg, rgba(14, 116, 144, 0.20), rgba(30, 41, 59, 0.10));
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
}

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

.search-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px;
    gap: 12px;
    margin: 28px 0 0;
}

.search-toolbar input,
.search-toolbar select {
    padding: 13px 16px;
}

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

.player-panel {
    overflow: hidden;
}

.player-box {
    position: relative;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
}

.player-box video,
.player-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    cursor: pointer;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
}

.player-button {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    min-width: 92px;
    min-height: 92px;
    border: 0;
    transform: translate(-50%, -50%);
    font-size: 34px;
}

.player-cover.hidden,
.player-button.hidden {
    display: none;
}

.player-caption {
    padding: 24px;
}

.player-caption h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
}

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

.detail-tags span {
    padding: 6px 11px;
    font-size: 13px;
}

.info-panel,
.detail-panel {
    padding: 24px;
}

.info-list {
    display: grid;
    gap: 14px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.info-list dt {
    color: var(--muted-2);
}

.info-list dd {
    margin: 0;
}

.article-content {
    display: grid;
    gap: 18px;
    color: var(--muted);
    line-height: 1.9;
    font-size: 16px;
}

.article-content p {
    margin: 0;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.site-footer {
    margin-top: 48px;
    padding: 42px 0 0;
    color: var(--muted-2);
    background: rgba(2, 6, 23, 0.86);
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.7fr 0.7fr;
    gap: 30px;
}

.footer-logo {
    color: #fff;
    margin-bottom: 16px;
}

.site-footer p {
    max-width: 520px;
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #fff;
}

.site-footer a:not(.logo) {
    display: block;
    margin: 9px 0;
}

.site-footer a:hover {
    color: var(--cyan);
}

.footer-bottom {
    margin-top: 34px;
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.10);
}

.empty-state {
    display: none;
    padding: 28px;
    color: var(--muted);
    text-align: center;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.75);
}

.empty-state.show {
    display: block;
}

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

    .menu-toggle {
        display: block;
    }

    .hero-content,
    .feature-layout,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        justify-self: start;
        width: min(320px, 100%);
    }

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

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

@media (max-width: 760px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .logo {
        font-size: 20px;
    }

    .hero,
    .hero-slider,
    .hero-slide {
        min-height: 720px;
    }

    .hero-content {
        padding-top: 64px;
    }

    .hero-controls {
        left: 12px;
        right: auto;
    }

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

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

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

    .rank-list a {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .rank-meta {
        grid-column: 2;
    }
}

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

    .player-caption,
    .info-panel,
    .detail-panel,
    .rank-panel {
        padding: 18px;
    }
}
