:root {
    color-scheme: dark;
    --page-bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: #0f172a;
    --panel-soft: rgba(30, 41, 59, 0.5);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft-text: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-dark: #0891b2;
    --shadow: 0 24px 60px rgba(8, 145, 178, 0.16);
    --radius: 22px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.16), transparent 32rem),
        radial-gradient(circle at 100% 15%, rgba(14, 165, 233, 0.12), transparent 36rem),
        var(--page-bg);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img {
    display: block;
    max-width: 100%;
    background: linear-gradient(135deg, #0f172a, #164e63);
}

button,
input {
    font: inherit;
}

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

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(16px);
    transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 12px 32px rgba(2, 6, 23, 0.45);
}

.header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, #06b6d4, #0e7490);
    box-shadow: 0 10px 28px rgba(34, 211, 238, 0.25);
    font-size: 14px;
}

.logo-text {
    display: grid;
    line-height: 1.08;
}

.logo-text strong,
.footer-logo strong {
    font-size: 19px;
    letter-spacing: 0.02em;
}

.logo-text em {
    margin-top: 3px;
    color: var(--cyan);
    font-size: 11px;
    font-style: normal;
}

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

.nav-link {
    color: #cbd5e1;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s ease;
}

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

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.34);
}

.header-search input,
.mobile-search input,
.search-hero-form input,
.listing-tools input {
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.header-search input {
    width: 180px;
    padding: 7px 4px 7px 12px;
}

.header-search button,
.mobile-search button,
.listing-tools button {
    border: 0;
    cursor: pointer;
    color: white;
    border-radius: 999px;
    background: #0891b2;
}

.header-search button {
    padding: 7px 14px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.8);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: white;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.98);
}

.mobile-panel.open {
    display: block;
}

.mobile-nav,
.mobile-search {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
}

.mobile-nav {
    display: grid;
    gap: 14px;
    padding: 18px 0 10px;
}

.mobile-search {
    display: flex;
    gap: 8px;
    padding: 10px 0 18px;
}

.mobile-search input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.4);
}

.mobile-search button {
    padding: 0 18px;
}

.hero {
    position: relative;
    min-height: 70vh;
    height: 720px;
    overflow: hidden;
    background: #0f172a;
}

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.24)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 38%, rgba(2, 6, 23, 0) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding-top: 68px;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--cyan);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.hero-copy h1,
.compact-hero h1,
.detail-info h1 {
    margin: 0;
    color: white;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.hero-copy h1 {
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
}

.hero-copy p {
    max-width: 650px;
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
    color: white;
    background: #06b6d4;
    box-shadow: 0 16px 36px rgba(6, 182, 212, 0.26);
}

.btn-primary:hover {
    background: #0891b2;
}

.btn-ghost {
    color: var(--cyan);
    border: 1px solid rgba(34, 211, 238, 0.26);
    background: rgba(15, 23, 42, 0.72);
}

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

.hero-tags span,
.tag-list span,
.card-badge,
.card-score {
    border: 1px solid rgba(34, 211, 238, 0.24);
    color: var(--cyan);
    background: rgba(15, 23, 42, 0.78);
}

.hero-tags span {
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 13px;
}

.hero-control-bar {
    position: absolute;
    left: 50%;
    bottom: 44px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.hero-dot {
    width: 34px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(203, 213, 225, 0.36);
    cursor: pointer;
}

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

.hero-rank-link,
.section-more {
    color: var(--cyan);
    font-weight: 800;
}

.home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    padding: 72px 0 20px;
}

.content-section {
    margin-bottom: 72px;
}

.soft-panel {
    padding: 34px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.58), rgba(15, 23, 42, 0.4));
}

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

.section-head h2,
.side-card h2,
.article-card h2,
.site-footer h2 {
    margin: 0;
    color: white;
}

.section-head h2 {
    font-size: clamp(26px, 3vw, 36px);
    letter-spacing: -0.03em;
}

.section-head p,
.side-card p,
.site-footer p,
.compact-hero p {
    color: var(--muted);
    line-height: 1.75;
}

.section-head p {
    margin: 8px 0 0;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.58);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.34);
    box-shadow: var(--shadow);
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #0f172a;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

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

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.78));
}

.card-badge,
.card-score {
    position: absolute;
    z-index: 2;
    top: 12px;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
}

.card-badge {
    left: 12px;
}

.card-score {
    right: 12px;
}

.card-body {
    padding: 17px;
}

.card-body h3 {
    margin: 0 0 10px;
    color: white;
    font-size: 17px;
    line-height: 1.35;
}

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

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
}

.home-side {
    position: sticky;
    top: 92px;
    align-self: start;
}

.side-card {
    padding: 22px;
    margin-bottom: 22px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.62);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 38px 66px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.42);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    background: rgba(30, 41, 59, 0.78);
}

.rank-row strong {
    color: var(--cyan);
    font-size: 20px;
}

.rank-row img {
    width: 66px;
    height: 48px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-row b,
.rank-row em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-row b {
    color: white;
    font-size: 15px;
}

.rank-row em {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-chips a {
    padding: 9px 13px;
    border-radius: 999px;
    color: var(--soft-text);
    background: rgba(30, 41, 59, 0.7);
}

.category-chips a:hover {
    color: var(--cyan);
}

.page-main {
    padding-top: 68px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background:
        radial-gradient(circle at 12% 20%, rgba(34, 211, 238, 0.18), transparent 26rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.86));
}

.compact-hero .container {
    padding: 88px 0 72px;
}

.compact-hero h1 {
    font-size: clamp(36px, 6vw, 64px);
}

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

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

.category-card {
    overflow: hidden;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.66);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.category-card a {
    display: grid;
    min-height: 250px;
}

.category-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.category-card span {
    padding: 18px 18px 0;
    color: white;
    font-size: 22px;
    font-weight: 800;
}

.category-card p {
    padding: 0 18px 18px;
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.listing-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 26px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.62);
}

.listing-tools label {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.listing-tools span {
    color: var(--muted);
    font-size: 14px;
}

.listing-tools input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.4);
}

.listing-tools button {
    padding: 12px 18px;
}

.search-hero-form {
    display: flex;
    max-width: 640px;
    gap: 12px;
    margin-top: 26px;
}

.search-hero-form input {
    flex: 1;
    min-height: 50px;
    padding: 0 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.38);
}

.detail-top {
    padding-top: 42px;
}

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

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

.player-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 24px;
    align-items: stretch;
}

.player-card {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 28px;
    background: #000;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.player-card video {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
    background: #000;
}

.player-start {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    color: white;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.72));
}

.player-start span {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #06b6d4;
    box-shadow: 0 18px 45px rgba(6, 182, 212, 0.36);
    font-size: 28px;
}

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

.detail-info {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 18px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.66);
}

.detail-info img {
    width: 120px;
    height: 170px;
    object-fit: cover;
    border-radius: 18px;
}

.detail-info h1 {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
}

.detail-info p {
    color: var(--soft-text);
    line-height: 1.7;
}

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

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

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

.info-list dd {
    margin: 0;
    color: white;
    font-weight: 700;
    text-align: right;
}

.detail-content {
    margin-top: 30px;
}

.article-card {
    padding: 34px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.62);
}

.article-card h2 {
    margin-top: 0;
    font-size: 26px;
}

.article-card p {
    color: var(--soft-text);
    font-size: 17px;
    line-height: 1.9;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.tag-list span {
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
}

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

.site-footer {
    margin-top: 80px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.88);
}

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

.footer-links {
    display: grid;
    gap: 9px;
    margin-top: 14px;
}

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

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

.footer-bottom {
    padding: 18px 0 26px;
    color: #64748b;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

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

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

    .home-layout,
    .player-layout {
        grid-template-columns: 1fr;
    }

    .home-side {
        position: static;
    }

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

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

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

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

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

    .hero-control-bar {
        bottom: 26px;
        align-items: flex-start;
        flex-direction: column;
    }

    .section-head,
    .listing-tools,
    .search-hero-form {
        align-items: stretch;
        flex-direction: column;
    }

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

    .soft-panel,
    .article-card {
        padding: 22px;
    }

    .detail-info {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .detail-info img {
        width: 96px;
        height: 138px;
    }

    .player-card,
    .player-card video {
        min-height: 260px;
    }

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

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

    .logo-text em {
        display: none;
    }

    .hero {
        height: 620px;
    }

    .hero-copy p {
        font-size: 15px;
    }

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

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

    .rank-row img {
        width: 58px;
        height: 44px;
    }
}
