:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-solid: #0f172a;
    --line: rgba(148, 163, 184, 0.18);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --blue: #2563eb;
    --yellow: #facc15;
    --radius: 18px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 32rem),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 30rem),
        var(--bg);
}

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;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(18px);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
    box-shadow: 0 14px 34px rgba(34, 211, 238, 0.25);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #cbd5e1;
    font-size: 15px;
}

.nav-links a {
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus {
    color: var(--cyan);
}

.header-search {
    width: 260px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
}

.header-search input {
    width: 100%;
    height: 42px;
    border: 0;
    outline: 0;
    color: #fff;
    background: transparent;
}

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

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

.mobile-panel.is-open {
    display: block;
}

.mobile-panel a {
    display: block;
    padding: 12px 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
}

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

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    border-radius: 0 0 34px 34px;
    background: #020617;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 36px;
    align-items: center;
    padding: 96px max(32px, calc((100vw - 1180px) / 2)) 76px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    filter: saturate(1.15);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.97), rgba(2, 6, 23, 0.74) 46%, rgba(2, 6, 23, 0.3)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.94), transparent 38%);
}

.hero-copy,
.hero-poster-panel {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 13px;
    border: 1px solid rgba(34, 211, 238, 0.32);
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(8, 145, 178, 0.12);
    font-size: 14px;
    font-weight: 700;
}

.hero-title {
    max-width: 760px;
    margin: 0;
    color: #fff;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.02;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero-text {
    max-width: 680px;
    margin: 22px 0 0;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.85;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

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

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

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

.btn-ghost {
    color: #e2e8f0;
    border-color: var(--line);
    background: rgba(15, 23, 42, 0.62);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.tag,
.meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.14);
    font-size: 13px;
}

.hero-poster-panel {
    justify-self: end;
    width: min(390px, 100%);
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.56);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.46);
    backdrop-filter: blur(18px);
}

.hero-poster-panel img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 22px;
}

.hero-mini-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    color: #cbd5e1;
    font-size: 14px;
}

.hero-dots {
    position: absolute;
    z-index: 5;
    left: max(32px, calc((100vw - 1180px) / 2));
    bottom: 34px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 42px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.32);
}

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

.section {
    padding: 56px 0 0;
}

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

.section-title {
    margin: 0;
    color: #fff;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.2;
    font-weight: 900;
}

.section-desc {
    max-width: 680px;
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.more-link {
    flex: 0 0 auto;
    color: var(--cyan);
    font-weight: 800;
}

.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: rgba(15, 23, 42, 0.78);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    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.44);
    box-shadow: 0 24px 70px rgba(8, 145, 178, 0.18);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.55s ease;
}

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 56%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent);
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #031018;
    background: rgba(34, 211, 238, 0.92);
    transform: translate(-50%, -50%) scale(0.88);
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-badge {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.rating-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 3;
    padding: 5px 9px;
    border-radius: 999px;
    color: #111827;
    background: var(--yellow);
    font-size: 13px;
    font-weight: 900;
}

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

.movie-title {
    display: block;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
}

.movie-title:hover {
    color: var(--cyan);
}

.movie-summary {
    margin: 9px 0 0;
    min-height: 48px;
    color: #aebbd0;
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    color: #8fa3bd;
    font-size: 13px;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.13), transparent),
        rgba(15, 23, 42, 0.78);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
    margin: 0;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 62px 86px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.76);
}

.rank-no {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #031018;
    background: linear-gradient(135deg, var(--yellow), #fb923c);
    font-weight: 950;
}

.rank-thumb {
    width: 86px;
    height: 112px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-title {
    color: #fff;
    font-size: 18px;
    font-weight: 900;
}

.rank-title:hover {
    color: var(--cyan);
}

.rank-copy p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.page-hero {
    padding: 78px 0 30px;
}

.page-kicker {
    color: var(--cyan);
    font-weight: 900;
    letter-spacing: 0.12em;
}

.page-title {
    max-width: 880px;
    margin: 12px 0 0;
    color: #fff;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.page-desc {
    max-width: 760px;
    margin: 18px 0 0;
    color: #cbd5e1;
    font-size: 17px;
    line-height: 1.9;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #8fa3bd;
    font-size: 14px;
}

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

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

.player-card,
.detail-side,
.content-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.player-card {
    overflow: hidden;
}

.video-shell {
    position: relative;
    background: #000;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    cursor: pointer;
    background: #020617;
}

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

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.46;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.18), rgba(2, 6, 23, 0.72));
}

.player-button {
    position: absolute;
    z-index: 3;
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: #031018;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
    box-shadow: 0 18px 42px rgba(34, 211, 238, 0.34);
}

.player-info {
    padding: 20px;
}

.player-info h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.2;
    font-weight: 950;
}

.info-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.content-card {
    margin-top: 24px;
    padding: 24px;
}

.content-card h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 24px;
    font-weight: 900;
}

.content-card p {
    margin: 0 0 16px;
    color: #cbd5e1;
    line-height: 2;
}

.detail-side {
    padding: 18px;
}

.detail-side img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 18px;
}

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

.side-list a {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.62);
}

.side-list a:hover {
    background: rgba(8, 145, 178, 0.18);
}

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

.side-list strong {
    display: block;
    color: #fff;
    line-height: 1.4;
}

.side-list span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.78);
}

.search-panel input {
    min-height: 50px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: 0;
    color: #fff;
    background: rgba(2, 6, 23, 0.72);
}

.search-panel button {
    min-height: 50px;
    padding: 0 22px;
    border: 0;
    border-radius: 14px;
    color: #031018;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
    font-weight: 900;
}

.site-footer {
    margin-top: 76px;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.82);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1.2fr repeat(3, 0.8fr);
    gap: 28px;
    color: #94a3b8;
}

.footer-inner h3 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
}

.footer-inner p,
.footer-inner li {
    margin: 0 0 10px;
    line-height: 1.8;
}

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

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

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

@media (max-width: 1024px) {
    .header-search {
        display: none;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        min-height: 680px;
    }

    .hero-poster-panel {
        justify-self: start;
        width: min(280px, 100%);
    }

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

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

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

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

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

    .hero-carousel {
        min-height: 760px;
        border-radius: 0 0 24px 24px;
    }

    .hero-slide {
        padding: 78px 20px 76px;
    }

    .hero-dots {
        left: 20px;
    }

    .section-head {
        display: block;
    }

    .more-link {
        display: inline-block;
        margin-top: 12px;
    }

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

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

    .rank-action {
        display: none;
    }

    .rank-thumb {
        width: 72px;
        height: 96px;
    }

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

    .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .header-inner,
    .main-shell,
    .footer-inner,
    .footer-bottom,
    .mobile-panel {
        width: min(100% - 22px, 1180px);
    }

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

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