:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --blue: #2563eb;
    --blue-light: #38bdf8;
    --orange: #f97316;
    --gold: #facc15;
    --radius: 20px;
    --shadow: 0 24px 60px rgba(2, 6, 23, 0.46);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.26), transparent 34rem),
        radial-gradient(circle at top right, rgba(217, 70, 239, 0.18), transparent 30rem),
        linear-gradient(135deg, #020617 0%, #0f172a 45%, #020617 100%);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-shell {
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.92), rgba(15, 23, 42, 0.96));
    backdrop-filter: blur(18px);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.32);
}

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

.desktop-nav a,
.mobile-panel a {
    color: #dbeafe;
    padding: 10px 14px;
    border-radius: 999px;
    transition: 0.22s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.28);
}

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.65);
}

.header-search input {
    width: 220px;
    color: #ffffff;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 9px 8px 9px 14px;
}

.header-search input::placeholder {
    color: #94a3b8;
}

.header-search button,
.primary-button,
.secondary-button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 700;
    transition: 0.22s ease;
}

.header-search button,
.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #0891b2);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.header-search button {
    padding: 9px 15px;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 22px;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #e0f2fe;
    padding: 12px 20px;
    border: 1px solid rgba(125, 211, 252, 0.26);
    background: rgba(15, 23, 42, 0.55);
}

.primary-button:hover,
.header-search button:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.secondary-button:hover {
    background: rgba(37, 99, 235, 0.24);
}

.menu-toggle {
    display: none;
    color: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.78);
    padding: 8px 11px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

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

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.58) 42%, rgba(2, 6, 23, 0.12) 100%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.72) 0%, rgba(2, 6, 23, 0.08) 62%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 64px;
    z-index: 2;
    width: min(1220px, calc(100% - 32px));
    transform: translateX(-50%);
}

.hero-kicker,
.detail-kicker,
.category-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.86);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.86rem;
    font-weight: 700;
}

.hero h1 {
    max-width: 820px;
    margin: 18px 0 16px;
    font-size: clamp(2.2rem, 5vw, 4.8rem);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 760px;
    color: #e2e8f0;
    font-size: clamp(1rem, 1.6vw, 1.3rem);
    line-height: 1.75;
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border: 0;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.56);
    cursor: pointer;
    transform: translateY(-50%);
    transition: 0.22s ease;
}

.hero-control:hover {
    background: rgba(37, 99, 235, 0.78);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: 0.22s ease;
}

.hero-dot.active {
    width: 34px;
    background: #ffffff;
}

.page-main {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 70px;
}

.section-block {
    margin-bottom: 64px;
}

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

.section-heading h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.65rem, 2.4vw, 2.45rem);
    letter-spacing: -0.03em;
}

.section-heading p,
.page-title p,
.category-card p,
.detail-title p,
.detail-copy p,
.movie-card-body p,
.rank-info p {
    color: var(--muted);
    line-height: 1.72;
}

.section-more {
    color: #7dd3fc;
    font-weight: 800;
    white-space: nowrap;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.58);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.24);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(15, 23, 42, 0.84);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.08));
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.88);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
    transition: 0.25s ease;
    box-shadow: 0 16px 38px rgba(37, 99, 235, 0.36);
}

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

.poster-category {
    position: absolute;
    left: 12px;
    bottom: 12px;
    color: #e0f2fe;
    border: 1px solid rgba(125, 211, 252, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
    padding: 5px 10px;
    font-size: 0.76rem;
    font-weight: 700;
}

.movie-card-body {
    padding: 18px;
}

.movie-card-title {
    margin: 0 0 10px;
    font-size: 1.08rem;
    line-height: 1.35;
}

.movie-card-title a:hover,
.rank-info a:hover {
    color: var(--blue-light);
}

.movie-card-body p {
    min-height: 58px;
    margin: 0 0 14px;
    font-size: 0.95rem;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 13px;
    color: #94a3b8;
    font-size: 0.84rem;
}

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.movie-tags span,
.detail-tags span {
    color: #bae6fd;
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.09);
    padding: 5px 9px;
    font-size: 0.76rem;
}

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

.category-card {
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.18), transparent),
        rgba(15, 23, 42, 0.62);
    padding: 22px;
    box-shadow: var(--shadow);
    transition: 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.44);
}

.category-card h2 {
    margin: 0 0 12px;
    font-size: 1.25rem;
}

.category-card p {
    margin: 0;
    font-size: 0.94rem;
}

.category-card span {
    color: #7dd3fc;
    font-weight: 800;
}

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

.rank-row {
    display: grid;
    grid-template-columns: auto 150px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.58);
    padding: 14px;
    transition: 0.22s ease;
}

.rank-row:hover {
    border-color: rgba(56, 189, 248, 0.38);
    background: rgba(15, 23, 42, 0.82);
}

.rank-num,
.rank-dot {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, #facc15, #f97316);
}

.rank-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #38bdf8;
}

.rank-thumb {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    background: #0f172a;
}

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

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 1.08rem;
}

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

.page-title {
    margin-bottom: 30px;
    padding: 30px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.26), transparent 18rem),
        rgba(15, 23, 42, 0.58);
}

.page-title p {
    max-width: 880px;
    margin: 14px 0 0;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.52);
}

.filter-bar input,
.filter-bar select,
.search-panel input,
.search-panel select {
    color: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    outline: 0;
    background: rgba(2, 6, 23, 0.44);
    padding: 12px 16px;
}

.filter-bar input,
.search-panel input {
    min-width: min(360px, 100%);
    flex: 1 1 280px;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    margin-bottom: 28px;
}

.search-panel button {
    color: #ffffff;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #0891b2);
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 800;
}

.detail-hero {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #94a3b8;
    margin-bottom: 22px;
}

.breadcrumb a:hover {
    color: #7dd3fc;
}

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

.detail-title {
    margin-bottom: 22px;
}

.detail-title h1 {
    margin-top: 16px;
}

.detail-title p {
    max-width: 840px;
    margin: 14px 0 0;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle, rgba(37, 99, 235, 0.18), transparent 18rem),
        linear-gradient(0deg, rgba(2, 6, 23, 0.6), rgba(2, 6, 23, 0.16));
    transition: 0.22s ease;
}

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

.big-play {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    cursor: pointer;
    font-size: 2rem;
    box-shadow: 0 24px 58px rgba(37, 99, 235, 0.45);
    transition: 0.22s ease;
}

.big-play:hover {
    transform: scale(1.06);
}

.detail-panel,
.detail-copy {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.58);
    padding: 22px;
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.2);
}

.detail-panel {
    position: sticky;
    top: 92px;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 18px;
    background: #0f172a;
    margin-bottom: 18px;
}

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

.detail-facts {
    display: grid;
    gap: 12px;
    color: #cbd5e1;
}

.detail-facts div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    padding-bottom: 10px;
}

.detail-facts span:first-child {
    color: #94a3b8;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.detail-copy {
    margin-top: 26px;
}

.detail-copy h2 {
    margin: 0 0 14px;
    font-size: 1.35rem;
}

.detail-copy p {
    margin: 0 0 16px;
    color: #cbd5e1;
}

.related-block {
    margin-top: 34px;
}

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 42px;
    padding: 46px 0;
}

.footer-brand p {
    max-width: 460px;
    color: #94a3b8;
    line-height: 1.8;
}

.footer-links {
    display: grid;
    gap: 10px;
    align-content: start;
}

.footer-links h2 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.footer-links a {
    color: #94a3b8;
}

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

.footer-bottom {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    padding: 18px 0 28px;
    font-size: 0.92rem;
}

.empty-state {
    color: #cbd5e1;
    border: 1px dashed rgba(148, 163, 184, 0.24);
    border-radius: 18px;
    padding: 28px;
    background: rgba(15, 23, 42, 0.42);
}

@media (max-width: 1040px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .mobile-panel.open {
        display: block;
    }

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

    .detail-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .detail-panel {
        position: static;
    }
}

@media (max-width: 680px) {
    .header-inner {
        min-height: 64px;
    }

    .hero {
        min-height: 540px;
    }

    .hero-content {
        bottom: 74px;
    }

    .hero-control {
        display: none;
    }

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

    .rank-row {
        grid-template-columns: auto 96px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-info p {
        display: none;
    }

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

    .page-title {
        padding: 22px;
    }
}
