:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(255, 255, 255, 0.12);
    --text: #ffffff;
    --muted: #94a3b8;
    --cyan: #06b6d4;
    --cyan-deep: #0891b2;
    --orange: #f97316;
    --pink: #ec4899;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(8, 145, 178, 0.28), transparent 32rem),
        radial-gradient(circle at top right, rgba(236, 72, 153, 0.18), transparent 32rem),
        var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.nav-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(8, 47, 73, 0.96), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1240px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
    color: #ffffff;
    box-shadow: 0 14px 36px rgba(6, 182, 212, 0.3);
}

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

.brand-text strong {
    font-size: 18px;
    letter-spacing: 0.02em;
}

.brand-text small {
    margin-top: 4px;
    color: #67e8f9;
    font-size: 12px;
}

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

.main-nav a {
    color: rgba(255, 255, 255, 0.86);
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
    color: #67e8f9;
    transform: translateY(-1px);
}

.nav-search {
    display: flex;
    align-items: center;
    min-width: 280px;
    border: 1px solid rgba(103, 232, 249, 0.26);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.45);
}

.nav-search input,
.mobile-panel input,
.hero-search input,
.quick-search input,
.filter-box input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
}

.nav-search input {
    padding: 11px 16px;
}

.nav-search button,
.mobile-panel button,
.hero-search button,
.quick-search button {
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
    font-weight: 700;
    padding: 11px 18px;
    cursor: pointer;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.mobile-panel {
    display: none;
}

.hero {
    position: relative;
    min-height: 720px;
    overflow: hidden;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.06);
    filter: saturate(1.12);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.92)),
        linear-gradient(0deg, var(--bg), rgba(2, 6, 23, 0.1) 48%, rgba(2, 6, 23, 0.8));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    min-height: 720px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 56px;
    padding: 56px 0 80px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #67e8f9;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(38px, 7vw, 74px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
    margin: 22px 0 0;
    max-width: 760px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.hero-tags span,
.detail-tags span,
.detail-facts span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid rgba(103, 232, 249, 0.24);
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(8, 145, 178, 0.16);
}

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

.primary-button,
.ghost-button,
.card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
    box-shadow: 0 18px 36px rgba(8, 145, 178, 0.28);
}

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

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
}

.hero-poster {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: inherit;
}

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

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

.hero-dots button.active {
    background: #67e8f9;
}

.quick-search,
.surface-card,
.toolbar {
    width: min(1240px, calc(100% - 32px));
    margin: 28px auto 0;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 520px);
    align-items: center;
    gap: 24px;
}

.quick-search h2,
.toolbar h2,
.ranking-card h2,
.section-heading h2,
.detail-article h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
}

.quick-search form,
.hero-search {
    display: flex;
    border: 1px solid rgba(103, 232, 249, 0.26);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.52);
}

.quick-search input,
.hero-search input {
    padding: 16px 18px;
}

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

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

.section-heading a {
    color: #67e8f9;
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.7);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.22);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(103, 232, 249, 0.38);
    box-shadow: 0 24px 70px rgba(8, 145, 178, 0.2);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.9);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 4 / 5.4;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 55%);
}

.poster-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ecfeff;
    background: rgba(8, 145, 178, 0.88);
    font-size: 12px;
    font-weight: 800;
}

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

.movie-card-body h2 {
    margin: 0;
    font-size: 19px;
    line-height: 1.35;
}

.movie-card-body h2 a:hover {
    color: #67e8f9;
}

.movie-meta {
    margin: 8px 0 0;
    color: #94a3b8;
    font-size: 13px;
}

.movie-one-line {
    min-height: 52px;
    margin: 12px 0 16px;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.7;
}

.card-action {
    min-height: 36px;
    padding: 0 15px;
    color: #67e8f9;
    border: 1px solid rgba(103, 232, 249, 0.22);
    background: rgba(8, 145, 178, 0.12);
    font-size: 13px;
}

.movie-card-compact .movie-card-body h2 {
    font-size: 17px;
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.76);
    box-shadow: var(--shadow);
}

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    filter: saturate(1.08);
    transition: transform 0.35s ease;
}

.category-tile:hover img {
    transform: scale(1.07);
}

.category-tile span {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.08));
}

.category-tile strong,
.category-tile small {
    position: absolute;
    left: 20px;
    right: 20px;
}

.category-tile strong {
    bottom: 70px;
    font-size: 24px;
}

.category-tile small {
    bottom: 22px;
    color: #cbd5e1;
    line-height: 1.5;
}

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

.ranking-card {
    position: sticky;
    top: 96px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-strong);
    box-shadow: var(--shadow);
}

.ranking-card ol {
    display: grid;
    gap: 12px;
    margin: 22px 0;
    padding: 0;
    list-style: none;
}

.ranking-card li a {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
}

.ranking-card li a:hover {
    background: rgba(8, 145, 178, 0.2);
}

.ranking-card span,
.ranking-number {
    color: #67e8f9;
    font-weight: 900;
}

.ranking-card small {
    color: #94a3b8;
}

.full {
    width: 100%;
}

.page-hero {
    width: min(1240px, calc(100% - 32px));
    margin: 36px auto 0;
    padding: 66px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        linear-gradient(135deg, rgba(8, 145, 178, 0.25), rgba(236, 72, 153, 0.13)),
        rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
}

.slim-hero h1,
.category-hero h1 {
    max-width: 860px;
}

.category-nav-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.category-nav-row a {
    padding: 9px 13px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.05);
}

.category-nav-row a.active,
.category-nav-row a:hover {
    color: #ffffff;
    border-color: rgba(103, 232, 249, 0.44);
    background: rgba(8, 145, 178, 0.28);
}

.toolbar {
    margin: 0 0 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.filter-box {
    width: min(100%, 360px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid rgba(103, 232, 249, 0.24);
    border-radius: 999px;
    color: #94a3b8;
    background: rgba(2, 6, 23, 0.5);
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
}

.category-cover {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
}

.category-cover img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
}

.category-cover span {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(8, 145, 178, 0.88);
    font-weight: 800;
}

.category-overview-card h2 {
    margin: 6px 0 12px;
    font-size: 26px;
}

.category-overview-card p {
    color: #cbd5e1;
    line-height: 1.7;
}

.mini-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.mini-link-list a {
    padding: 7px 10px;
    border-radius: 999px;
    color: #67e8f9;
    background: rgba(8, 145, 178, 0.14);
}

.ranking-list {
    display: grid;
    gap: 18px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 82px 150px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
}

.ranking-number {
    font-size: 28px;
}

.ranking-poster {
    overflow: hidden;
    border-radius: 16px;
}

.ranking-poster img {
    width: 100%;
    aspect-ratio: 4 / 5.2;
    object-fit: cover;
}

.ranking-row h2 {
    margin: 0;
    font-size: 24px;
}

.ranking-row p {
    color: #cbd5e1;
    line-height: 1.7;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(3px) saturate(1.1);
    transform: scale(1.04);
}

.detail-backdrop::after {
    content: "";
    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.94)),
        linear-gradient(0deg, var(--bg), rgba(2, 6, 23, 0.16));
}

.detail-wrap {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    align-items: center;
    gap: 46px;
    padding: 60px 0;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

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

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    color: #94a3b8;
}

.breadcrumb a:hover {
    color: #67e8f9;
}

.detail-main {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    align-items: start;
    gap: 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(103, 232, 249, 0.22);
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow);
}

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

.player-start {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(8, 145, 178, 0.24), rgba(0, 0, 0, 0.72));
    cursor: pointer;
}

.player-start span {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
    box-shadow: 0 16px 40px rgba(8, 145, 178, 0.38);
}

.player-start strong {
    font-size: 20px;
}

.player-start[hidden] {
    display: none;
}

.detail-article {
    margin: 0;
}

.detail-article p {
    color: #dbeafe;
    font-size: 16px;
    line-height: 1.9;
}

.detail-article h2 + p {
    margin-top: 12px;
}

.detail-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.search-summary {
    min-height: 30px;
    margin-bottom: 24px;
    color: #cbd5e1;
    font-weight: 700;
}

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

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

.site-footer p {
    max-width: 520px;
    color: #94a3b8;
    line-height: 1.7;
}

.site-footer h2 {
    margin: 0 0 16px;
    color: #67e8f9;
    font-size: 18px;
}

.site-footer a:not(.brand) {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

.site-footer a:hover {
    color: #67e8f9;
}

.footer-bottom {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 30px;
    color: #64748b;
}

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

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

    .hero-content,
    .split-layout,
    .detail-main {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

    .ranking-card {
        position: static;
    }
}

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

    .nav-toggle {
        display: grid;
        place-items: center;
        margin-left: auto;
    }

    .mobile-panel {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        display: none;
        padding: 18px;
        background: rgba(2, 6, 23, 0.98);
        border-bottom: 1px solid var(--line);
    }

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

    .mobile-panel nav {
        display: grid;
        gap: 12px;
        margin-bottom: 16px;
    }

    .mobile-panel form {
        display: flex;
        overflow: hidden;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.08);
    }

    .mobile-panel input {
        padding: 12px 14px;
    }

    .hero,
    .hero-content {
        min-height: 650px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding-top: 36px;
    }

    .quick-search,
    .toolbar,
    .footer-grid,
    .detail-wrap,
    .category-overview-card,
    .ranking-row {
        grid-template-columns: 1fr;
    }

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

    .page-hero {
        padding: 38px 24px;
    }

    .detail-wrap {
        gap: 28px;
    }

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

@media (max-width: 560px) {
    .brand-text small {
        display: none;
    }

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

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

    .hero-copy p,
    .page-hero p,
    .detail-one-line {
        font-size: 16px;
    }

    .quick-search form,
    .hero-search {
        border-radius: 20px;
        flex-direction: column;
    }

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