:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: #111827;
    --panel-2: #1e293b;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --orange: #fb923c;
    --shadow: 0 25px 80px rgba(2, 6, 23, 0.55);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 30rem),
        radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.16), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    min-height: 100vh;
}

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;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 40px rgba(2, 6, 23, 0.34);
    backdrop-filter: blur(16px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: white;
    box-shadow: 0 12px 32px rgba(34, 211, 238, 0.22);
}

.brand-text {
    font-size: 1.25rem;
    background: linear-gradient(90deg, #60a5fa, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

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

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

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: white;
    background: rgba(51, 65, 85, 0.88);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
    color: white;
    padding: 10px;
}

.menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: currentColor;
    border-radius: 999px;
}

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

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
}

.mobile-link {
    padding: 13px 14px;
    background: rgba(15, 23, 42, 0.62);
}

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

.hero-wrap {
    width: min(1280px, calc(100% - 32px));
    margin: 28px auto 0;
}

.hero-carousel {
    position: relative;
    height: clamp(500px, 68vh, 660px);
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transform: scale(1.02);
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.46), rgba(2, 6, 23, 0.12)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent 55%);
}

.hero-content {
    position: absolute;
    left: clamp(24px, 6vw, 72px);
    bottom: clamp(30px, 7vw, 82px);
    max-width: 720px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.82rem;
}

.hero-content h1 {
    margin: 16px 0;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 660px;
    margin: 0 0 24px;
    color: #e2e8f0;
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.8;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 26px;
    color: #cbd5e1;
}

.hero-meta span,
.detail-meta span {
    padding: 7px 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.6);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: white;
    background: linear-gradient(90deg, #06b6d4, #2563eb);
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.28);
}

.ghost-button,
.section-more {
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.66);
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 44px rgba(34, 211, 238, 0.18);
}

.full-button {
    width: 100%;
}

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(2, 6, 23, 0.54);
    color: white;
    font-size: 2rem;
    line-height: 1;
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 18px;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.56);
    border: none;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.home-search,
.content-section,
.page-main {
    padding-top: 56px;
}

.home-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
    gap: 24px;
    align-items: stretch;
}

.search-spotlight,
.filter-panel,
.detail-card,
.player-card,
.side-panel,
.rank-side-card,
.page-hero,
.category-overview-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.78));
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.28);
}

.search-spotlight {
    padding: 30px;
}

.search-spotlight span {
    color: var(--cyan);
    font-weight: 800;
}

.search-spotlight h2,
.page-hero h1,
.section-heading h2,
.detail-card h1 {
    margin: 10px 0 12px;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.search-spotlight p,
.page-hero p,
.section-heading p,
.rank-side-card p,
.category-overview-card p {
    color: var(--muted);
    line-height: 1.8;
}

.filter-panel {
    padding: 22px;
}

.search-box {
    display: grid;
    gap: 9px;
}

.search-box span {
    color: #cbd5e1;
    font-weight: 700;
}

.search-box input {
    width: 100%;
    height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.72);
    outline: none;
    padding: 0 16px;
}

.search-box input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.filter-groups {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-button {
    min-height: 36px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.66);
    padding: 0 14px;
    transition: 0.2s ease;
}

.filter-button:hover,
.filter-button.is-active {
    color: white;
    border-color: rgba(34, 211, 238, 0.54);
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.32), rgba(37, 99, 235, 0.32));
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.96));
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.28);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 22px 64px rgba(2, 6, 23, 0.48);
}

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

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

.movie-card:hover .poster-link img {
    transform: scale(1.06);
    filter: brightness(0.82);
}

.poster-badge,
.poster-play {
    position: absolute;
    z-index: 2;
}

.poster-badge {
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    color: white;
    background: rgba(2, 6, 23, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.poster-play {
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: white;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    border-radius: 999px;
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.32);
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 0.82rem;
}

.card-body h3 {
    margin: 10px 0 8px;
    font-size: 1.05rem;
    line-height: 1.35;
    font-weight: 800;
}

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

.card-body p {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.65;
    min-height: 4.3em;
}

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

.tag-row span {
    color: var(--cyan);
    background: rgba(14, 116, 144, 0.18);
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.78rem;
}

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

.category-card,
.category-overview-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
    transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 18px;
    color: white;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    border-radius: 16px;
    font-weight: 900;
}

.category-card h3,
.category-overview-card h2 {
    margin: 0 0 10px;
    font-size: 1.25rem;
    font-weight: 900;
}

.category-card p,
.category-overview-card p {
    min-height: 4em;
    margin: 0;
}

.category-chips,
.category-preview-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.category-chips span,
.category-preview-links a {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.82rem;
}

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

.ranking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 48px 70px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(34, 211, 238, 0.42);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-weight: 900;
}

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

.rank-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.rank-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-copy em {
    color: var(--muted);
    font-style: normal;
    font-size: 0.88rem;
}

.rank-side-card {
    position: sticky;
    top: 96px;
    padding: 28px;
}

.rank-side-card span {
    color: var(--cyan);
    font-weight: 800;
}

.rank-side-card h2 {
    margin: 12px 0;
    font-size: 2rem;
    line-height: 1.12;
    font-weight: 900;
}

.page-main {
    padding-bottom: 64px;
}

.page-hero {
    padding: 36px;
}

.small-hero,
.category-hero {
    min-height: 220px;
    display: grid;
    align-content: center;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    color: var(--muted);
}

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

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.detail-player-column {
    display: grid;
    gap: 20px;
}

.player-card {
    overflow: hidden;
    padding: 0;
}

.video-frame {
    position: relative;
    background: #000;
    aspect-ratio: 16 / 9;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 10px;
    color: white;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.66));
    border: none;
    text-align: center;
}

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

.play-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    padding-left: 5px;
    border-radius: 999px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 18px 52px rgba(37, 99, 235, 0.38);
    font-size: 2rem;
}

.detail-card {
    padding: 26px;
}

.detail-card h1 {
    font-size: clamp(2rem, 4.5vw, 3.6rem);
}

.detail-one-line {
    color: #e2e8f0;
    font-size: 1.06rem;
    line-height: 1.85;
}

.detail-tags {
    margin-top: 20px;
}

.text-card h2,
.side-panel h2 {
    margin: 0 0 14px;
    font-size: 1.25rem;
    font-weight: 900;
}

.text-card p {
    color: #cbd5e1;
    line-height: 1.9;
    white-space: pre-line;
}

.detail-sidebar {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 18px;
}

.detail-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: var(--shadow);
}

.side-panel {
    padding: 22px;
}

.side-panel dl {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px 12px;
    margin: 0 0 20px;
}

.side-panel dt {
    color: var(--muted);
}

.side-panel dd {
    margin: 0;
    color: #e2e8f0;
}

.related-section {
    padding-top: 40px;
}

.empty-state {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 20px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.64);
    text-align: center;
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.96));
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 28px;
    padding: 42px 0;
}

.footer-grid p {
    color: var(--muted);
    line-height: 1.8;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: white;
    font-size: 1rem;
    font-weight: 900;
}

.footer-grid a,
.footer-grid span {
    display: block;
    margin: 9px 0;
    color: #94a3b8;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 34px;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    text-align: center;
}

[data-card][hidden] {
    display: none;
}

@media (max-width: 1120px) {
    .movie-grid,
    .category-page-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .detail-grid,
    .ranking-layout,
    .home-search {
        grid-template-columns: 1fr;
    }

    .detail-sidebar,
    .rank-side-card {
        position: static;
    }
}

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

    .menu-button {
        display: block;
    }

    .hero-wrap {
        width: calc(100% - 20px);
        margin-top: 14px;
    }

    .hero-carousel {
        height: 560px;
        border-radius: 22px;
    }

    .hero-content {
        left: 22px;
        right: 22px;
        bottom: 54px;
    }

    .hero-nav {
        width: 40px;
        height: 40px;
    }

    .section-heading {
        display: grid;
        align-items: start;
    }

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

@media (max-width: 560px) {
    .content-shell,
    .header-inner,
    .mobile-nav,
    .footer-grid,
    .footer-bottom {
        width: calc(100% - 22px);
    }

    .brand-text {
        font-size: 1rem;
    }

    .hero-carousel {
        height: 520px;
    }

    .hero-content h1 {
        font-size: 2.25rem;
    }

    .hero-content p {
        font-size: 0.96rem;
    }

    .movie-grid,
    .category-page-grid,
    .category-grid,
    .category-overview-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .rank-item img {
        width: 58px;
        height: 82px;
    }

    .detail-card,
    .page-hero,
    .filter-panel,
    .search-spotlight {
        padding: 20px;
    }

    .side-panel dl {
        grid-template-columns: 1fr;
    }
}
