:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.78);
    --line: rgba(148, 163, 184, 0.18);
    --text: #e5edf7;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --cyan-deep: #0891b2;
    --orange: #fb923c;
    --green: #34d399;
    --pink: #f472b6;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 8%, rgba(34, 211, 238, 0.16), transparent 30rem),
        radial-gradient(circle at 86% 18%, rgba(244, 114, 182, 0.12), transparent 28rem),
        linear-gradient(180deg, #0f172a 0%, #020617 52%, #020617 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.header-inner,
.footer-inner,
.page-hero,
.content-section,
.detail-wrap,
.category-hero,
.search-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), #67e8f9 45%, #f0abfc);
    box-shadow: 0 12px 32px rgba(34, 211, 238, 0.3);
}

.brand-text {
    font-size: 1.25rem;
    color: white;
}

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

.nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: #cbd5e1;
    transition: 0.24s ease;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(34, 211, 238, 0.14);
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.86);
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 19px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: white;
}

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

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

.mobile-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.mobile-category-links a {
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(148, 163, 184, 0.08);
}

.hero-carousel {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    position: relative;
}

.hero-stage {
    min-height: 620px;
    position: relative;
    border: 1px solid var(--line);
    border-radius: 34px;
    overflow: hidden;
    background: #020617;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) 420px;
    align-items: center;
    gap: 34px;
    padding: 64px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.82) 42%, rgba(2, 6, 23, 0.34) 100%),
        var(--hero-image) center / cover no-repeat;
    transform: scale(1.04);
    filter: saturate(1.15);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 18%, rgba(34, 211, 238, 0.22), transparent 26rem),
        linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.92) 100%);
}

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

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    padding: 8px 14px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.16);
    font-size: 0.9rem;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 18px 0 14px;
    max-width: 780px;
    color: white;
    font-size: clamp(2.35rem, 6vw, 5.2rem);
    line-height: 1.02;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero-copy h2 {
    font-size: clamp(2rem, 4.2vw, 4.2rem);
}

.hero-copy p {
    max-width: 720px;
    color: #cbd5e1;
    font-size: 1.08rem;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    box-shadow: 0 14px 36px rgba(8, 145, 178, 0.32);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 46px rgba(34, 211, 238, 0.34);
}

.btn.secondary {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.74);
    box-shadow: none;
}

.hero-visual {
    justify-self: end;
    width: min(420px, 100%);
}

.hero-poster-card {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
}

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

.hero-poster-card .hero-card-meta {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(14px);
}

.hero-card-meta b {
    display: block;
    color: white;
    font-size: 1.1rem;
}

.hero-card-meta span {
    color: #cbd5e1;
    font-size: 0.92rem;
}

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 48px;
    bottom: 34px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-controls button {
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: white;
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
}

.hero-dots {
    display: flex;
    gap: 8px;
    margin-left: 8px;
}

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

.hero-dots button.active {
    background: var(--cyan);
}

.quick-search {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    width: min(780px, calc(100% - 48px));
    margin: -34px auto 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.quick-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    color: white;
    outline: none;
    background: rgba(2, 6, 23, 0.6);
    padding: 0 15px;
}

.quick-search button,
.filter-panel button {
    min-height: 48px;
    border: 0;
    border-radius: 16px;
    color: #00111a;
    background: var(--cyan);
    font-weight: 800;
    padding: 0 18px;
    cursor: pointer;
}

.content-section,
.category-hero,
.search-hero,
.detail-wrap {
    padding: 62px 0 0;
}

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

.section-heading p,
.category-hero p,
.search-hero p {
    margin: 0 0 6px;
    color: var(--cyan);
    font-weight: 800;
}

.section-heading h2,
.category-hero h1,
.search-hero h1,
.detail-copy h1,
.player-block h2,
.text-block h2 {
    margin: 0;
    color: white;
    font-size: clamp(1.7rem, 3vw, 2.45rem);
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-heading a {
    color: #a5f3fc;
}

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

.movie-card {
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.24);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow: 0 24px 66px rgba(8, 145, 178, 0.18);
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 52%;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.86));
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: rgba(34, 211, 238, 0.85);
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    transition: 0.24s ease;
}

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

.rank-badge {
    position: absolute;
    left: 14px;
    top: 14px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #00111a;
    background: linear-gradient(135deg, #fde68a, #fb923c);
    font-weight: 900;
}

.card-body {
    padding: 17px;
}

.card-body h2 {
    margin: 0 0 8px;
    color: white;
    font-size: 1.08rem;
    line-height: 1.35;
}

.movie-meta,
.movie-desc {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.movie-desc {
    min-height: 45px;
    margin-top: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.tag-row span,
.meta-badges span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(34, 211, 238, 0.1);
    font-size: 0.78rem;
}

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

.category-tile {
    min-height: 168px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background:
        radial-gradient(circle at 80% 18%, rgba(34, 211, 238, 0.2), transparent 12rem),
        rgba(15, 23, 42, 0.72);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.42);
}

.category-tile h2 {
    margin: 0 0 10px;
    color: white;
    font-size: 1.38rem;
}

.category-tile p {
    margin: 0;
    color: var(--muted);
}

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

.rank-layout {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 28px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 46px 76px 1fr;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
    transition: 0.22s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(34, 211, 238, 0.4);
}

.rank-item strong {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #00111a;
    background: var(--cyan);
}

.rank-item img {
    width: 76px;
    height: 94px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-item b,
.rank-item em {
    display: block;
}

.rank-item b {
    color: white;
    font-size: 1rem;
}

.rank-item em {
    margin-top: 4px;
    color: var(--muted);
    font-style: normal;
    font-size: 0.88rem;
}

.list-card {
    display: grid;
    grid-template-columns: 180px 1fr;
}

.list-card .poster-wrap img {
    aspect-ratio: 4 / 5;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, minmax(150px, 0.45fr)) auto;
    gap: 12px;
    margin: 26px 0 30px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.74);
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.84rem;
}

.filter-panel button {
    align-self: end;
}

.hidden-card {
    display: none !important;
}

.detail-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.74)),
        var(--detail-image) center / cover no-repeat;
    box-shadow: var(--shadow);
}

.detail-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    color: #a5f3fc;
    font-size: 0.92rem;
}

.detail-copy h1 {
    font-size: clamp(2rem, 4vw, 4rem);
}

.detail-copy .lead {
    max-width: 820px;
    margin: 16px 0 20px;
    color: #dbeafe;
    font-size: 1.1rem;
}

.meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.player-block,
.text-block,
.related-block {
    margin-top: 38px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
}

.video-player {
    position: relative;
    margin-top: 18px;
    border-radius: 24px;
    overflow: hidden;
    background: black;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    aspect-ratio: 16 / 9;
}

.video-player video {
    width: 100%;
    height: 100%;
    display: block;
    background: black;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: #020617;
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: 0.22s ease;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.18), rgba(2, 6, 23, 0.74) 62%);
}

.player-start {
    position: relative;
    z-index: 4;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 50%;
    color: white;
    background: rgba(34, 211, 238, 0.88);
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 18px 46px rgba(34, 211, 238, 0.32);
}

.player-controls {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    opacity: 0;
    transform: translateY(8px);
    transition: 0.22s ease;
    pointer-events: none;
}

.video-player:hover .player-controls,
.video-player.playing .player-controls {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.player-controls button {
    min-width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    color: white;
    background: rgba(2, 6, 23, 0.62);
    cursor: pointer;
}

.player-message {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 6;
    display: none;
    transform: translate(-50%, -50%);
    padding: 12px 16px;
    border-radius: 999px;
    color: white;
    background: rgba(220, 38, 38, 0.86);
}

.player-message.show {
    display: block;
}

.text-block p {
    margin: 14px 0 0;
    color: #cbd5e1;
    font-size: 1rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

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

.footer-inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 30px;
    padding: 42px 0;
}

.footer-brand p,
.footer-links a,
.copyright {
    color: var(--muted);
}

.footer-links h2 {
    margin: 0 0 14px;
    color: white;
    font-size: 1rem;
}

.footer-links div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

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

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 0.92rem;
}

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

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 44px;
    }

    .hero-visual {
        display: none;
    }

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

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

    .detail-poster {
        width: min(320px, 100%);
    }
}

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

    .mobile-toggle {
        display: block;
    }

    .hero-stage {
        min-height: 560px;
        border-radius: 26px;
    }

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

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

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

    .movie-grid,
    .category-grid,
    .related-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

    .list-card {
        grid-template-columns: 130px 1fr;
    }

    .rank-item {
        grid-template-columns: 38px 62px 1fr;
    }

    .rank-item img {
        width: 62px;
        height: 80px;
    }

    .detail-hero {
        padding: 22px;
        border-radius: 26px;
    }
}

@media (max-width: 480px) {
    .movie-grid {
        gap: 16px;
    }

    .list-card {
        display: block;
    }

    .hero-copy h1,
    .hero-copy h2 {
        font-size: 2.2rem;
    }

    .player-start {
        width: 68px;
        height: 68px;
    }
}
