:root {
    --page-bg: #07101f;
    --panel-bg: rgba(15, 23, 42, 0.82);
    --panel-strong: #0f172a;
    --line: rgba(148, 163, 184, 0.22);
    --text: #e5eefb;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --brand: #38bdf8;
    --brand-2: #2563eb;
    --brand-3: #f59e0b;
    --danger: #ef4444;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.34), transparent 34rem),
        radial-gradient(circle at 80% 8rem, rgba(14, 165, 233, 0.28), transparent 28rem),
        linear-gradient(180deg, #06111f 0%, #0f172a 45%, #050b14 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.93), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 44px rgba(2, 8, 23, 0.35);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1200px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    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: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #0ea5e9, #2563eb 54%, #7c3aed);
    box-shadow: 0 12px 30px rgba(14, 165, 233, 0.35);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #dbeafe;
    font-weight: 700;
}

.main-nav a {
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.18s ease, border-color 0.18s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #fff;
    border-color: var(--brand);
}

.header-search {
    width: min(320px, 31vw);
    position: relative;
}

.header-search input {
    width: 100%;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    padding: 0 52px 0 18px;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.header-search input:focus {
    border-color: rgba(56, 189, 248, 0.9);
    background: rgba(255, 255, 255, 0.16);
}

.header-search button {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.mobile-toggle {
    display: none;
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 12px;
}

.mobile-panel {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-panel a {
    display: inline-block;
    margin: 6px 12px 6px 0;
    color: #dbeafe;
    font-weight: 700;
}

.header-search-mobile {
    margin-bottom: 12px;
}

.header-search-mobile input {
    width: 100%;
    min-height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    padding: 0 16px;
}

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

.hero {
    position: relative;
    overflow: hidden;
    min-height: 640px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-stage {
    position: relative;
    min-height: 640px;
}

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

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    transform: scale(1.04);
    filter: saturate(1.15);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(3, 7, 18, 0.94) 0%, rgba(15, 23, 42, 0.78) 43%, rgba(15, 23, 42, 0.32) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.22), #07101f 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 32px));
    min-height: 640px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.74fr);
    align-items: center;
    gap: 48px;
    padding: 72px 0 86px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #bae6fd;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.055em;
    color: #fff;
    text-shadow: 0 18px 60px rgba(0, 0, 0, 0.4);
}

.hero-summary {
    max-width: 720px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.85;
    margin: 0 0 24px;
}

.hero-meta,
.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #bfdbfe;
    margin-bottom: 24px;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border: 1px solid rgba(147, 197, 253, 0.34);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.48);
}

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

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

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

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.32);
}

.btn-secondary {
    color: #dbeafe;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.09);
}

.btn-ghost {
    color: #bae6fd;
    border-color: rgba(56, 189, 248, 0.22);
    background: rgba(14, 165, 233, 0.1);
}

.hero-poster-wrap {
    position: relative;
    justify-self: end;
    width: min(390px, 100%);
}

.hero-poster-wrap::before,
.hero-poster-wrap::after {
    content: "";
    position: absolute;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.34), rgba(124, 58, 237, 0.2));
    filter: blur(8px);
}

.hero-poster-wrap::before {
    inset: 26px -24px -20px 48px;
}

.hero-poster-wrap::after {
    inset: -18px 44px 52px -16px;
}

.hero-poster {
    position: relative;
    z-index: 2;
    width: 100%;
    aspect-ratio: 3 / 4.25;
    object-fit: cover;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow);
    background: #0f172a;
}

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

.hero-dot {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

.hero-dot.is-active {
    background: #38bdf8;
}

.section {
    padding: 58px 0;
}

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

.section-title {
    margin: 0;
    color: #fff;
    font-size: clamp(26px, 3.4vw, 42px);
    font-weight: 950;
    letter-spacing: -0.04em;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.92));
    box-shadow: 0 12px 38px rgba(2, 8, 23, 0.22);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.58);
    box-shadow: 0 22px 52px rgba(2, 132, 199, 0.22);
}

.card-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: #0f172a;
}

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

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

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 850;
    background: rgba(37, 99, 235, 0.86);
    backdrop-filter: blur(10px);
}

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

.card-title {
    margin: 0 0 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: #93c5fd;
    font-size: 12px;
    margin-bottom: 8px;
}

.card-line {
    margin: 0;
    min-height: 42px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 178px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background:
        radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.26), transparent 9rem),
        linear-gradient(135deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.94));
    box-shadow: 0 16px 48px rgba(2, 8, 23, 0.2);
}

.category-card:hover {
    border-color: rgba(56, 189, 248, 0.58);
}

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

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

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

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

.rank-num {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #fff;
    font-weight: 950;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.rank-thumb {
    width: 84px;
    height: 112px;
    object-fit: cover;
    border-radius: 14px;
    background: #111827;
}

.rank-item h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
}

.rank-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.breadcrumb {
    padding: 26px 0 0;
    color: #93c5fd;
    font-weight: 750;
}

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

.player-panel,
.detail-panel,
.search-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
}

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

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

.player-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.72)),
        center / cover no-repeat var(--poster);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    cursor: pointer;
    font-size: 32px;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    box-shadow: 0 18px 48px rgba(37, 99, 235, 0.42);
}

.player-meta {
    padding: 20px 22px 24px;
}

.detail-title {
    margin: 0 0 14px;
    color: #fff;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.045em;
}

.detail-cover {
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 18px 56px rgba(2, 8, 23, 0.32);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-panel {
    padding: 28px;
    margin-top: 24px;
}

.detail-panel h2,
.search-panel h1,
.search-panel h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 26px;
    font-weight: 950;
}

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

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.tag {
    padding: 6px 11px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.08);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 12px;
    margin-bottom: 24px;
}

.filter-bar input,
.filter-bar select,
.search-panel input {
    width: 100%;
    min-height: 48px;
    border-radius: 16px;
    border: 1px solid var(--line);
    color: #fff;
    background: rgba(15, 23, 42, 0.82);
    padding: 0 14px;
    outline: none;
}

.search-panel {
    padding: 26px;
    margin: 34px 0;
}

.site-footer {
    margin-top: 70px;
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
    background: rgba(2, 6, 23, 0.66);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 28px;
}

.footer-grid h3 {
    color: #fff;
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 900;
}

.footer-grid p,
.footer-grid a {
    color: var(--muted);
    line-height: 1.85;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.empty-state {
    padding: 32px;
    color: #cbd5e1;
    border: 1px dashed rgba(148, 163, 184, 0.34);
    border-radius: 18px;
    text-align: center;
}

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

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

@media (max-width: 860px) {
    .main-nav,
    .header-search {
        display: none;
    }

    .mobile-toggle {
        display: inline-block;
    }

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

    .hero,
    .hero-stage,
    .hero-content {
        min-height: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding: 54px 0 72px;
    }

    .hero-poster-wrap {
        justify-self: start;
        width: min(300px, 72vw);
    }

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

    .rank-list {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .header-inner {
        min-height: 64px;
        width: min(100% - 24px, 1200px);
    }

    .container,
    .hero-content,
    .mobile-panel {
        width: min(100% - 24px, 1200px);
    }

    .logo {
        font-size: 18px;
    }

    .logo-mark {
        width: 36px;
        height: 36px;
    }

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

    .section {
        padding: 40px 0;
    }

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

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

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

    .rank-thumb {
        width: 68px;
        height: 92px;
    }

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