:root {
    color-scheme: light;
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --dark: #0f172a;
    --dark-soft: #1e293b;
    --blue: #2563eb;
    --blue-soft: #dbeafe;
    --purple: #9333ea;
    --radius: 1rem;
    --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: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--ink);
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.nav-wrap {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: linear-gradient(135deg, #60a5fa, #a855f7);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.32);
}

.logo-text {
    background: linear-gradient(90deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    color: #cbd5e1;
    font-weight: 600;
}

.nav-links a:hover {
    color: #ffffff;
}

.nav-search {
    position: relative;
    width: 270px;
}

.nav-search input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: #334155;
    border-radius: 999px;
    padding: 11px 46px 11px 18px;
}

.nav-search input::placeholder {
    color: #94a3b8;
}

.nav-search button {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    border: 0;
    border-radius: 999px;
    padding: 0 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    cursor: pointer;
}

.menu-button {
    display: none;
    border: 0;
    color: #ffffff;
    background: #334155;
    border-radius: 12px;
    padding: 9px 12px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 0 0 18px;
}

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

.mobile-panel a {
    display: block;
    color: #cbd5e1;
    padding: 12px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.mobile-panel a:hover {
    color: #ffffff;
    background: #334155;
}

.page-main {
    min-height: calc(100vh - 72px);
}

.home-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 20%, rgba(37, 99, 235, 0.55), transparent 34%),
        radial-gradient(circle at 82% 30%, rgba(168, 85, 247, 0.42), transparent 28%),
        linear-gradient(135deg, #020617, #0f172a 55%, #111827);
    color: #ffffff;
}

.home-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 140px;
    background: linear-gradient(to bottom, transparent, var(--bg));
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 48px;
    align-items: center;
    padding: 72px 0 96px;
}

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

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(191, 219, 254, 0.28);
    color: #bfdbfe;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 14px;
    font-weight: 700;
}

.hero-copy h1 {
    margin: 22px 0 18px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.065em;
}

.hero-copy p {
    margin: 0;
    max-width: 630px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.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;
    border-radius: 999px;
    padding: 0 20px;
    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: #ffffff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-stage {
    position: relative;
}

.hero-slider {
    position: relative;
    min-height: 484px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-card {
    position: relative;
    overflow: hidden;
    min-height: 484px;
    border-radius: 30px;
    box-shadow: 0 35px 85px rgba(0, 0, 0, 0.45);
    background: #020617;
}

.hero-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.82;
}

.hero-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.15) 56%, rgba(2, 6, 23, 0.1));
}

.hero-card-content {
    position: absolute;
    z-index: 1;
    left: 28px;
    right: 28px;
    bottom: 28px;
}

.hero-card-content h2 {
    margin: 10px 0 10px;
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.hero-card-content p {
    margin: 0 0 18px;
    color: #dbeafe;
    line-height: 1.65;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.meta-pill,
.tag-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 6px 11px;
}

.hero-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 28px;
    background: linear-gradient(90deg, #60a5fa, #c084fc);
}

.section {
    padding: 52px 0;
}

.section-tight {
    padding: 34px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--panel);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #020617);
}

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

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

.poster-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.75);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.card-body {
    padding: 16px;
}

.card-title {
    margin: 0 0 9px;
    font-size: 17px;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.card-title a:hover {
    color: var(--blue);
}

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

.card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.meta-pill {
    color: #1d4ed8;
    background: var(--blue-soft);
    padding: 5px 9px;
}

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 188px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #1d4ed8, #7c3aed);
    box-shadow: var(--shadow);
}

.category-card:nth-child(3n + 2) {
    background: linear-gradient(135deg, #0f766e, #2563eb);
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #7c2d12, #be123c);
}

.category-card::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    right: -48px;
    top: -56px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.category-card h3,
.category-card p {
    position: relative;
    margin: 0;
}

.category-card h3 {
    font-size: 24px;
    letter-spacing: -0.04em;
}

.category-card p {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.7;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    margin: 26px 0;
}

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

.page-hero {
    padding: 56px 0 28px;
    background: linear-gradient(135deg, #eff6ff, #faf5ff);
    border-bottom: 1px solid var(--line);
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.08;
    letter-spacing: -0.055em;
}

.page-hero p {
    margin: 16px 0 0;
    max-width: 760px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.8;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 14px;
    margin: 26px 0 28px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--panel);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    outline: 0;
    background: #ffffff;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.16);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 34px;
    align-items: start;
    padding: 18px 0 54px;
}

.player-card,
.detail-card,
.related-panel {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.player-card {
    overflow: hidden;
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.18));
    cursor: pointer;
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-button {
    width: 82px;
    height: 82px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    font-size: 30px;
    line-height: 1;
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.42);
    cursor: pointer;
}

.player-info {
    padding: 24px;
}

.player-info h1 {
    margin: 0 0 14px;
    font-size: clamp(28px, 5vw, 46px);
    line-height: 1.15;
    letter-spacing: -0.05em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 16px 0;
}

.detail-card {
    padding: 26px;
}

.detail-card h2,
.related-panel h2 {
    margin: 0 0 16px;
    font-size: 24px;
    letter-spacing: -0.04em;
}

.detail-card p {
    color: #334155;
    line-height: 1.9;
    margin: 0 0 18px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tag-pill {
    color: #475569;
    background: #f1f5f9;
    padding: 7px 11px;
}

.related-panel {
    padding: 24px;
}

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

.related-item {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #f8fafc;
}

.related-item img {
    width: 74px;
    height: 98px;
    object-fit: cover;
    border-radius: 12px;
    background: #0f172a;
}

.related-item h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
}

.related-item p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 48px 78px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel);
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    font-weight: 900;
}

.rank-row img {
    width: 78px;
    height: 104px;
    object-fit: cover;
    border-radius: 14px;
    background: #0f172a;
}

.rank-row h3 {
    margin: 0 0 7px;
    font-size: 18px;
}

.rank-row p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.no-result {
    display: none;
    padding: 28px;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
}

.site-footer {
    margin-top: 54px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 36px;
    padding: 46px 0;
}

.footer-grid h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.footer-grid p,
.footer-grid a {
    color: #94a3b8;
    line-height: 1.75;
}

.footer-grid a:hover {
    color: #ffffff;
}

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

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    padding: 20px 0;
    color: #94a3b8;
    font-size: 14px;
}

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

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

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

    .menu-button {
        display: inline-flex;
    }

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

    .hero-inner {
        min-height: auto;
        padding: 48px 0 78px;
    }

    .hero-slider,
    .hero-card {
        min-height: 420px;
    }

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

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

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

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

    .logo {
        font-size: 19px;
    }

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

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

    .section-head {
        display: block;
    }

    .hero-copy p,
    .page-hero p {
        font-size: 16px;
    }

    .hero-card-content {
        left: 18px;
        right: 18px;
        bottom: 18px;
    }

    .rank-row {
        grid-template-columns: 38px 62px minmax(0, 1fr);
    }

    .rank-row .btn {
        grid-column: 2 / 4;
    }
}
