:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-strong: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --cyan: #06b6d4;
    --orange: #f97316;
    --red: #ef4444;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 45%, #f8fafc 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body.nav-open {
    overflow: hidden;
}

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

button,
input,
select {
    font: inherit;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.96), rgba(15, 23, 42, 0.98));
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: #fff;
    font-weight: 900;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.35);
}

.brand-copy strong {
    display: block;
    color: #fff;
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: 0.02em;
}

.brand-copy small {
    display: block;
    margin-top: 4px;
    color: #67e8f9;
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-link,
.mobile-link {
    color: #e2e8f0;
    font-weight: 700;
    transition: color 0.25s ease, background 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #67e8f9;
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
}

.menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #fff;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 8px 16px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-link {
    display: block;
    padding: 12px 16px;
    border-radius: 14px;
}

.mobile-link:hover,
.mobile-link.active {
    background: rgba(255, 255, 255, 0.08);
}

.hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.28), transparent 32%), linear-gradient(135deg, #0f172a 0%, #1e3a8a 48%, #164e63 100%);
}

.hero::before {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.32), rgba(37, 99, 235, 0.1));
    animation: glow 5s ease-in-out infinite alternate;
}

.hero::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 150px;
    content: "";
    background: linear-gradient(0deg, #f8fafc, transparent);
}

.hero-stage {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
    gap: 44px;
    align-items: center;
    min-height: 560px;
    padding: 64px 0 120px;
}

.hero-copy h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.hero-copy h1 span {
    display: block;
    color: transparent;
    background: linear-gradient(90deg, #67e8f9, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-copy p {
    max-width: 640px;
    margin: 22px 0 0;
    color: #cbd5e1;
    font-size: 19px;
}

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

.btn-primary,
.btn-secondary,
.btn-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    font-weight: 800;
    border-radius: 999px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.34);
}

.btn-secondary {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.btn-soft {
    color: #075985;
    background: #e0f2fe;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-soft:hover {
    transform: translateY(-2px);
}

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

.hero-tags a,
.hero-stat {
    color: #fff;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.hero-panel {
    position: relative;
    border-radius: 34px;
    min-height: 430px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: rgba(15, 23, 42, 0.7);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 30px;
    opacity: 0;
    background-position: center;
    background-size: cover;
    transition: opacity 0.6s ease;
}

.hero-slide::before {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.92));
}

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

.slide-copy {
    position: relative;
    z-index: 2;
    color: #fff;
}

.slide-copy span {
    display: inline-flex;
    padding: 6px 12px;
    color: #cffafe;
    border-radius: 999px;
    background: rgba(8, 145, 178, 0.48);
}

.slide-copy h2 {
    margin: 14px 0 8px;
    font-size: 32px;
    line-height: 1.2;
}

.slide-copy p {
    display: -webkit-box;
    margin: 0 0 18px;
    color: #dbeafe;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-dots {
    position: absolute;
    right: 28px;
    bottom: 24px;
    z-index: 5;
    display: flex;
    gap: 8px;
}

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

.hero-dot.is-active {
    width: 26px;
    background: #67e8f9;
}

.feature-strip {
    position: relative;
    z-index: 5;
    margin-top: -88px;
}

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

.main-area {
    padding: 72px 0 0;
}

.page-hero,
.detail-head {
    padding: 64px 0 34px;
    background: radial-gradient(circle at 16% 0%, rgba(6, 182, 212, 0.16), transparent 32%), linear-gradient(180deg, #fff, #f8fafc);
}

.page-hero h1,
.detail-copy h1 {
    max-width: 850px;
    margin: 0;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.page-hero p,
.detail-copy p {
    max-width: 860px;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 18px;
}

.section-block {
    margin: 0 0 70px;
}

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

.section-heading > span {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.16;
    letter-spacing: -0.03em;
}

.section-heading p {
    margin: 7px 0 0;
    color: var(--muted);
}

.section-link {
    color: var(--blue);
    font-weight: 900;
}

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

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

.movie-card {
    display: block;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(14, 165, 233, 0.45);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.13);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 18px;
    background-color: #0f172a;
    background-position: center;
    background-size: cover;
}

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

.rating-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 4px 9px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.play-dot {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #fff;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.88);
    box-shadow: 0 12px 24px rgba(14, 165, 233, 0.35);
}

.card-title {
    display: -webkit-box;
    min-height: 44px;
    margin-top: 12px;
    font-weight: 900;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}

.gradient-panel {
    padding: 34px;
    border-radius: 32px;
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

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

.category-card {
    min-height: 190px;
    padding: 24px;
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(135deg, #1e3a8a, #0891b2);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease;
}

.category-card:hover {
    transform: translateY(-4px);
}

.category-card strong {
    display: block;
    margin-bottom: 12px;
    font-size: 24px;
}

.category-card p {
    margin: 0 0 20px;
    color: #dbeafe;
}

.category-card span {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 48px 72px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.rank-number {
    color: var(--blue);
    font-weight: 950;
    font-size: 22px;
}

.rank-thumb {
    display: block;
    width: 72px;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    background-color: #0f172a;
    background-position: center;
    background-size: cover;
}

.rank-copy strong {
    display: -webkit-box;
    font-weight: 900;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rank-copy small {
    display: -webkit-box;
    margin-top: 4px;
    color: var(--muted);
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rank-score {
    color: #f97316;
    font-weight: 950;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: end;
    margin: 30px 0 34px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.filter-panel label {
    display: block;
}

.filter-panel span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-weight: 800;
    font-size: 13px;
}

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

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

.select-row {
    display: flex;
    gap: 12px;
}

.detail-head {
    padding-bottom: 52px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    border-radius: 34px;
    background-color: #0f172a;
    background-position: center;
    background-size: cover;
    box-shadow: var(--shadow);
}

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

.breadcrumb a {
    color: var(--blue);
    font-weight: 800;
}

.meta-badges,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.meta-badges span,
.tag-row span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #0f172a;
    background: #e0f2fe;
    font-weight: 800;
    font-size: 13px;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.content-card {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 28px;
    letter-spacing: -0.03em;
}

.content-card p {
    margin: 0;
    color: #334155;
    font-size: 17px;
}

.content-card p + p {
    margin-top: 18px;
}

.player-panel {
    padding: 28px;
    border-radius: 32px;
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
    box-shadow: var(--shadow);
}

.player-panel h2 {
    margin: 0 0 18px;
    color: #fff;
    font-size: 28px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    background: #020617;
}

.video-shell video {
    width: 100%;
    height: 100%;
    background: #020617;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    border: 0;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.35), rgba(2, 6, 23, 0.58));
    font-size: clamp(42px, 10vw, 88px);
    transition: opacity 0.25s ease;
}

.video-shell.is-playing .play-overlay,
.video-shell.has-played .play-overlay {
    opacity: 0;
    pointer-events: none;
}

.empty-state {
    display: none;
    padding: 34px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed #bae6fd;
    border-radius: 24px;
    background: #f0f9ff;
}

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

.site-footer {
    margin-top: 80px;
    color: #cbd5e1;
    background: linear-gradient(180deg, #0f172a, #020617);
}

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

.footer-grid h3,
.footer-brand strong {
    color: #fff;
}

.footer-grid p {
    margin: 12px 0 0;
    color: #94a3b8;
}

.footer-grid a {
    display: block;
    margin-top: 9px;
    color: #94a3b8;
}

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

.footer-bottom {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 22px;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

[data-filter-card].is-hidden {
    display: none;
}

@keyframes glow {
    from {
        opacity: 0.52;
        transform: scale(1);
    }
    to {
        opacity: 0.95;
        transform: scale(1.04);
    }
}

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

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

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

    .menu-button {
        display: block;
    }

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

    .hero-stage,
    .detail-layout,
    .filter-panel,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-stage {
        min-height: auto;
        padding: 46px 0 120px;
    }

    .hero-panel {
        min-height: 380px;
    }

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

    .select-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(310px, 100%);
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

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

    .brand-copy small {
        display: none;
    }

    .brand-copy strong {
        font-size: 18px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .hero {
        min-height: auto;
    }

    .hero-copy h1 {
        font-size: 42px;
    }

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

    .strip-grid,
    .movie-grid,
    .movie-grid.wide,
    .category-grid,
    .rank-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .movie-card {
        padding: 9px;
        border-radius: 18px;
    }

    .poster {
        border-radius: 15px;
    }

    .card-title {
        font-size: 14px;
    }

    .gradient-panel,
    .content-card,
    .player-panel {
        padding: 20px;
        border-radius: 24px;
    }

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

    .rank-thumb,
    .rank-score {
        display: none;
    }
}
