:root {
    color-scheme: dark;
    --bg: #050816;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --primary: #f97316;
    --primary-2: #ef4444;
    --accent: #38bdf8;
    --radius: 24px;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 10%, rgba(249, 115, 22, 0.16), transparent 28rem),
        radial-gradient(circle at 78% 0%, rgba(56, 189, 248, 0.12), transparent 32rem),
        linear-gradient(135deg, #020617 0%, #0f172a 48%, #111827 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 85%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 12px 32px rgba(249, 115, 22, 0.35);
}

.site-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 14px;
    transition: 0.24s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: currentColor;
    border-radius: 999px;
}

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

.hero {
    position: relative;
    overflow: hidden;
    min-height: 660px;
    display: grid;
    align-items: center;
    border-bottom: 1px solid var(--line);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.68) 45%, rgba(2, 6, 23, 0.28) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, transparent 42%);
    pointer-events: none;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.8s ease, transform 1.1s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
}

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

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0 54px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
    gap: 42px;
    align-items: end;
}

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

.eyebrow,
.card-badge,
.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: #fed7aa;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 700;
}

.hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 0.95;
    letter-spacing: -0.06em;
    font-weight: 950;
}

.hero-lead {
    color: var(--muted);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.78;
    max-width: 680px;
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: 800;
    transition: 0.24s ease;
}

.btn.primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 18px 44px rgba(249, 115, 22, 0.36);
}

.btn:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.34);
}

.hero-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    padding: 18px;
}

.hero-mini-card {
    display: grid;
    grid-template-columns: 94px 1fr;
    gap: 14px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.07);
    transition: 0.24s ease;
}

.hero-mini-card + .hero-mini-card {
    margin-top: 12px;
}

.hero-mini-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(4px);
}

.hero-mini-card img {
    width: 94px;
    height: 124px;
    object-fit: cover;
    border-radius: 16px;
}

.hero-mini-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 17px;
}

.hero-mini-card p {
    margin: 0;
    color: var(--soft);
    line-height: 1.6;
    font-size: 13px;
}

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

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

.hero-dot.active {
    background: #fff;
}

.section {
    padding: 54px 0;
}

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

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.22);
    transition: 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(249, 115, 22, 0.5);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.32);
}

.poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: rgba(255, 255, 255, 0.04);
}

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

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

.poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.94), transparent);
}

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 5px 10px;
    color: #fff;
    background: rgba(2, 6, 23, 0.58);
    backdrop-filter: blur(8px);
}

.card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    flex: 1;
}

.card-title {
    margin: 0;
    font-size: 17px;
    line-height: 1.36;
    font-weight: 900;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--soft);
    font-size: 12px;
}

.card-desc {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    font-size: 13px;
}

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

.category-card {
    min-height: 196px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 22px;
    background:
        radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.28), transparent 40%),
        rgba(15, 23, 42, 0.74);
    box-shadow: var(--shadow);
    transition: 0.24s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.32);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 950;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.72;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 48px 74px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    transition: 0.22s ease;
}

.rank-item:hover {
    background: rgba(255, 255, 255, 0.10);
}

.rank-no {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    font-weight: 950;
}

.rank-item img {
    width: 74px;
    height: 96px;
    object-fit: cover;
    border-radius: 14px;
}

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

.rank-item p {
    margin: 0;
    color: var(--soft);
    line-height: 1.6;
}

.search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.search-box input,
.select-like {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    outline: none;
    border-radius: 16px;
    padding: 0 16px;
    color: #fff;
    background: rgba(2, 6, 23, 0.72);
}

.search-box input::placeholder {
    color: #64748b;
}

.page-hero {
    padding: 72px 0 34px;
}

.page-hero h1 {
    margin: 0;
    max-width: 880px;
    font-size: clamp(36px, 6vw, 70px);
    line-height: 1.02;
    letter-spacing: -0.06em;
    font-weight: 950;
}

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

.breadcrumb a:hover {
    color: #fff;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(260px, 360px) 1fr;
    gap: 34px;
    align-items: center;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        radial-gradient(circle at 100% 0%, rgba(249, 115, 22, 0.20), transparent 38%),
        var(--panel);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
}

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

.detail-title {
    margin: 12px 0 16px;
    font-size: clamp(34px, 5.6vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.06em;
    font-weight: 950;
}

.meta-row,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 14px 0;
}

.meta-pill {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.07);
}

.article-panel {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.article-panel h2 {
    margin: 0 0 14px;
    font-size: 28px;
    font-weight: 950;
}

.article-panel p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.9;
    font-size: 16px;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid var(--line);
    background: #000;
    box-shadow: var(--shadow);
}

.player-wrap video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.38), rgba(2, 6, 23, 0.82));
    cursor: pointer;
    transition: opacity 0.22s ease;
}

.play-overlay.hidden {
    display: none;
}

.play-button {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 18px 50px rgba(249, 115, 22, 0.42);
    cursor: pointer;
}

.play-button svg {
    width: 34px;
    height: 34px;
    transform: translateX(3px);
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.side-panel {
    position: sticky;
    top: 96px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
}

.side-panel h2 {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 950;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.compact-card img {
    width: 64px;
    height: 82px;
    object-fit: cover;
    border-radius: 12px;
}

.compact-card strong {
    display: block;
    margin-bottom: 6px;
    line-height: 1.35;
}

.compact-card span {
    color: var(--soft);
    font-size: 12px;
}

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

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--soft);
}

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

.footer-links a:hover {
    color: #fff;
}

.hidden-card {
    display: none !important;
}

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

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

@media (max-width: 900px) {
    .site-nav {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 84px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(2, 6, 23, 0.95);
        box-shadow: var(--shadow);
    }

    .site-nav.site-nav--open {
        display: flex;
    }

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

    .hero-content,
    .detail-hero,
    .two-column {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 760px;
    }

    .hero-panel,
    .side-panel {
        position: static;
    }

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

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

    .rank-item {
        grid-template-columns: 42px 64px 1fr;
    }

    .rank-item .btn {
        grid-column: 3;
        justify-self: start;
    }
}

@media (max-width: 640px) {
    .header-inner,
    .main-wrap,
    .container,
    .hero-content,
    .footer-inner {
        width: min(100% - 22px, 1180px);
    }

    .logo span:last-child {
        max-width: 8.5em;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hero {
        min-height: 700px;
    }

    .hero h1,
    .page-hero h1,
    .detail-title {
        letter-spacing: -0.04em;
    }

    .hero-panel {
        padding: 12px;
    }

    .hero-mini-card {
        grid-template-columns: 74px 1fr;
    }

    .hero-mini-card img {
        width: 74px;
        height: 98px;
    }

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

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

    .detail-hero,
    .article-panel {
        padding: 18px;
        border-radius: 24px;
    }

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

    .search-box {
        grid-template-columns: 1fr;
    }
}
