:root {
    --page-bg: #0f172a;
    --page-bg-deep: #020617;
    --card-bg: rgba(15, 23, 42, 0.72);
    --card-bg-solid: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --brand: #22d3ee;
    --brand-strong: #06b6d4;
    --brand-blue: #3b82f6;
    --warn: #f59e0b;
    --radius: 24px;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

img {
    max-width: 100%;
}

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

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

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #001018;
    background: linear-gradient(135deg, var(--brand), var(--brand-blue));
    box-shadow: 0 16px 34px rgba(6, 182, 212, 0.28);
}

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

.nav-link,
.mobile-link {
    color: var(--soft);
    padding: 10px 14px;
    border-radius: 999px;
    transition: 0.24s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: white;
    background: rgba(34, 211, 238, 0.12);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.8);
}

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

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
}

.mobile-link {
    display: block;
}

.home-hero {
    min-height: 72vh;
    position: relative;
    overflow: hidden;
}

.hero-stage {
    position: relative;
    min-height: 72vh;
}

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

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

.hero-image {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    filter: saturate(1.1);
}

.hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.32) 100%),
        linear-gradient(0deg, #0f172a 0%, transparent 34%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 72vh;
    display: flex;
    align-items: center;
    padding: 72px 0;
}

.hero-copy {
    width: min(660px, 100%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 12px;
    border: 1px solid rgba(34, 211, 238, 0.32);
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(6, 182, 212, 0.12);
    font-size: 14px;
}

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

.hero-copy p {
    max-width: 620px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 700;
    transition: 0.24s ease;
}

.btn-primary {
    color: #001018;
    background: linear-gradient(135deg, var(--brand), var(--brand-blue));
    box-shadow: 0 18px 40px rgba(34, 211, 238, 0.24);
}

.btn-secondary {
    color: var(--text);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
}

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

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 32px;
    z-index: 4;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 36px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.34);
    transition: 0.25s ease;
}

.hero-dot.active {
    width: 58px;
    background: var(--brand);
}

.hero-search {
    position: relative;
    z-index: 6;
    margin-top: -36px;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

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

.search-input:focus {
    border-color: var(--brand);
}

.section {
    padding: 68px 0;
}

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

.section-kicker {
    margin: 0 0 8px;
    color: var(--brand);
    font-weight: 800;
}

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

.section-desc {
    color: var(--muted);
    line-height: 1.75;
    margin-top: 12px;
    max-width: 760px;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.76), rgba(15, 23, 42, 0.86));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
    transition: 0.26s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.34);
    box-shadow: 0 26px 60px rgba(6, 182, 212, 0.16);
}

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

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

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

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #001018;
    background: rgba(34, 211, 238, 0.92);
    font-size: 12px;
    font-weight: 800;
}

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

.movie-card-title {
    display: block;
    min-height: 48px;
    font-weight: 800;
    font-size: 17px;
    line-height: 1.38;
}

.movie-card-title:hover,
.rank-title:hover {
    color: var(--brand);
}

.movie-card-meta,
.rank-info p,
.detail-meta,
.breadcrumbs {
    color: var(--muted);
    font-size: 14px;
}

.movie-card-desc {
    color: var(--soft);
    line-height: 1.65;
    min-height: 74px;
}

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

.tag-row span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(6, 182, 212, 0.1);
    font-size: 12px;
}

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

.category-card {
    min-height: 178px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 60%),
        rgba(15, 23, 42, 0.78);
    transition: 0.24s ease;
}

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

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

.category-card p {
    color: var(--muted);
    line-height: 1.7;
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.rank-item {
    display: grid;
    grid-template-columns: 58px 88px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
}

.rank-number {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #001018;
    background: linear-gradient(135deg, var(--brand), var(--warn));
    font-weight: 900;
}

.rank-cover {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 16px;
    background: #111827;
}

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

.rank-title {
    display: block;
    font-weight: 800;
    margin-bottom: 6px;
}

.rank-info span {
    color: var(--soft);
    line-height: 1.6;
}

.page-hero,
.detail-hero {
    padding: 70px 0 34px;
}

.page-hero-card,
.detail-head-card {
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 32rem),
        rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.page-hero-card {
    padding: clamp(26px, 5vw, 54px);
}

.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 30px;
}

.filter-chip {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.68);
    transition: 0.2s ease;
}

.filter-chip:hover,
.filter-chip.active {
    color: #001018;
    background: var(--brand);
}

.detail-head-card {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 32px;
    padding: clamp(18px, 4vw, 34px);
    overflow: hidden;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 26px;
    background: #111827;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.34);
}

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

.detail-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.detail-summary {
    margin-top: 18px;
    color: var(--soft);
    font-size: 17px;
    line-height: 1.85;
}

.breadcrumbs {
    margin-bottom: 18px;
}

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

.player-section {
    padding: 36px 0 68px;
}

.player-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 30px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle, rgba(34, 211, 238, 0.22), transparent 28rem),
        rgba(2, 6, 23, 0.46);
    transition: 0.24s ease;
}

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

.play-button {
    width: 96px;
    height: 96px;
    border: 0;
    border-radius: 50%;
    color: #001018;
    background: linear-gradient(135deg, var(--brand), var(--brand-blue));
    box-shadow: 0 22px 48px rgba(34, 211, 238, 0.36);
    font-size: 34px;
    font-weight: 900;
    transition: 0.24s ease;
}

.play-button:hover {
    transform: scale(1.08);
}

.content-panel {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.76);
}

.content-panel h2 {
    margin: 0 0 16px;
    font-size: 28px;
}

.content-panel p {
    color: var(--soft);
    line-height: 1.95;
}

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

.related-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.76);
    transition: 0.24s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.36);
}

.related-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.related-card span {
    display: block;
    padding: 12px;
    font-weight: 700;
    line-height: 1.45;
}

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

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 32px 0;
    color: var(--muted);
}

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

.footer-inner p {
    margin: 8px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

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

.empty-state {
    display: none;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.74);
}

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

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

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

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

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

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

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

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

    .section-title-row,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

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

@media (max-width: 560px) {
    .site-shell {
        width: min(100% - 22px, 1180px);
    }

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

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

    .rank-item {
        grid-template-columns: 48px 78px 1fr;
        gap: 12px;
    }

    .content-panel {
        padding: 22px;
    }

    .play-button {
        width: 74px;
        height: 74px;
        font-size: 28px;
    }
}
