:root {
    --page-bg: #020617;
    --panel-bg: #0f172a;
    --panel-soft: #111827;
    --panel-hover: #1e293b;
    --line: #1f2937;
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --ocean: #0ea5e9;
    --ocean-dark: #0284c7;
    --ocean-soft: rgba(14, 165, 233, 0.18);
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--page-bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    margin: 0;
    background: radial-gradient(circle at 10% 0%, rgba(14, 165, 233, 0.16), transparent 28%), var(--page-bg);
    color: var(--text);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-container {
    width: min(100% - 32px, 1280px);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--ocean), #38bdf8);
    color: #fff;
    font-size: 15px;
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.28);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-title {
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-subtitle {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link,
.mobile-link {
    border-radius: 12px;
    color: var(--muted-strong);
    font-size: 14px;
    font-weight: 650;
    transition: 0.2s ease;
}

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

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover {
    background: var(--ocean-dark);
    color: #fff;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    border-radius: 999px;
    background: var(--muted-strong);
}

.mobile-nav {
    display: none;
    padding: 8px 16px 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: #0f172a;
}

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

.mobile-link {
    display: block;
    padding: 13px 14px;
}

.hero-carousel {
    position: relative;
    height: 60vh;
    min-height: 520px;
    overflow: hidden;
    background: #020617;
}

.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-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0f172a, #020617);
}

.hero-bg img,
.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg img.image-missing,
.detail-bg img.image-missing,
.poster-shell img.image-missing,
.rank-poster img.image-missing {
    opacity: 0;
}

.hero-bg span {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.16));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    height: 100%;
}

.hero-copy {
    width: min(680px, 100%);
    animation: fadeIn 0.48s ease both;
}

.hero-badge,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 18px;
    padding: 8px 15px;
    border-radius: 999px;
    background: var(--ocean-dark);
    color: #fff;
    font-size: 14px;
    font-weight: 750;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    color: #fff;
    font-weight: 850;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.hero-copy h1 {
    font-size: clamp(42px, 6vw, 72px);
}

.hero-line,
.detail-line {
    margin: 20px 0 0;
    color: var(--muted-strong);
    font-size: clamp(17px, 2vw, 20px);
    line-height: 1.8;
}

.hero-meta {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 14px;
}

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

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: var(--muted-strong);
    font-size: 12px;
}

.hero-tags,
.detail-tags {
    margin-top: 20px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 12px;
    font-weight: 800;
    transition: 0.2s ease;
}

.btn-primary {
    background: var(--ocean);
    color: #fff;
    box-shadow: 0 18px 36px rgba(14, 165, 233, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    background: var(--ocean-dark);
}

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    backdrop-filter: blur(10px);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.16);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.11);
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

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

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

.hero-dot.is-active {
    width: 32px;
    background: #fff;
}

.site-section {
    padding: 54px 0;
}

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

.section-heading h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.2;
}

.section-heading p {
    margin: 9px 0 0;
    color: var(--muted);
}

.section-more {
    flex-shrink: 0;
    color: #38bdf8;
    font-size: 14px;
    font-weight: 800;
}

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

.large-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.92);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
    transition: 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.3);
    background: var(--panel-hover);
    box-shadow: var(--shadow-soft);
}

.poster-shell {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: radial-gradient(circle at 30% 20%, rgba(14, 165, 233, 0.32), transparent 35%), linear-gradient(135deg, #0f172a, #020617);
}

.movie-card-large .poster-shell {
    aspect-ratio: 16 / 9;
}

.poster-shell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.2s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.78));
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.88);
    color: #fff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
    transition: 0.2s ease;
}

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

.type-pill {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.76);
    color: #fff;
    font-size: 12px;
    font-weight: 750;
}

.card-content {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.card-title {
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.45;
}

.card-desc {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-meta {
    color: #64748b;
    font-size: 12px;
}

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 168px 1fr;
    min-height: 112px;
}

.movie-card-horizontal .poster-shell {
    aspect-ratio: auto;
    min-height: 112px;
}

.movie-card-horizontal .tag-row {
    display: none;
}

.highlight-section {
    padding: 36px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.8);
}

.rail-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 2px 16px;
    scroll-snap-type: x proximity;
}

.rail-row .movie-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
}

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

.category-card {
    display: grid;
    min-height: 150px;
    align-content: space-between;
    gap: 14px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.94));
    transition: 0.22s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: var(--shadow-soft);
}

.category-card span {
    color: #fff;
    font-size: 20px;
    font-weight: 850;
}

.category-card strong {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.7;
}

.category-card em {
    color: #38bdf8;
    font-size: 13px;
    font-style: normal;
    font-weight: 800;
}

.category-card-wide {
    min-height: 190px;
}

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

.year-layout {
    display: grid;
    gap: 24px;
}

.year-block {
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.82);
}

.year-block h3 {
    margin: 0 0 18px;
    color: #fff;
    font-size: 22px;
}

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

.page-hero {
    padding: 70px 0 18px;
}

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

.page-hero p {
    width: min(760px, 100%);
    margin: 18px 0 0;
    color: var(--muted-strong);
    font-size: 18px;
    line-height: 1.8;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.82);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 12px;
    outline: none;
    background: #020617;
    color: #fff;
    padding: 0 13px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(56, 189, 248, 0.72);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 540px;
    padding: 76px 0;
}

.detail-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0f172a, #020617);
}

.detail-bg span {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.5));
    backdrop-filter: blur(4px);
}

.detail-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    align-items: center;
    gap: 42px;
}

.detail-cover {
    border-radius: 22px;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
}

.detail-copy h1 {
    font-size: clamp(36px, 5vw, 64px);
}

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

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

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

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.24), rgba(0, 0, 0, 0.56));
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.player-start span {
    display: grid;
    width: 74px;
    height: 74px;
    place-items: center;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.92);
    box-shadow: 0 20px 42px rgba(14, 165, 233, 0.28);
}

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

.player-message {
    position: absolute;
    right: 18px;
    bottom: 18px;
    max-width: min(420px, calc(100% - 36px));
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.88);
    color: #fff;
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.player-message.is-visible {
    opacity: 1;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.content-card {
    padding: 26px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.84);
}

.content-card h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 24px;
}

.content-card p {
    margin: 0;
    color: var(--muted-strong);
    line-height: 1.9;
}

.meta-card {
    grid-column: 1 / -1;
}

.meta-card dl {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.meta-card div {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: 15px;
    background: rgba(2, 6, 23, 0.62);
}

.meta-card dt {
    color: #64748b;
    font-size: 12px;
}

.meta-card dd {
    margin: 0;
    color: #fff;
    font-weight: 800;
}

.meta-card a {
    color: #38bdf8;
}

.hot-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hot-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 78px;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.84);
}

.hot-index {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    background: var(--ocean-soft);
    color: #38bdf8;
    font-weight: 900;
}

.hot-score {
    justify-self: end;
    color: #fbbf24;
    font-weight: 900;
}

.rank-item {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.rank-poster {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f172a, #020617);
}

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

.rank-info {
    display: grid;
    gap: 4px;
}

.rank-info strong {
    color: #fff;
    font-size: 16px;
}

.rank-info em,
.rank-info span {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-footer {
    margin-top: 40px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(15, 23, 42, 0.82);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 34px;
    padding: 44px 0;
}

.footer-brand p,
.footer-bottom p {
    color: var(--muted);
    line-height: 1.8;
}

.footer-logo {
    margin-bottom: 14px;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #fff;
}

.site-footer ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a {
    color: var(--muted);
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: #38bdf8;
}

.footer-bottom {
    padding: 18px 0 30px;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.is-filter-hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

    .menu-button {
        display: block;
    }

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

    .hero-arrow {
        display: none;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

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

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

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

    .detail-cover {
        width: min(280px, 70vw);
    }

    .detail-content {
        grid-template-columns: 1fr;
    }

    .meta-card dl {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 560px) {
    .site-container {
        width: min(100% - 24px, 1280px);
    }

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

    .brand-subtitle {
        font-size: 11px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 34px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .large-grid,
    .movie-grid,
    .catalog-grid,
    .compact-grid,
    .related-grid,
    .category-grid,
    .overview-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-horizontal {
        grid-template-columns: 120px 1fr;
    }

    .highlight-section {
        padding: 24px 14px;
        border-radius: 22px;
    }

    .hot-row {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .hot-score {
        grid-column: 2;
        justify-self: start;
    }

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

    .meta-card dl {
        grid-template-columns: 1fr;
    }
}
