:root {
    --page-bg: #06111f;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --line: rgba(148, 163, 184, 0.22);
    --blue: #38bdf8;
    --blue-deep: #2563eb;
    --gold: #fbbf24;
    --rose: #fb7185;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(2, 8, 23, 0.42);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.22), transparent 34rem),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 30rem),
        linear-gradient(180deg, #06111f 0%, #0f172a 46%, #111827 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.locked {
    overflow: hidden;
}

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

img {
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(6, 17, 31, 0.78);
    backdrop-filter: blur(20px);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--blue-deep));
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.35);
}

.logo-text {
    font-size: 1.18rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    color: var(--muted);
    font-weight: 600;
}

.main-nav a,
.mobile-nav a,
.footer-links a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-nav a.active,
.footer-links a:hover {
    color: var(--blue);
}

.nav-button,
.hero-button,
.small-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--blue-deep));
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.28);
    font-weight: 700;
}

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

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel-strong);
}

.mobile-nav a {
    display: block;
    padding: 12px 14px;
    color: var(--muted);
    border-radius: 12px;
}

.mobile-nav a:hover {
    background: rgba(255, 255, 255, 0.06);
}

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

.hero-carousel {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    min-height: 680px;
    margin: 28px auto 56px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 34px;
    background: #020617;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 34px;
    align-items: center;
    padding: 96px 68px 76px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(3px) saturate(1.08);
    opacity: 0.32;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.25)),
        radial-gradient(circle at 80% 30%, rgba(56, 189, 248, 0.24), transparent 24rem);
}

.hero-content,
.hero-poster-panel {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(125, 211, 252, 0.34);
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.14);
    font-size: 0.88rem;
    font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
    margin: 0;
}

.hero-content h1 {
    max-width: 760px;
    font-size: clamp(2.5rem, 6vw, 5.8rem);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero-content h2 {
    margin-top: 22px;
    color: var(--gold);
    font-size: clamp(1.6rem, 3vw, 3rem);
    font-weight: 800;
}

.hero-content p {
    max-width: 720px;
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.9;
}

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

.hero-button.secondary,
.small-button.secondary {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.hero-search {
    display: flex;
    gap: 10px;
    width: min(620px, 100%);
    margin-top: 26px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
}

.hero-search input,
.filter-input,
.filter-select,
.search-panel input,
.search-panel select {
    width: 100%;
    border: 1px solid var(--line);
    outline: none;
    color: var(--text);
    background: rgba(15, 23, 42, 0.8);
}

.hero-search input {
    min-width: 0;
    padding: 0 18px;
    border: 0;
    background: transparent;
}

.hero-search button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--blue-deep));
    font-weight: 800;
}

.hero-poster-panel {
    justify-self: end;
    width: min(360px, 100%);
}

.hero-poster-card {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(15, 23, 42, 0.75);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

.hero-poster-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.hero-poster-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 60px 20px 20px;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.hero-poster-info span {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(251, 191, 36, 0.16);
    font-size: 0.78rem;
    font-weight: 800;
}

.hero-poster-info strong {
    display: block;
    font-size: 1.28rem;
}

.hero-dots {
    position: absolute;
    z-index: 5;
    right: 40px;
    bottom: 34px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 42px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

.hero-dot.is-active {
    background: var(--blue);
}

.quick-links {
    position: absolute;
    left: 68px;
    right: 68px;
    bottom: 28px;
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 740px;
}

.quick-links a {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.88rem;
}

.section {
    margin: 58px 0;
}

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

.section-kicker {
    color: var(--blue);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section h2,
.listing-head h1,
.detail-title h1,
.simple-hero h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-head p,
.simple-hero p,
.listing-head p,
.detail-title p {
    color: var(--muted);
    line-height: 1.8;
}

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 20px 50px rgba(2, 8, 23, 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(56, 189, 248, 0.52);
    box-shadow: 0 28px 70px rgba(8, 47, 73, 0.35);
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    background: #020617;
}

.poster-wrap img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.36s ease;
}

.poster-year,
.poster-type,
.rank-badge {
    position: absolute;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.poster-year {
    top: 10px;
    left: 10px;
    background: rgba(37, 99, 235, 0.72);
}

.poster-type {
    right: 10px;
    bottom: 10px;
    background: rgba(15, 23, 42, 0.72);
}

.rank-badge {
    top: 10px;
    right: 10px;
    background: rgba(251, 191, 36, 0.82);
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.movie-card h3 {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.38;
}

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #bae6fd;
    font-size: 0.82rem;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.tag-row span {
    padding: 5px 8px;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.07);
    font-size: 0.76rem;
}

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

.category-card {
    min-height: 210px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.16), transparent 12rem),
        rgba(15, 23, 42, 0.76);
    transition: transform 0.24s ease, border-color 0.24s ease;
}

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

.category-card h3 {
    margin: 0 0 8px;
    font-size: 1.3rem;
}

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

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

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

.ranking-row {
    display: grid;
    grid-template-columns: 46px 54px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.7);
}

.ranking-row:hover {
    border-color: rgba(56, 189, 248, 0.46);
}

.ranking-number {
    color: var(--gold);
    font-size: 1.2rem;
    font-weight: 900;
    text-align: center;
}

.ranking-row img {
    width: 54px;
    height: 76px;
    border-radius: 12px;
    object-fit: cover;
}

.ranking-title {
    min-width: 0;
    overflow: hidden;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-meta {
    color: var(--soft);
    font-size: 0.86rem;
}

.simple-hero,
.listing-head,
.detail-hero {
    margin: 28px 0 34px;
    padding: 42px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 32px;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.16), transparent 28rem),
        rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

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

.breadcrumbs a {
    color: #bae6fd;
}

.filter-bar,
.search-panel {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 12px;
    margin: 24px 0;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.filter-input,
.filter-select,
.search-panel input,
.search-panel select {
    min-height: 48px;
    padding: 0 14px;
    border-radius: 14px;
}

.empty-state {
    display: none;
    padding: 34px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.72);
    text-align: center;
}

.detail-hero {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 34px;
    align-items: start;
}

.detail-poster {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #020617;
}

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

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

.detail-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.detail-facts span {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.07);
}

.player-section,
.story-section {
    margin: 34px 0;
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
}

.player-section h2,
.story-section h2 {
    margin: 0 0 18px;
    font-size: 1.6rem;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    aspect-ratio: 16 / 9;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.2), rgba(2, 6, 23, 0.78));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-overlay span {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--blue), var(--blue-deep));
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.42);
    font-size: 2rem;
}

.play-overlay strong {
    font-size: 1.1rem;
}

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

.story-section p {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.9;
}

.search-results {
    margin-top: 24px;
}

.site-footer {
    margin-top: 70px;
    padding: 42px 0 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.45);
}

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

.footer-inner p {
    max-width: 520px;
    color: var(--soft);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: var(--muted);
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 22px auto 0;
    color: #64748b;
}

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

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

    .hero-slide,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .hero-poster-panel {
        justify-self: start;
        width: min(300px, 100%);
    }

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

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

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-nav.is-open {
        display: block;
    }

    .hero-carousel {
        min-height: 900px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 58px 24px 120px;
    }

    .quick-links {
        left: 24px;
        right: 24px;
    }

    .hero-dots {
        right: 24px;
    }

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

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

    .ranking-row {
        grid-template-columns: 38px 48px 1fr;
    }

    .ranking-meta {
        display: none;
    }

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

@media (max-width: 560px) {
    main,
    .nav-shell,
    .mobile-nav,
    .footer-inner,
    .copyright,
    .hero-carousel {
        width: min(100% - 20px, 1180px);
    }

    .hero-carousel {
        min-height: 860px;
        margin-top: 16px;
    }

    .hero-search {
        border-radius: 22px;
        flex-direction: column;
    }

    .hero-search input {
        min-height: 42px;
    }

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

    .simple-hero,
    .listing-head,
    .detail-hero,
    .player-section,
    .story-section {
        padding: 24px;
        border-radius: 22px;
    }

    .detail-hero {
        gap: 24px;
    }

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