:root {
    --cyan: #06b6d4;
    --blue: #2563eb;
    --blue-dark: #0f172a;
    --purple: #7c3aed;
    --orange: #f97316;
    --text: #152033;
    --muted: #657083;
    --line: rgba(15, 23, 42, 0.1);
    --soft: #f5fbff;
    --card: rgba(255, 255, 255, 0.92);
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(6, 182, 212, 0.18), transparent 32rem),
        radial-gradient(circle at top right, rgba(124, 58, 237, 0.14), transparent 30rem),
        linear-gradient(180deg, #eefbff 0%, #f8fbff 36%, #ffffff 100%);
}

body.locked {
    overflow: hidden;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.22);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 20px;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    color: var(--blue);
    background: #fff;
    box-shadow: inset 0 -8px 16px rgba(6, 182, 212, 0.16);
}

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

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 15px;
    white-space: nowrap;
}

.main-nav a,
.mobile-panel a {
    opacity: 0.94;
    transition: color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #cffafe;
    opacity: 1;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    font-size: 22px;
}

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mobile-panel.open {
    display: grid;
}

.mobile-panel a {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
}

.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    min-height: 620px;
    background: linear-gradient(125deg, #0f172a 0%, #164e63 38%, #2563eb 72%, #7c3aed 100%);
}

.hero-track {
    position: relative;
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.72) 44%, rgba(15, 23, 42, 0.18) 100%),
        var(--bg-image),
        radial-gradient(circle at 76% 24%, rgba(6, 182, 212, 0.38), transparent 28rem);
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 44%;
    background: linear-gradient(180deg, transparent, #f8fbff);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.62fr);
    align-items: center;
    gap: 48px;
    min-height: 620px;
    padding: 76px 0 92px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    font-size: 14px;
    color: #cffafe;
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.85;
}

.hero-actions,
.action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: var(--blue);
    background: #fff;
    box-shadow: 0 16px 34px rgba(6, 182, 212, 0.24);
}

.btn-ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.btn-dark {
    color: #fff;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.2);
}

.hero-poster {
    position: relative;
    width: min(360px, 100%);
    justify-self: end;
    aspect-ratio: 2 / 3;
    border-radius: 30px;
    overflow: hidden;
    background: linear-gradient(140deg, rgba(6, 182, 212, 0.92), rgba(124, 58, 237, 0.88));
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.36);
}

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

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(15, 23, 42, 0.74));
}

.hero-poster-title {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    z-index: 2;
    font-size: 20px;
    font-weight: 900;
}

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

.hero-dot {
    width: 36px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
}

.hero-dot.active {
    background: #fff;
}

.section {
    padding: 72px 0;
}

.section.tight {
    padding-top: 42px;
}

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

.section-eyebrow {
    margin-bottom: 8px;
    color: var(--blue);
    font-weight: 900;
}

.section h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.16;
    letter-spacing: -0.03em;
}

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

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

.grid {
    display: grid;
    gap: 22px;
}

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

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

.movie-card,
.category-card,
.filter-card,
.detail-panel,
.player-panel,
.rank-list {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

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

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.34), transparent 11rem),
        linear-gradient(140deg, rgba(6, 182, 212, 0.9), rgba(37, 99, 235, 0.92), rgba(124, 58, 237, 0.82));
}

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

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

.poster-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 38%, rgba(15, 23, 42, 0.72));
}

.play-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(6, 182, 212, 0.86);
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(6, 182, 212, 0.36);
}

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

.movie-card-meta {
    margin-bottom: 7px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
}

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

.movie-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag-row span,
.breadcrumb a,
.breadcrumb span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    color: #0f4a63;
    background: rgba(6, 182, 212, 0.1);
    font-size: 12px;
    font-weight: 700;
}

.category-card {
    display: flex;
    flex-direction: column;
    min-height: 190px;
    padding: 22px;
    overflow: hidden;
    position: relative;
}

.category-card::before {
    content: "";
    position: absolute;
    right: -36px;
    top: -36px;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.16), rgba(124, 58, 237, 0.16));
}

.category-card strong {
    font-size: 22px;
    margin-bottom: 10px;
}

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

.category-card span {
    margin-top: 18px;
    color: var(--blue);
    font-weight: 900;
}

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

.rank-list {
    padding: 14px;
}

.rank-item {
    display: grid;
    grid-template-columns: 48px 66px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: rgba(6, 182, 212, 0.08);
    transform: translateX(4px);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--purple));
    font-weight: 900;
}

.rank-cover {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(140deg, rgba(6, 182, 212, 0.85), rgba(37, 99, 235, 0.9));
}

.rank-text strong,
.rank-text em {
    display: block;
}

.rank-text em {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    line-height: 1.45;
}

.filter-card {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, minmax(120px, 0.5fr));
    gap: 14px;
    padding: 18px;
    margin-bottom: 26px;
}

.filter-card input,
.filter-card select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    color: var(--text);
    background: #fff;
    outline: none;
}

.filter-card input:focus,
.filter-card select:focus {
    border-color: rgba(6, 182, 212, 0.7);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.empty-state {
    display: none;
    padding: 36px;
    border-radius: 22px;
    text-align: center;
    color: var(--muted);
    background: rgba(6, 182, 212, 0.08);
}

.detail-hero {
    padding: 52px 0 36px;
    color: #fff;
    background:
        linear-gradient(110deg, rgba(15, 23, 42, 0.98), rgba(22, 78, 99, 0.9), rgba(37, 99, 235, 0.72)),
        var(--detail-bg),
        linear-gradient(135deg, #0f172a, #2563eb);
    background-size: cover;
    background-position: center;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
}

.detail-cover {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(140deg, rgba(6, 182, 212, 0.92), rgba(124, 58, 237, 0.88));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
}

.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.detail-info p {
    max-width: 800px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.85;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #cffafe;
    font-weight: 800;
}

.player-panel {
    overflow: hidden;
    padding: 0;
    background: #07111f;
}

.video-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background:
        radial-gradient(circle at 32% 20%, rgba(6, 182, 212, 0.28), transparent 20rem),
        linear-gradient(135deg, #020617, #111827);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.62));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 20px 48px rgba(6, 182, 212, 0.36);
    font-size: 34px;
    transform: translateX(2px);
}

.player-caption {
    padding: 18px 22px;
    color: #dbeafe;
    background: #07111f;
}

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

.detail-panel {
    padding: 26px;
}

.detail-panel h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.detail-panel p {
    color: var(--muted);
    line-height: 1.9;
    margin: 0 0 18px;
}

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

.side-link {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
}

.side-link span:first-child {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 10px;
    background: linear-gradient(140deg, rgba(6, 182, 212, 0.85), rgba(37, 99, 235, 0.9));
}

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

.side-link strong,
.side-link em {
    display: block;
}

.side-link em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    line-height: 1.5;
}

.image-hidden {
    opacity: 0;
}

@media (max-width: 1100px) {
    .main-nav a:nth-last-child(-n+4) {
        display: none;
    }

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

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

    .menu-button {
        display: inline-grid;
        place-items: center;
    }

    .hero,
    .hero-track {
        min-height: auto;
    }

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

    .hero-content {
        min-height: auto;
        padding: 58px 0 86px;
    }

    .hero-poster {
        justify-self: start;
        width: min(260px, 78vw);
    }

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

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

    .detail-cover {
        width: min(280px, 78vw);
    }
}

@media (max-width: 620px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .hero h1 {
        font-size: 38px;
    }

    .section {
        padding: 48px 0;
    }

    .section-head {
        display: block;
    }

    .section-head .btn {
        margin-top: 14px;
    }

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

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

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

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