:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-solid: #0f172a;
    --panel-soft: rgba(30, 41, 59, 0.72);
    --border: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --cyan-soft: rgba(34, 211, 238, 0.14);
    --shadow: 0 26px 70px rgba(0, 0, 0, 0.4);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.site-body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 32rem),
        radial-gradient(circle at 85% 20%, rgba(59, 130, 246, 0.12), transparent 26rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, 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%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 14px 24px;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 22px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cyan), #2563eb);
    color: white;
    box-shadow: 0 14px 38px rgba(34, 211, 238, 0.28);
}

.desktop-nav,
.mobile-link-row,
.mobile-category-row,
.footer-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-link,
.mobile-category-row a,
.footer-links a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-category-row a:hover,
.footer-links a:hover {
    color: var(--text);
    background: var(--cyan-soft);
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: min(34vw, 420px);
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
}

.top-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font: inherit;
}

.top-search input {
    padding: 8px 12px;
}

.top-search button,
.primary-btn,
.ghost-btn,
.section-more,
.menu-toggle {
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button,
.primary-btn {
    padding: 10px 18px;
    color: #07111f;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
    box-shadow: 0 14px 34px rgba(34, 211, 238, 0.24);
}

.top-search button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    background: var(--panel-soft);
    border: 1px solid var(--border);
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
}

.mobile-nav {
    display: none;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px 18px;
}

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

.hero-slider {
    position: relative;
    overflow: hidden;
    min-height: 720px;
    padding: 70px 24px 38px;
}

.hero-glow {
    position: absolute;
    inset: 8% auto auto 55%;
    width: 520px;
    height: 520px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.16);
    filter: blur(90px);
    pointer-events: none;
}

.hero-stage {
    position: relative;
    max-width: 1440px;
    min-height: 560px;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: 36px;
    overflow: hidden;
    background: var(--panel-solid);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: 40px;
    align-items: center;
    padding: clamp(32px, 5vw, 72px);
    background-size: cover;
    background-position: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.01);
    transition: opacity 0.65s ease, visibility 0.65s ease, transform 0.65s ease;
}

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

.hero-copy {
    max-width: 760px;
    position: relative;
    z-index: 2;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    margin-bottom: 14px;
    padding: 7px 12px;
    border: 1px solid rgba(34, 211, 238, 0.26);
    border-radius: 999px;
    color: #67e8f9;
    background: rgba(8, 47, 73, 0.42);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
    max-width: 760px;
    margin: 22px 0 0;
    color: #cbd5e1;
    font-size: 18px;
}

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

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

.hero-tags span,
.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(14, 116, 144, 0.22);
    border: 1px solid rgba(34, 211, 238, 0.18);
    font-size: 12px;
    font-weight: 700;
}

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

.ghost-btn,
.section-more {
    padding: 10px 18px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--border);
}

.hero-poster {
    justify-self: end;
    width: min(330px, 100%);
    aspect-ratio: 2 / 3;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.48);
    transform: rotate(2deg);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-poster img,
.poster-wrap img,
.detail-poster img,
.category-stack img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #0f172a;
}

.hero-bottom {
    position: relative;
    max-width: 1440px;
    margin: 18px auto 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: center;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.4);
    cursor: pointer;
}

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

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

.hero-mini-card {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.68);
}

.hero-mini-card img {
    width: 44px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
    background: #0f172a;
}

.hero-mini-card span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.content-section,
.page-main,
.detail-main {
    max-width: 1440px;
    margin: 0 auto;
    padding: 42px 24px;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 44px);
    line-height: 1;
    letter-spacing: -0.04em;
}

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

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

.category-tile,
.category-card,
.movie-card,
.rank-panel,
.article-card,
.player-shell {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.76), rgba(15, 23, 42, 0.78));
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.category-tile,
.category-card {
    position: relative;
    overflow: hidden;
    padding: 22px;
    min-height: 150px;
    transition: transform 0.24s ease, border-color 0.24s ease;
}

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

.category-tile span,
.category-card span {
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile p,
.category-card p {
    margin: 0;
    color: var(--muted);
}

.with-rank {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
    align-items: start;
}

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

.movie-card {
    overflow: hidden;
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.movie-card.is-hidden {
    display: none;
}

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

.poster-wrap img {
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card:hover .poster-wrap img {
    transform: scale(1.06);
    opacity: 0.82;
}

.poster-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: #07111f;
    background: var(--cyan);
    font-size: 12px;
    font-weight: 900;
}

.poster-play {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #07111f;
    background: rgba(103, 232, 249, 0.92);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
}

.card-content {
    padding: 14px;
}

.card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
}

.card-content h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.32;
}

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

.card-content p {
    margin: 8px 0 12px;
    min-height: 3.3em;
    color: #aebccd;
    font-size: 13px;
}

.rank-panel {
    position: sticky;
    top: 92px;
    padding: 20px;
}

.rank-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-weight: 900;
}

.rank-panel-head a {
    color: var(--cyan);
    font-size: 14px;
}

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

.rank-line {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.26);
}

.rank-line:hover {
    background: rgba(34, 211, 238, 0.12);
}

.rank-num {
    color: var(--cyan);
    font-weight: 900;
}

.rank-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.rank-meta {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.page-main,
.detail-main {
    padding-top: 30px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin: 24px 0 8px;
    padding: clamp(32px, 6vw, 70px);
    border: 1px solid var(--border);
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(8, 47, 73, 0.62), rgba(15, 23, 42, 0.88)),
        radial-gradient(circle at 80% 30%, rgba(34, 211, 238, 0.18), transparent 22rem);
    box-shadow: var(--shadow);
}

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

.filter-bar {
    margin-top: 26px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 12px;
}

.filter-bar input,
.filter-bar select {
    min-height: 52px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.38);
}

.category-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.category-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.category-stack img {
    aspect-ratio: 2 / 3;
    border-radius: 12px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 22px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(230px, 320px) minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    min-height: 520px;
    padding: clamp(24px, 5vw, 54px);
    border: 1px solid var(--border);
    border-radius: 36px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.05);
}

.detail-poster,
.detail-info {
    position: relative;
    z-index: 2;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.48);
}

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

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 26px 0;
}

.detail-meta-grid div {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.38);
}

.detail-meta-grid span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.detail-meta-grid strong {
    display: block;
    margin-top: 5px;
    font-size: 15px;
}

.detail-tags {
    margin-bottom: 28px;
}

.player-section {
    padding-left: 0;
    padding-right: 0;
}

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

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #07111f;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.62));
    cursor: pointer;
}

.play-layer span {
    width: 86px;
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    border-radius: 999px;
    background: rgba(103, 232, 249, 0.94);
    box-shadow: 0 22px 62px rgba(34, 211, 238, 0.34);
    font-size: 34px;
}

.player-shell.is-playing .play-layer {
    display: none;
}

.article-card {
    padding: clamp(24px, 5vw, 44px);
}

.article-card h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.article-card h2:not(:first-child) {
    margin-top: 28px;
}

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

.site-footer {
    margin-top: 50px;
    border-top: 1px solid var(--border);
    background: rgba(2, 6, 23, 0.66);
}

.footer-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 30px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    color: var(--muted);
}

.footer-logo {
    color: var(--text);
}

@media (max-width: 1180px) {
    .header-inner {
        grid-template-columns: auto 1fr auto;
    }

    .desktop-nav {
        display: none;
    }

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

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

    .with-rank {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }

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

@media (max-width: 900px) {
    .header-inner {
        grid-template-columns: auto auto;
    }

    .top-search {
        grid-column: 1 / -1;
        min-width: 0;
        width: 100%;
        order: 3;
    }

    .hero-slider {
        min-height: auto;
        padding-top: 28px;
    }

    .hero-stage {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
    }

    .hero-poster {
        justify-self: start;
        width: 220px;
    }

    .hero-bottom {
        grid-template-columns: 1fr;
    }

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

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

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

    .detail-poster {
        max-width: 260px;
    }

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

@media (max-width: 640px) {
    .header-inner,
    .mobile-nav,
    .content-section,
    .page-main,
    .detail-main {
        padding-left: 14px;
        padding-right: 14px;
    }

    .site-logo {
        font-size: 17px;
    }

    .hero-slider {
        padding-left: 14px;
        padding-right: 14px;
    }

    .hero-stage {
        min-height: 690px;
        border-radius: 26px;
    }

    .hero-slide {
        padding: 24px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 38px;
    }

    .hero-rail {
        display: none;
    }

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

    .category-grid,
    .category-overview-grid,
    .movie-grid,
    .filter-bar {
        grid-template-columns: 1fr;
    }

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

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

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

    .rank-meta {
        display: none;
    }

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

    .play-layer span {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
