:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-strong: #0f172a;
    --border: rgba(148, 163, 184, 0.18);
    --text: #e5e7eb;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #38bdf8;
    --accent-strong: #2563eb;
    --accent-hot: #f97316;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 28rem),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.2), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #07111f 48%, #020617 100%);
}

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: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.94));
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 44px rgba(2, 6, 23, 0.35);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 70px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 12px 34px rgba(37, 99, 235, 0.42);
}

.brand-text {
    font-size: 20px;
}

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

.nav-link,
.mobile-nav-link {
    color: var(--soft);
    padding: 10px 16px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: #ffffff;
    background: rgba(56, 189, 248, 0.13);
}

.nav-link:hover {
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: #ffffff;
    border-radius: 99px;
}

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

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
}

.hero {
    position: relative;
    min-height: 720px;
    padding-top: 70px;
    overflow: hidden;
}

.hero-stage,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 36%, rgba(2, 6, 23, 0.42) 70%, rgba(2, 6, 23, 0.78) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 48%, rgba(2, 6, 23, 0.7) 100%);
}

.hero-content {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 650px;
    margin: 0 auto;
    padding: 128px 0 200px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 13px;
    font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(38px, 7vw, 78px);
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.hero-content p {
    width: min(680px, 100%);
    margin: 24px 0 0;
    color: var(--soft);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

.hero-tags,
.detail-tags,
.card-tags,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.detail-tags span,
.card-tags span,
.rank-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    color: #dbeafe;
    border: 1px solid rgba(96, 165, 250, 0.24);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.64);
}

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

.primary-btn,
.ghost-btn,
.search-form button,
.section-more,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-btn,
.search-form button {
    min-height: 46px;
    padding: 0 22px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 14px 40px rgba(37, 99, 235, 0.36);
}

.ghost-btn {
    min-height: 46px;
    padding: 0 22px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(15, 23, 42, 0.52);
}

.primary-btn:hover,
.ghost-btn:hover,
.search-form button:hover,
.section-more:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.hero-panel {
    position: absolute;
    left: 50%;
    bottom: 46px;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: minmax(0, 520px) auto;
    gap: 18px;
    align-items: end;
}

.hero-search-card,
.filter-box,
.category-overview-card,
.movie-card,
.rank-item,
.detail-content article,
.video-frame,
.detail-hero,
.page-hero {
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero-search-card {
    padding: 24px;
    border-radius: var(--radius);
}

.hero-search-card h2,
.filter-box h2,
.section-head h2,
.detail-content h2,
.player-section h2,
.category-overview-card h2 {
    margin: 0;
    font-size: clamp(24px, 4vw, 34px);
    letter-spacing: -0.03em;
}

.hero-search-card p,
.page-hero p,
.category-overview-card p,
.detail-content p,
.movie-card p,
.rank-item p,
.site-footer p {
    color: var(--muted);
    line-height: 1.75;
}

.search-form {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.search-form input,
.local-search,
.local-year {
    min-width: 0;
    color: #ffffff;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.58);
    outline: none;
}

.search-form input {
    flex: 1;
    height: 46px;
    padding: 0 16px;
}

.local-search,
.local-year {
    min-height: 44px;
    padding: 0 16px;
}

.local-year option {
    color: #020617;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.quick-links a,
.filter-chips button,
.filter-chips a {
    color: #dbeafe;
    border: 1px solid rgba(96, 165, 250, 0.22);
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
}

.quick-links a {
    padding: 8px 12px;
}

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

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

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

.page-main {
    padding-top: 110px;
}

.section {
    padding: 54px 0;
}

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

.section-more,
.text-link {
    color: var(--accent);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.38);
    box-shadow: 0 24px 68px rgba(2, 6, 23, 0.58);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.9);
}

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

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

.score-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    min-width: 42px;
    padding: 6px 8px;
    text-align: center;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.92);
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

.card-tags {
    margin-bottom: 12px;
}

.card-tags span {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 12px;
}

.movie-card h3,
.rank-item h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card p {
    margin: 10px 0 14px;
    font-size: 14px;
}

.compact-card h3 {
    font-size: 16px;
}

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

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

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--panel-strong);
    box-shadow: var(--shadow);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
    transition: transform 0.45s ease, opacity 0.3s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.94));
}

.category-card span,
.category-card p {
    position: relative;
    z-index: 1;
}

.category-card span {
    font-size: 24px;
    font-weight: 900;
}

.category-card p {
    margin: 10px 0 0;
    color: var(--soft);
}

.category-card:hover img {
    opacity: 0.48;
    transform: scale(1.08);
}

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

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

.page-rank-list {
    padding-bottom: 54px;
}

.rank-item {
    display: grid;
    grid-template-columns: 56px 84px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent-hot), #ef4444);
    font-weight: 900;
}

.rank-poster {
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.72);
}

.rank-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-item p {
    margin: 8px 0 10px;
}

.rank-meta span {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 12px;
}

.page-hero {
    min-height: 270px;
    padding: 38px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
    gap: 26px;
    align-items: center;
    border-radius: 30px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.3), rgba(15, 23, 42, 0.82)),
        radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.2), transparent 26rem);
}

.compact-hero h1,
.rank-hero h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
    max-width: 680px;
    margin: 16px 0 0;
    font-size: 18px;
}

.page-search {
    margin-top: 0;
}

.filter-box {
    margin-top: 24px;
    padding: 22px;
    border-radius: var(--radius);
}

.sticky-filter {
    position: sticky;
    top: 84px;
    z-index: 20;
}

.filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 12px;
    margin-top: 16px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.filter-chips button,
.filter-chips a {
    min-height: 36px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.filter-chips button.is-active,
.filter-chips button:hover,
.filter-chips a:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.category-overview-grid {
    display: grid;
    gap: 18px;
    padding: 34px 0 56px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
    border-radius: var(--radius);
}

.category-collage {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    min-height: 150px;
}

.category-collage img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 14px;
}

.catalog-grid {
    padding-bottom: 54px;
}

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

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

.detail-hero {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    padding: 28px;
    border-radius: 30px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.6);
}

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

.detail-info {
    align-self: center;
}

.detail-lead {
    max-width: 780px;
    color: var(--soft);
    font-size: 19px;
    line-height: 1.9;
}

.detail-tags {
    margin: 22px 0;
}

.detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 26px;
    color: #e0f2fe;
    font-weight: 800;
}

.player-section {
    padding-top: 34px;
}

.video-frame {
    position: relative;
    overflow: hidden;
    margin-top: 18px;
    border-radius: 28px;
    background: #000000;
}

.video-frame video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-button {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.14), rgba(2, 6, 23, 0.68));
    cursor: pointer;
}

.play-button span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.6);
}

.play-button span::before {
    content: "";
    display: block;
    margin-left: 7px;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-left: 28px solid #0f172a;
}

.play-button.is-hidden {
    display: none;
}

.detail-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding-top: 34px;
}

.detail-content article {
    padding: 24px;
    border-radius: var(--radius);
}

.detail-content p {
    font-size: 17px;
}

.site-footer {
    margin-top: 48px;
    border-top: 1px solid var(--border);
    background: rgba(2, 6, 23, 0.62);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand {
    font-size: 22px;
    font-weight: 900;
}

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

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

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

.is-filtered-out {
    display: none !important;
}

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: 780px;
    }

    .hero-content {
        min-height: 680px;
        padding-top: 110px;
        padding-bottom: 260px;
    }

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

    .hero-dots {
        justify-content: flex-start;
    }

    .page-hero,
    .detail-hero,
    .detail-content,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 320px;
    }

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

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

    .footer-inner {
        flex-direction: column;
    }
}

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

    .brand-text {
        font-size: 17px;
    }

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 36px;
    }

    .hero-search-card,
    .page-hero,
    .detail-hero,
    .filter-box {
        padding: 18px;
        border-radius: 20px;
    }

    .search-form,
    .filter-row {
        grid-template-columns: 1fr;
        display: grid;
    }

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

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

    .rank-number {
        width: 42px;
        height: 42px;
    }

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

    .category-collage img {
        height: 120px;
    }
}
