*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: #111827;
    --panel-2: #1e293b;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #cbd5e1;
    --cyan: #06b6d4;
    --cyan-soft: rgba(6, 182, 212, 0.18);
    --blue: #2563eb;
    --gold: #facc15;
    --red: #fb7185;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
    --radius: 20px;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(6, 182, 212, 0.18), transparent 34rem),
        radial-gradient(circle at 90% 10%, rgba(37, 99, 235, 0.18), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

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

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 14px 36px rgba(6, 182, 212, 0.28);
}

.brand-text {
    font-size: 20px;
}

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

.nav-link,
.mobile-link {
    color: var(--muted-2);
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
    color: #fff;
    background: var(--cyan-soft);
}

.nav-link:hover {
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.86);
    color: #fff;
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: #fff;
}

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

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

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
    background-size: cover;
    background-position: center;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(2, 6, 23, 0.68) 48%, rgba(2, 6, 23, 0.24)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 40%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 72vh;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 96px 0 72px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 9px 14px;
    border: 1px solid rgba(6, 182, 212, 0.32);
    border-radius: 999px;
    color: #67e8f9;
    background: rgba(6, 182, 212, 0.12);
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 8vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 24px;
    color: var(--muted-2);
    font-size: clamp(16px, 2.4vw, 20px);
    line-height: 1.75;
}

.hero-facts,
.detail-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 32px;
}

.hero-facts span,
.detail-facts span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: var(--muted-2);
    background: rgba(15, 23, 42, 0.58);
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    border: 0;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 40px rgba(6, 182, 212, 0.24);
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 52px rgba(6, 182, 212, 0.34);
}

.btn.secondary {
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: var(--text);
    background: rgba(15, 23, 42, 0.76);
    box-shadow: none;
}

.hero-controls {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 28px;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.hero-dot {
    width: 38px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.26);
    cursor: pointer;
}

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

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

.hero-arrow {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: white;
    background: rgba(15, 23, 42, 0.62);
    cursor: pointer;
}

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

.section {
    margin-top: 58px;
}

.section:first-child {
    margin-top: 0;
}

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.035em;
}

.section-head p,
.page-hero p,
.detail-title p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.section-more {
    flex: none;
    color: #67e8f9;
    font-weight: 700;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(6, 182, 212, 0.46);
    box-shadow: 0 22px 56px rgba(0, 0, 0, 0.28);
}

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

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

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

.play-dot {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #001018;
    background: var(--cyan);
    font-size: 14px;
    font-weight: 900;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-dot {
    opacity: 1;
    transform: translateY(0);
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    min-width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #0f172a;
    background: linear-gradient(135deg, var(--gold), #fb923c);
    font-weight: 900;
}

.card-body {
    padding: 14px;
}

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

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

.card-body h3 a:hover {
    color: #67e8f9;
}

.card-body p {
    margin: 0 0 12px;
    min-height: 60px;
    color: var(--muted-2);
    font-size: 13px;
    line-height: 1.55;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.card-tags span,
.card-tags a,
.tag-list span {
    padding: 5px 8px;
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(6, 182, 212, 0.12);
    font-size: 12px;
}

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

.category-card {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at top right, rgba(6, 182, 212, 0.26), transparent 18rem),
        linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.98));
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(6, 182, 212, 0.5);
}

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

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

.search-panel {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 12px;
    margin: 22px 0 28px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.68);
}

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

.search-input:focus,
.filter-select:focus {
    border-color: rgba(6, 182, 212, 0.72);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.14);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: -10px 0 28px;
}

.filter-chip {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: var(--muted-2);
    background: rgba(15, 23, 42, 0.74);
    padding: 8px 12px;
    cursor: pointer;
}

.filter-chip.is-active {
    color: #fff;
    border-color: rgba(6, 182, 212, 0.56);
    background: var(--cyan-soft);
}

.page-hero {
    margin-bottom: 30px;
    padding: 42px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(6, 182, 212, 0.22), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.72));
    box-shadow: var(--shadow);
}

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

.breadcrumb a {
    color: #67e8f9;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 96px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.74);
}

.rank-num {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #0f172a;
    background: linear-gradient(135deg, var(--gold), #fb923c);
    font-weight: 900;
}

.rank-cover {
    width: 96px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
}

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

.rank-info h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

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

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

.player-card,
.detail-panel,
.side-panel {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

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

.player-veil {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background:
        linear-gradient(0deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.28)),
        radial-gradient(circle, rgba(6, 182, 212, 0.18), transparent 24rem);
    transition: opacity 0.2s ease;
}

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

.big-play {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #001018;
    background: var(--cyan);
    font-size: 26px;
    font-weight: 900;
    box-shadow: 0 22px 60px rgba(6, 182, 212, 0.34);
    cursor: pointer;
}

.player-caption,
.detail-content {
    padding: 24px;
}

.detail-title {
    margin-bottom: 22px;
}

.detail-content h2,
.side-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-content p {
    color: var(--muted-2);
    line-height: 1.88;
}

.detail-cover {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
}

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

.side-panel {
    position: sticky;
    top: 96px;
}

.side-panel-body {
    padding: 18px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.related-item {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.58);
    transition: background 0.2s ease;
}

.related-item:hover {
    background: rgba(6, 182, 212, 0.13);
}

.related-item img {
    width: 64px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
}

.related-item h3 {
    margin: 0 0 6px;
    font-size: 15px;
}

.related-item span {
    color: var(--muted);
    font-size: 12px;
}

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.8);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 28px;
    padding: 34px 0;
}

.footer-brand {
    margin-bottom: 14px;
}

.site-footer p {
    max-width: 520px;
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 26px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: var(--muted);
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 14px;
}

.card-hidden {
    display: none !important;
}

.empty-state {
    display: none;
    margin: 28px 0;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    color: var(--muted-2);
    background: rgba(15, 23, 42, 0.68);
    text-align: center;
}

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

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

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

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

    .side-panel {
        position: static;
    }
}

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

    .menu-button {
        display: block;
    }

    .brand-text {
        font-size: 18px;
    }

    .hero,
    .hero-track,
    .hero-content {
        min-height: 78vh;
    }

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

    .hero-controls {
        bottom: 18px;
    }

    .hero-arrows {
        display: none;
    }

    .main {
        padding-top: 32px;
    }

    .section {
        margin-top: 42px;
    }

    .section-head {
        display: block;
    }

    .section-more {
        display: inline-block;
        margin-top: 10px;
    }

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

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

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

    .page-hero {
        padding: 28px;
    }

    .rank-item {
        grid-template-columns: 44px 78px 1fr;
    }

    .rank-item .btn {
        grid-column: 2 / -1;
    }

    .rank-num {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .rank-cover {
        width: 78px;
    }

    .footer-grid,
    .footer-bottom {
        display: block;
    }

    .footer-links {
        margin-top: 18px;
    }

    .footer-bottom span {
        display: block;
        margin-top: 8px;
    }
}
