:root {
    color-scheme: dark;
    --page-bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-solid: #0f172a;
    --line: rgba(148, 163, 184, 0.18);
    --text: #e5f4ff;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #2563eb;
    --violet: #7c3aed;
    --shadow: 0 24px 80px rgba(8, 47, 73, 0.26);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 0%, rgba(34, 211, 238, 0.16), transparent 28rem),
        radial-gradient(circle at 85% 10%, rgba(37, 99, 235, 0.2), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #08111f 44%, #020617 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), transparent 80%);
}

img {
    max-width: 100%;
}

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

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

.site-header__inner {
    width: min(1280px, calc(100% - 32px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: .04em;
}

.logo__mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #00111f;
    box-shadow: 0 12px 34px rgba(34, 211, 238, .28);
}

.logo__text,
.footer-logo {
    font-size: 1.16rem;
}

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

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

.nav-link {
    padding: 10px 16px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover {
    color: #fff;
    background: rgba(34, 211, 238, .12);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, .72);
}

.menu-button span {
    display: block;
    width: 19px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: var(--text);
}

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

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mobile-nav-link {
    padding: 12px 14px;
}

.hero-slider {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    min-height: 620px;
    margin: 32px auto 56px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: #06101d;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, .72fr);
    gap: 40px;
    align-items: center;
    min-height: 620px;
    padding: 70px;
    opacity: 0;
    transform: scale(1.03);
    pointer-events: none;
    transition: opacity .7s ease, transform .7s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, .95) 0%, rgba(2, 6, 23, .73) 48%, rgba(2, 6, 23, .4) 100%),
        var(--hero-image) center / cover no-repeat;
    filter: saturate(1.12);
}

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

.hero-copy,
.hero-poster-wrap {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    width: fit-content;
    padding: 9px 14px;
    margin-bottom: 18px;
    border: 1px solid rgba(34, 211, 238, .32);
    border-radius: 999px;
    background: rgba(8, 47, 73, .48);
    color: var(--cyan);
    font-weight: 700;
}

.hero-copy h1 {
    max-width: 760px;
    font-size: clamp(2.4rem, 6vw, 5.9rem);
    line-height: .96;
    margin: 0 0 22px;
    font-weight: 950;
    letter-spacing: -.06em;
    text-shadow: 0 22px 60px rgba(0,0,0,.38);
}

.hero-copy p {
    max-width: 720px;
    margin: 0 0 28px;
    color: #dbeafe;
    font-size: clamp(1rem, 1.6vw, 1.24rem);
    line-height: 1.9;
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-weight: 800;
    transition: transform .24s ease, box-shadow .24s ease, background .24s ease;
}

.btn:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,.14);
}

.btn-primary {
    border: 0;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #00111f;
    box-shadow: 0 16px 42px rgba(34, 211, 238, .24);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #67e8f9, #3b82f6);
}

.hero-poster-wrap {
    display: flex;
    justify-content: flex-end;
}

.hero-poster {
    position: relative;
    width: min(360px, 100%);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 30px;
    background: rgba(15, 23, 42, .78);
    box-shadow: 0 28px 90px rgba(0,0,0,.48);
    transform: rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(2,6,23,.78);
    color: var(--cyan);
    font-weight: 800;
}

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 70px;
    bottom: 36px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.22);
    transition: width .3s ease, background .3s ease;
}

.hero-dot.is-active {
    width: 56px;
    background: var(--cyan);
}

.search-panel {
    width: min(1280px, calc(100% - 32px));
    margin: -24px auto 48px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, .82);
    box-shadow: 0 18px 50px rgba(0,0,0,.2);
    backdrop-filter: blur(14px);
}

.search-form {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(150px, .5fr));
    gap: 12px;
}

.search-form input,
.search-form select {
    width: 100%;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(2, 6, 23, .72);
    color: var(--text);
    padding: 0 16px;
    outline: none;
}

.search-form input:focus,
.search-form select:focus {
    border-color: rgba(34, 211, 238, .72);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, .12);
}

.section {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 64px;
}

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

.section-heading h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    font-weight: 950;
    letter-spacing: -.04em;
}

.section-heading h2 {
    font-size: clamp(1.65rem, 3.6vw, 2.8rem);
}

.section-heading p,
.page-title p {
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.8;
}

.section-more {
    flex: 0 0 auto;
    color: var(--cyan);
    font-weight: 800;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 168px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        radial-gradient(circle at 15% 10%, rgba(34,211,238,.22), transparent 42%),
        linear-gradient(135deg, rgba(15,23,42,.96), rgba(30,41,59,.72));
    transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, .46);
    box-shadow: 0 20px 58px rgba(8, 47, 73, .22);
}

.category-card h3 {
    margin: 0 0 10px;
    font-size: 1.32rem;
    font-weight: 900;
}

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

.category-card span {
    color: var(--cyan);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, .82);
    box-shadow: 0 20px 54px rgba(0,0,0,.16);
    transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, .44);
    box-shadow: 0 24px 70px rgba(8, 47, 73, .28);
}

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

.movie-card__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease, opacity .3s ease;
}

.movie-card:hover .movie-card__poster img {
    transform: scale(1.07);
}

.movie-card__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, .84), transparent 54%);
}

.movie-card__play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: rgba(34, 211, 238, .92);
    color: #00111f;
    font-weight: 900;
    box-shadow: 0 10px 30px rgba(34, 211, 238, .34);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    display: grid;
    min-width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #facc15, #f97316);
    color: #111827;
    font-size: .92rem;
}

.movie-card__body {
    padding: 16px;
}

.movie-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
    color: var(--cyan);
    font-size: .78rem;
    font-weight: 700;
}

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    line-height: 1.36;
    font-weight: 900;
}

.movie-card h3 a:hover {
    color: var(--cyan);
}

.movie-card p {
    display: -webkit-box;
    min-height: 3.2em;
    margin: 0 0 12px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.7;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 999px;
    background: rgba(255,255,255,.05);
    color: #cbd5e1;
    font-size: .78rem;
}

.page-hero {
    width: min(1280px, calc(100% - 32px));
    margin: 32px auto 34px;
    padding: 46px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        radial-gradient(circle at 85% 15%, rgba(34,211,238,.18), transparent 34%),
        linear-gradient(135deg, rgba(15,23,42,.96), rgba(2,6,23,.86));
    box-shadow: var(--shadow);
}

.page-title h1 {
    font-size: clamp(2rem, 5vw, 4.2rem);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: .92rem;
}

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

.detail-hero {
    width: min(1280px, calc(100% - 32px));
    margin: 34px auto 42px;
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        linear-gradient(90deg, rgba(2,6,23,.93), rgba(15,23,42,.78)),
        var(--detail-bg) center / cover no-repeat;
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 26px;
    box-shadow: 0 26px 80px rgba(0,0,0,.45);
}

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

.detail-title h1 {
    font-size: clamp(2.2rem, 5vw, 4.6rem);
    line-height: 1.04;
}

.detail-title p {
    max-width: 760px;
    margin: 20px 0 0;
    color: #dbeafe;
    font-size: 1.08rem;
    line-height: 1.9;
}

.meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 18px 0 24px;
}

.player-shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 44px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-frame video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.play-trigger {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(to top, rgba(2,6,23,.72), rgba(2,6,23,.22));
    color: #fff;
    transition: opacity .24s ease, visibility .24s ease;
}

.play-trigger span {
    display: grid;
    width: 94px;
    height: 94px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #00111f;
    font-size: 2.3rem;
    box-shadow: 0 22px 58px rgba(34,211,238,.32);
}

.play-trigger strong {
    display: block;
    margin-top: 14px;
    font-size: 1.08rem;
    letter-spacing: .1em;
}

.video-frame.is-playing .play-trigger {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.content-layout {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 64px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
}

.article-panel,
.side-panel {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15,23,42,.78);
    box-shadow: 0 20px 58px rgba(0,0,0,.14);
}

.article-panel {
    padding: 32px;
}

.article-panel h2,
.side-panel h2 {
    margin: 0 0 16px;
    font-size: 1.55rem;
    font-weight: 900;
}

.article-panel p {
    margin: 0 0 24px;
    color: #dbeafe;
    line-height: 2;
}

.side-panel {
    padding: 20px;
    height: fit-content;
}

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

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

.side-item:hover {
    background: rgba(34,211,238,.08);
}

.side-item img {
    width: 74px;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    object-fit: cover;
}

.side-item h3 {
    margin: 0 0 7px;
    font-size: .98rem;
    font-weight: 900;
}

.side-item p {
    margin: 0;
    color: var(--muted);
    font-size: .82rem;
}

.no-result {
    display: none;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15,23,42,.72);
    color: var(--muted);
    text-align: center;
}

.no-result.is-visible {
    display: block;
}

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

.site-footer__inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 40px;
    padding: 42px 0 28px;
}

.site-footer p {
    max-width: 520px;
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    justify-content: flex-end;
}

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

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

.copyright {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 28px;
    color: #64748b;
    font-size: .9rem;
}

@media (max-width: 1100px) {
    .hero-slide,
    .detail-hero,
    .content-layout {
        grid-template-columns: 1fr;
    }

    .hero-poster-wrap {
        display: none;
    }

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

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

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

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

    .menu-button {
        display: block;
    }

    .site-header__inner {
        height: 66px;
    }

    .hero-slider,
    .hero-slide {
        min-height: 560px;
    }

    .hero-slide {
        padding: 34px 24px 76px;
    }

    .hero-controls {
        left: 24px;
        bottom: 26px;
    }

    .search-form,
    .site-footer__inner {
        grid-template-columns: 1fr;
    }

    .footer-links {
        justify-content: flex-start;
    }

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

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

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

@media (max-width: 480px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .logo__text {
        font-size: 1rem;
    }

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