:root {
    --bg-main: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.76);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --line-soft: rgba(148, 163, 184, 0.2);
    --cyan: #22d3ee;
    --cyan-dark: #0891b2;
    --blue: #2563eb;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.48);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text-main);
    background:
        radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.2), transparent 28rem),
        radial-gradient(circle at 88% 12%, rgba(37, 99, 235, 0.28), transparent 30rem),
        linear-gradient(135deg, #020617 0%, #0f172a 45%, #061a2f 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.menu-open {
    overflow: hidden;
}

img {
    max-width: 100%;
}

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

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

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

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

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 13px;
    color: #06121f;
    background: linear-gradient(135deg, var(--cyan), #93c5fd);
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.45);
}

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

.main-nav a {
    padding: 8px 0;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--cyan);
}

.header-search {
    width: min(320px, 28vw);
    display: flex;
    align-items: center;
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    overflow: hidden;
}

.header-search input {
    width: 100%;
    min-width: 0;
    padding: 10px 14px;
    color: var(--text-main);
    background: transparent;
    outline: none;
}

.header-search button {
    height: 40px;
    padding: 0 16px;
    color: #07111f;
    font-weight: 800;
    background: var(--cyan);
    cursor: pointer;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: var(--text-main);
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--line-soft);
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 18px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
}

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

.mobile-panel form {
    margin-top: 14px;
    display: flex;
    overflow: hidden;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.24);
}

.mobile-panel input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    color: var(--text-main);
    background: rgba(2, 6, 23, 0.55);
    outline: none;
}

.mobile-panel button {
    padding: 0 16px;
    color: #07111f;
    font-weight: 800;
    background: var(--cyan);
}

body.menu-open .mobile-panel {
    display: block;
}

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

.hero {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 650px;
    margin: 34px auto 56px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 36px;
    background: rgba(15, 23, 42, 0.48);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
    align-items: center;
    gap: 40px;
    padding: 64px;
    opacity: 0;
    pointer-events: none;
    background-position: center;
    background-size: cover;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.8) 48%, rgba(2, 6, 23, 0.45) 100%),
        radial-gradient(circle at 76% 28%, rgba(34, 211, 238, 0.36), transparent 20rem);
}

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

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

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(34, 211, 238, 0.26);
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.16);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.08em;
}

.hero h1 {
    margin: 0 0 18px;
    max-width: 760px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 690px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.82;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.72);
    font-size: 13px;
}

.hero-actions,
.section-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: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 850;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
    color: #06121f;
    background: linear-gradient(135deg, var(--cyan), #93c5fd);
    box-shadow: 0 18px 44px rgba(34, 211, 238, 0.28);
}

.btn-ghost {
    color: #e0f2fe;
    border: 1px solid rgba(34, 211, 238, 0.32);
    background: rgba(15, 23, 42, 0.68);
}

.hero-poster-panel {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 32px;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

.hero-poster {
    display: block;
    aspect-ratio: 3 / 4;
    background-position: center;
    background-size: cover;
}

.hero-poster-info {
    padding: 20px;
}

.hero-poster-info strong {
    display: block;
    margin-bottom: 8px;
    font-size: 20px;
}

.hero-controls {
    position: absolute;
    left: 64px;
    right: 64px;
    bottom: 32px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

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

.hero-dot {
    width: 38px;
    height: 5px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.3);
    cursor: pointer;
    transition: background 0.2s ease, width 0.2s ease;
}

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

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

.hero-arrow {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: var(--text-main);
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
}

.section {
    padding: 28px 0 44px;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.04em;
}

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

.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.16);
    border-radius: 24px;
    background: var(--bg-card);
    box-shadow: 0 18px 48px rgba(2, 6, 23, 0.22);
    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.46);
    box-shadow: 0 28px 70px rgba(8, 145, 178, 0.18);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.24), rgba(37, 99, 235, 0.18)),
        #0f172a;
    background-position: center;
    background-size: cover;
}

.movie-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.72) 100%);
}

.movie-badge,
.movie-type {
    position: absolute;
    z-index: 2;
    top: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.movie-badge {
    left: 10px;
    color: #06121f;
    background: var(--cyan);
}

.movie-type {
    right: 10px;
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.movie-info {
    padding: 14px 14px 16px;
}

.movie-title {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 900;
}

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

.movie-line {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.12);
    font-size: 12px;
}

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

.category-card {
    min-height: 190px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background:
        radial-gradient(circle at 80% 18%, rgba(34, 211, 238, 0.2), transparent 12rem),
        rgba(15, 23, 42, 0.74);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card h3 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 950;
}

.category-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.8;
}

.toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(130px, 180px));
    gap: 12px;
    margin: 24px 0;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
}

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

.toolbar input:focus,
.toolbar select:focus {
    border-color: rgba(34, 211, 238, 0.66);
}

.empty-result {
    display: none;
    margin: 28px 0 0;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    text-align: center;
}

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

.rank-layout {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 24px;
}

.rank-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-row {
    display: grid;
    grid-template-columns: 58px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: rgba(34, 211, 238, 0.42);
}

.rank-number {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #06121f;
    background: linear-gradient(135deg, var(--cyan), #93c5fd);
    font-weight: 950;
}

.rank-title {
    font-weight: 850;
}

.rank-meta {
    color: var(--text-muted);
    font-size: 13px;
}

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

.page-hero-card {
    overflow: hidden;
    padding: 42px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 32px;
    background:
        radial-gradient(circle at 84% 22%, rgba(34, 211, 238, 0.2), transparent 18rem),
        rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

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

.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.06;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 840px;
    margin: 16px 0 0;
    color: #cbd5e1;
    line-height: 1.8;
    font-size: 17px;
}

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

.detail-poster {
    position: sticky;
    top: 96px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.detail-poster-art {
    aspect-ratio: 2 / 3;
    background-position: center;
    background-size: cover;
}

.detail-poster-body {
    padding: 18px;
}

.detail-content {
    display: grid;
    gap: 24px;
}

.panel {
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 54px rgba(2, 6, 23, 0.22);
}

.panel h2,
.panel h3 {
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 950;
}

.panel p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.9;
}

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

.meta-item {
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.34);
}

.meta-label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 12px;
}

.meta-value {
    font-weight: 850;
}

.player-panel {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.18), transparent 14rem),
        linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-panel.is-playing .play-layer {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-button {
    width: 86px;
    height: 86px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #06121f;
    background: linear-gradient(135deg, var(--cyan), #93c5fd);
    box-shadow: 0 0 44px rgba(34, 211, 238, 0.45);
    font-size: 30px;
    font-weight: 950;
    cursor: pointer;
}

.player-status {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 14px;
    z-index: 3;
    color: #dbeafe;
    font-size: 14px;
    text-align: center;
    pointer-events: none;
}

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

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    color: var(--text-muted);
}

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

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

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

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

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

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 48px;
    }

    .hero-poster-panel {
        display: none;
    }

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

    .detail-poster {
        position: static;
        max-width: 360px;
    }
}

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

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

    .hero {
        min-height: 680px;
        border-radius: 28px;
    }

    .hero-slide {
        padding: 36px 24px 92px;
    }

    .hero-controls {
        left: 24px;
        right: 24px;
        bottom: 24px;
    }

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

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

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

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

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

@media (max-width: 560px) {
    .header-inner,
    .container,
    .hero,
    .mobile-panel,
    .footer-inner {
        width: min(100% - 22px, 1180px);
    }

    .logo-text {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hero {
        margin-top: 18px;
        min-height: 720px;
    }

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

    .hero p {
        font-size: 15px;
    }

    .hero-actions,
    .section-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

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

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

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

    .rank-row {
        grid-template-columns: 46px 1fr;
    }

    .rank-row .rank-meta {
        grid-column: 2;
    }

    .page-hero-card,
    .panel {
        padding: 22px;
    }
}
