:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111c31;
    --line: #1e293b;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --brand: #f59e0b;
    --brand-dark: #ea580c;
    --radius: 18px;
    --shadow: 0 22px 80px rgba(0, 0, 0, 0.35);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 30rem),
        radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.10), transparent 28rem),
        var(--bg);
    color: var(--text);
}

body,
button,
input,
select {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
    width: 100%;
    height: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.site-header-inner {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #ffffff;
    box-shadow: 0 12px 34px rgba(245, 158, 11, 0.25);
}

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

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

.nav-link,
.mobile-link {
    color: var(--soft);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #ffffff;
}

.nav-link.is-active {
    color: var(--brand);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-button span {
    width: 18px;
    height: 2px;
    border-radius: 99px;
    background: #ffffff;
}

.mobile-nav {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px 18px;
    border-top: 1px solid var(--line);
}

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

.mobile-link {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.6);
}

.mobile-group-title {
    color: var(--muted);
    font-size: 13px;
    margin-top: 8px;
}

main,
.page-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 20px 0;
}

.hero-shell {
    position: relative;
    min-height: 500px;
    height: 70vh;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: var(--shadow);
    background: #000000;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

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

.hero-slide img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.12)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.85), transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    max-width: 700px;
    padding: 7vw 7vw 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    width: max-content;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.32);
    font-size: 13px;
    font-weight: 700;
}

.hero-content h1 {
    margin-top: 18px;
    color: #ffffff;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content p {
    margin-top: 22px;
    color: #dbe5f2;
    font-size: 18px;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.hero-actions,
.hero-meta,
.detail-meta,
.tag-row,
.filter-selects {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-actions {
    margin-top: 30px;
}

.hero-meta {
    margin-top: 20px;
    color: var(--soft);
    font-size: 14px;
}

.hero-meta span,
.detail-meta span,
.tag-row span {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    box-shadow: 0 14px 36px rgba(245, 158, 11, 0.22);
}

.ghost-button,
.section-more {
    color: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.58);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 50px;
    height: 50px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 42px;
    line-height: 1;
    transform: translateY(-50%);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

.hero-dots {
    position: absolute;
    left: 7vw;
    bottom: 34px;
    z-index: 5;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.32);
}

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

.home-search-block,
.feature-banner,
.page-hero,
.detail-panel,
.ranking-box,
.category-overview-card,
.related-panel,
.side-cover,
.filter-panel {
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.82);
    border-radius: var(--radius);
    box-shadow: 0 16px 56px rgba(0, 0, 0, 0.22);
}

.home-search-block,
.feature-banner {
    margin-top: 36px;
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.home-search-block h2,
.feature-banner h2,
.page-hero h1,
.section-head h2,
.detail-panel h1,
.detail-panel h2,
.related-panel h2,
.ranking-box h2,
.category-overview-head h2,
.related-cats h2 {
    color: #ffffff;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.home-search-block h2,
.feature-banner h2,
.section-head h2 {
    margin-top: 10px;
    font-size: clamp(26px, 4vw, 42px);
}

.home-search-block p,
.feature-banner p,
.section-head p,
.page-hero p,
.category-overview-head p {
    margin-top: 10px;
    color: var(--muted);
    line-height: 1.8;
}

.content-section,
.split-section {
    margin-top: 56px;
}

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

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

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

.category-tile {
    min-height: 132px;
    padding: 20px;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(30, 41, 59, 0.82)),
        var(--panel);
    border: 1px solid rgba(148, 163, 184, 0.14);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.5);
}

.category-tile span {
    display: block;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.category-tile em {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-style: normal;
    line-height: 1.6;
    font-size: 14px;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.14);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(17, 28, 49, 0.95);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #000000;
}

.poster-link img,
.rank-poster img,
.related-card img,
.side-cover img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.3s ease;
}

.movie-card:hover .poster-link img,
.rank-card:hover .rank-poster img,
.related-card:hover img {
    transform: scale(1.07);
    filter: brightness(0.78);
}

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.88);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.55);
    transform: translate(-50%, -50%) scale(0.82);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.movie-info {
    padding: 16px;
}

.movie-info h2,
.movie-info h3 {
    color: #ffffff;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 850;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.movie-info h2 a:hover,
.movie-info h3 a:hover,
.rank-body h3 a:hover,
.related-card h3 a:hover {
    color: #fbbf24;
}

.movie-meta {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.movie-info p {
    margin-top: 10px;
    min-height: 45px;
    color: var(--soft);
    line-height: 1.65;
    font-size: 14px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.tag-row {
    margin-top: 12px;
    gap: 8px;
}

.tag-row span {
    color: #f8fafc;
    font-size: 12px;
    padding: 5px 8px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 24px;
    align-items: start;
}

.ranking-box {
    padding: 22px;
    position: sticky;
    top: 92px;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 54px 92px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.46);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.rank-num {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.rank-poster {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 12px;
    background: #000000;
}

.rank-body h3 {
    color: #ffffff;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 850;
}

.rank-body p {
    margin-top: 6px;
    color: var(--soft);
    line-height: 1.55;
    font-size: 13px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

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

.page-hero {
    padding: 42px;
    margin-bottom: 28px;
}

.page-hero h1 {
    margin-top: 14px;
    font-size: clamp(36px, 5vw, 60px);
}

.filter-panel {
    padding: 18px;
    margin-bottom: 28px;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 16px;
    align-items: end;
}

.search-box {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.search-box input,
.filter-selects select {
    height: 46px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.8);
    color: #ffffff;
    padding: 0 14px;
    outline: none;
}

.search-box input:focus,
.filter-selects select:focus {
    border-color: rgba(245, 158, 11, 0.6);
}

.filter-empty {
    padding: 28px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.8);
    color: var(--muted);
    text-align: center;
}

.category-overview-list {
    display: grid;
    gap: 26px;
}

.category-overview-card {
    padding: 22px;
}

.category-overview-head {
    margin-bottom: 18px;
}

.category-overview-head h2 {
    margin-top: 10px;
    font-size: 30px;
}

.related-cats {
    padding: 24px;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.related-cats div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.related-cats a {
    padding: 9px 13px;
    border-radius: 999px;
    color: var(--soft);
    background: rgba(30, 41, 59, 0.72);
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: var(--shadow);
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    object-fit: contain;
}

.player-start {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.12));
    color: #ffffff;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-start span {
    width: 86px;
    height: 86px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    font-size: 38px;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    box-shadow: 0 18px 54px rgba(245, 158, 11, 0.32);
}

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

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

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

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

.detail-panel h1 {
    font-size: clamp(32px, 4vw, 54px);
    line-height: 1.12;
}

.detail-meta {
    margin-top: 18px;
}

.lead-text {
    margin-top: 22px;
    color: #e5edf8;
    font-size: 19px;
    line-height: 1.8;
}

.detail-tags {
    margin-top: 18px;
}

.detail-panel h2 {
    margin-top: 30px;
    font-size: 26px;
}

.detail-panel h2 + p {
    margin-top: 12px;
    color: var(--soft);
    line-height: 2;
    font-size: 16px;
}

.detail-side {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 20px;
}

.side-cover {
    overflow: hidden;
    padding: 14px;
}

.side-cover img {
    aspect-ratio: 4 / 5;
    border-radius: 16px;
    margin-bottom: 14px;
}

.side-cover .primary-button {
    width: 100%;
}

.related-panel {
    padding: 20px;
}

.related-panel h2 {
    font-size: 24px;
    margin-bottom: 14px;
}

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

.related-card {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.42);
}

.related-card a:first-child {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 10px;
}

.related-card h3 {
    color: #ffffff;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 800;
}

.related-card p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}

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

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 20px;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 34px;
}

.footer-grid p {
    margin-top: 16px;
    color: var(--muted);
    line-height: 1.8;
}

.footer-grid h2 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 850;
    margin-bottom: 14px;
}

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

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

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

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 20px 28px;
    border-top: 1px solid var(--line);
    color: #64748b;
    text-align: center;
    font-size: 14px;
}

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

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

    .ranking-box,
    .detail-side {
        position: static;
    }

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

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

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

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

    main,
    .page-main {
        padding: 20px 14px 0;
    }

    .hero-shell {
        height: 620px;
        border-radius: 20px;
    }

    .hero-content {
        padding: 82px 24px 82px;
    }

    .hero-content h1 {
        font-size: 40px;
    }

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

    .hero-arrow {
        display: none;
    }

    .home-search-block,
    .feature-banner,
    .section-head,
    .filter-panel {
        display: grid;
        grid-template-columns: 1fr;
    }

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

    .page-hero,
    .detail-panel {
        padding: 24px;
    }

    .rank-card {
        grid-template-columns: 46px 72px minmax(0, 1fr);
    }

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

@media (max-width: 520px) {
    .category-grid,
    .movie-grid,
    .movie-grid.two-col,
    .movie-grid.mini-grid,
    .list-grid {
        grid-template-columns: 1fr;
    }

    .hero-shell {
        min-height: 560px;
    }

    .hero-dots {
        left: 24px;
    }

    .primary-button,
    .ghost-button,
    .section-more {
        width: 100%;
    }

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