:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: rgba(15, 23, 42, 0.76);
    --line: rgba(148, 163, 184, 0.18);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --cyan-soft: rgba(34, 211, 238, 0.16);
    --green: #34d399;
    --orange: #fb923c;
    --rose: #fb7185;
    --radius-lg: 28px;
    --radius-md: 18px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 4%, rgba(34, 211, 238, 0.18), transparent 28rem),
        radial-gradient(circle at 84% 12%, rgba(99, 102, 241, 0.14), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.24);
}

.nav-wrap {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #06121b;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), #67e8f9 48%, #a78bfa);
    box-shadow: 0 0 34px rgba(34, 211, 238, 0.28);
    transition: transform 0.6s ease;
}

.brand:hover .brand-mark {
    transform: rotate(180deg);
}

.brand-text {
    display: grid;
    line-height: 1.2;
}

.brand-text strong {
    font-size: 1.34rem;
    letter-spacing: 0.03em;
}

.brand-text small {
    color: rgba(103, 232, 249, 0.74);
    font-size: 0.78rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link {
    color: #cbd5e1;
    padding: 10px 12px;
    border-radius: 999px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #f8fafc;
    background: rgba(34, 211, 238, 0.13);
}

.nav-pill {
    border: 1px solid rgba(34, 211, 238, 0.24);
    color: var(--cyan);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.9);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
    border-radius: 2px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 680px;
    isolation: isolate;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.64) 48%, rgba(2, 6, 23, 0.82)),
        radial-gradient(circle at 72% 34%, rgba(34, 211, 238, 0.22), transparent 20rem);
    z-index: 1;
}

.hero-track {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-slide.is-active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.04);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    align-items: center;
    gap: 44px;
    padding: 92px 0 72px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1,
.page-title h1,
.detail-title h1 {
    margin: 14px 0 18px;
    font-size: clamp(2.5rem, 7vw, 5.8rem);
    line-height: 0.96;
    letter-spacing: -0.06em;
    color: #fff;
}

.hero p {
    max-width: 690px;
    margin: 0 0 24px;
    color: #cbd5e1;
    font-size: clamp(1rem, 2vw, 1.18rem);
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 28px 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.72);
    font-weight: 900;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.btn:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 211, 238, 0.44);
    box-shadow: 0 18px 40px rgba(34, 211, 238, 0.14);
}

.btn-primary {
    color: #06121b;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
    border-color: rgba(103, 232, 249, 0.4);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.hero-meta span,
.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(30, 41, 59, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.18);
    font-size: 0.78rem;
    font-weight: 800;
}

.hero-panel {
    border-radius: var(--radius-lg);
    padding: 22px;
    background: rgba(15, 23, 42, 0.66);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.hero-panel h2 {
    margin: 0 0 14px;
    font-size: 1.2rem;
}

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

.hero-list a {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.34);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.hero-list img {
    width: 58px;
    height: 72px;
    object-fit: cover;
    border-radius: 14px;
}

.hero-list strong {
    display: block;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-list small {
    color: var(--muted);
}

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

.hero-dots button {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.34);
    cursor: pointer;
}

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

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

.content-section {
    padding: 58px 0;
}

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

.section-head h2 {
    margin: 8px 0 4px;
    color: #fff;
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    letter-spacing: -0.04em;
}

.section-head p,
.page-title p {
    margin: 0;
    color: var(--muted);
}

.section-more {
    color: var(--cyan);
    font-weight: 900;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 26px 56px rgba(0, 0, 0, 0.28);
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.7));
}

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

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

.card-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #06121b;
    background: var(--cyan);
    font-size: 0.78rem;
    font-weight: 900;
}

.card-body {
    padding: 15px;
}

.card-title {
    display: block;
    min-height: 3em;
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.5;
}

.card-body p {
    min-height: 4.8em;
    margin: 8px 0 12px;
    color: var(--muted);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    color: #93c5fd;
    font-size: 0.84rem;
    font-weight: 800;
}

.category-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    padding: 24px;
    margin-top: -42px;
    position: relative;
    z-index: 4;
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.category-link,
.category-tile {
    display: block;
    min-height: 118px;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(99, 102, 241, 0.11));
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.category-link strong,
.category-tile strong {
    display: block;
    color: #fff;
    font-size: 1.08rem;
    margin-bottom: 8px;
}

.category-link span,
.category-tile span {
    color: var(--muted);
    font-size: 0.9rem;
}

.page-title {
    padding: 64px 0 28px;
}

.page-title h1 {
    margin: 10px 0 12px;
    font-size: clamp(2.3rem, 5vw, 4.8rem);
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 14px;
    padding: 18px;
    margin-bottom: 26px;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

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

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(34, 211, 238, 0.72);
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 76px 110px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.rank-no {
    color: var(--cyan);
    font-size: 1.8rem;
    font-weight: 950;
    text-align: center;
}

.rank-item img {
    width: 110px;
    height: 80px;
    border-radius: 16px;
    object-fit: cover;
}

.rank-item h2,
.rank-item h3 {
    margin: 0 0 6px;
    color: #fff;
}

.rank-item p {
    margin: 0;
    color: var(--muted);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.detail-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.detail-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(22px) saturate(1.1);
    transform: scale(1.12);
    opacity: 0.4;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.76));
    z-index: 1;
}

.detail-title {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 34px;
    padding: 58px 0;
    align-items: center;
}

.detail-poster {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 3 / 4;
    background: rgba(15, 23, 42, 0.86);
}

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

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #93c5fd;
    font-weight: 800;
    font-size: 0.9rem;
}

.detail-summary {
    margin: 0 0 22px;
    color: #cbd5e1;
    font-size: 1.06rem;
}

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

.detail-meta div {
    padding: 14px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.detail-meta span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
}

.detail-meta strong {
    color: #fff;
}

.player-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    margin: 46px 0 28px;
    background: #000;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: var(--shadow);
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(2, 6, 23, 0.4);
    cursor: pointer;
    z-index: 2;
}

.player-cover.is-hidden {
    display: none;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.52;
}

.player-button {
    position: relative;
    z-index: 3;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: #06121b;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
    font-size: 2.2rem;
    cursor: pointer;
    box-shadow: 0 0 46px rgba(34, 211, 238, 0.42);
}

.player-message {
    display: none;
    padding: 14px 18px;
    color: #fecaca;
    background: rgba(127, 29, 29, 0.28);
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 28px;
}

.article-panel,
.side-panel {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.article-panel h2,
.side-panel h2 {
    margin: 0 0 14px;
    color: #fff;
}

.article-panel p {
    margin: 0 0 18px;
    color: #cbd5e1;
}

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

.side-list a {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.34);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.side-list img {
    width: 58px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
}

.side-list strong {
    display: block;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-list small {
    color: var(--muted);
}

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

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: grid;
    gap: 18px;
}

.footer-inner p {
    margin: 6px 0 0;
    color: var(--muted);
}

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

.footer-links a {
    color: #93c5fd;
    font-weight: 800;
}

.copyright {
    font-size: 0.88rem;
}

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

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

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

    .hero-panel {
        max-width: 680px;
    }
}

@media (max-width: 820px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 74px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: 22px;
        background: rgba(15, 23, 42, 0.98);
        border: 1px solid rgba(148, 163, 184, 0.18);
    }

    .nav-links.is-open {
        display: flex;
    }

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

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

    .filter-panel,
    .detail-title,
    .detail-meta {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 48px 86px 1fr;
    }

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

@media (max-width: 540px) {
    .brand-text small {
        display: none;
    }

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

    .hero h1,
    .page-title h1,
    .detail-title h1 {
        font-size: 2.4rem;
    }

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

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

    .detail-title {
        padding-top: 36px;
    }

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