:root {
    color-scheme: dark;
    --page-bg: #020617;
    --panel-bg: rgba(15, 23, 42, 0.82);
    --panel-soft: rgba(22, 78, 99, 0.34);
    --line: rgba(103, 232, 249, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --cyan: #22d3ee;
    --teal: #2dd4bf;
    --green: #5eead4;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.site-body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.22), transparent 34rem),
        radial-gradient(circle at top right, rgba(45, 212, 191, 0.18), transparent 32rem),
        linear-gradient(135deg, #020617 0%, #0f172a 42%, #083344 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(17, 94, 89, 0.94), rgba(8, 145, 178, 0.9), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid rgba(103, 232, 249, 0.18);
    box-shadow: 0 18px 60px rgba(2, 6, 23, 0.35);
    backdrop-filter: blur(16px);
}

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

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    box-shadow: 0 14px 34px rgba(34, 211, 238, 0.25);
}

.brand-text {
    font-size: 21px;
    background: linear-gradient(90deg, #a5f3fc, #99f6e4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 0;
}

.nav-link {
    font-size: 15px;
    color: #ecfeff;
    opacity: 0.9;
    transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #67e8f9;
    opacity: 1;
    transform: translateY(-1px);
}

.nav-link-soft {
    color: #ccfbf1;
    font-size: 14px;
}

.header-search {
    display: flex;
    align-items: center;
    width: min(310px, 26vw);
    border: 1px solid rgba(103, 232, 249, 0.25);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.header-search input,
.filter-box input {
    width: 100%;
    border: 0;
    outline: 0;
    color: white;
    background: transparent;
}

.header-search input {
    padding: 10px 14px;
}

.header-search input::placeholder,
.filter-box input::placeholder {
    color: rgba(207, 250, 254, 0.58);
}

.header-search button {
    height: 100%;
    padding: 10px 16px;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    font-weight: 700;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(103, 232, 249, 0.25);
    background: rgba(255, 255, 255, 0.08);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-button span {
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 99px;
}

.mobile-menu {
    display: none;
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mobile-menu.is-open {
    display: grid;
}

.mobile-link {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(103, 232, 249, 0.18);
    color: #ecfeff;
}

.hero-carousel {
    position: relative;
    width: min(1500px, calc(100% - 32px));
    height: min(720px, 72vh);
    min-height: 520px;
    margin: 28px auto 0;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(103, 232, 249, 0.18);
    background: #0f172a;
}

.hero-stage,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(8, 47, 73, 0.72) 42%, rgba(2, 6, 23, 0.16) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.12) 54%, rgba(2, 6, 23, 0.2) 100%);
}

.hero-content {
    position: absolute;
    left: clamp(24px, 6vw, 90px);
    bottom: clamp(42px, 10vh, 120px);
    width: min(760px, calc(100% - 48px));
}

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

.hero-content h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 84px);
    line-height: 0.95;
    font-weight: 950;
    letter-spacing: -0.05em;
    text-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
}

.hero-content p {
    width: min(620px, 100%);
    margin: 22px 0 0;
    color: #dff9ff;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.75;
}

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

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

.primary-button {
    color: #042f2e;
    background: linear-gradient(135deg, #67e8f9, #5eead4);
    box-shadow: 0 18px 50px rgba(45, 212, 191, 0.26);
}

.ghost-button,
.section-more {
    color: #ecfeff;
    border: 1px solid rgba(103, 232, 249, 0.28);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 32px;
    line-height: 1;
    background: rgba(15, 23, 42, 0.56);
    backdrop-filter: blur(12px);
    transform: translateY(-50%);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    left: clamp(24px, 6vw, 90px);
    bottom: 28px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 28px;
    height: 5px;
    border-radius: 999px;
    color: transparent;
    background: rgba(255, 255, 255, 0.38);
}

.hero-dots button.is-active {
    width: 52px;
    background: linear-gradient(90deg, var(--cyan), var(--teal));
}

.section-block,
.page-main,
.detail-main {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
}

.section-block {
    padding: 74px 0 0;
}

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

.section-head.slim {
    margin-bottom: 18px;
}

.section-head h2,
.page-hero h1,
.detail-intro h1 {
    margin: 0;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.section-head h2 {
    font-size: clamp(28px, 3vw, 42px);
}

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

.home-grid,
.latest-grid,
.related-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

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

.movie-card {
    min-width: 0;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(8, 47, 73, 0.56));
    border: 1px solid rgba(103, 232, 249, 0.14);
    box-shadow: 0 18px 50px 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(103, 232, 249, 0.42);
    box-shadow: 0 24px 70px rgba(8, 145, 178, 0.18);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #164e63, #0f172a);
}

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

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

.poster-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #042f2e;
    background: rgba(103, 232, 249, 0.92);
    font-size: 12px;
    font-weight: 900;
}

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

.movie-card-body h2 {
    margin: 8px 0 8px;
    color: white;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 850;
}

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

.movie-card-body p {
    min-height: 44px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.movie-meta-row,
.tag-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.movie-meta-row span {
    color: #a5f3fc;
    font-size: 12px;
}

.tag-row {
    margin-top: 13px;
}

.tag-row span {
    padding: 5px 8px;
    border-radius: 999px;
    color: #ccfbf1;
    background: rgba(20, 184, 166, 0.14);
    border: 1px solid rgba(94, 234, 212, 0.18);
    font-size: 12px;
}

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

.category-tile,
.category-overview-card a {
    display: flex;
    flex-direction: column;
    min-height: 170px;
    padding: 22px;
    border-radius: 24px;
    border: 1px solid rgba(103, 232, 249, 0.16);
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 55%),
        rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.2);
}

.category-tile span,
.category-overview-card h2 {
    color: white;
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong,
.category-overview-card p {
    margin-top: 12px;
    color: var(--muted);
    line-height: 1.7;
    font-weight: 500;
}

.category-tile em,
.category-overview-card strong {
    margin-top: auto;
    color: #67e8f9;
    font-style: normal;
    font-weight: 850;
}

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

.rank-panel,
.page-hero,
.detail-layout,
.player-card,
.detail-content article,
.detail-neighbors,
.rank-page-list {
    border: 1px solid rgba(103, 232, 249, 0.16);
    background: rgba(15, 23, 42, 0.74);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.rank-panel {
    position: sticky;
    top: 94px;
    padding: 22px;
    border-radius: 26px;
}

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

.rank-page-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 20px;
    border-radius: 26px;
}

.rank-item {
    display: grid;
    grid-template-columns: 46px 56px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

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

.rank-num {
    color: #67e8f9;
    font-size: 20px;
    font-weight: 950;
}

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info strong {
    color: white;
    font-weight: 850;
}

.rank-info em {
    margin-top: 5px;
    color: var(--soft);
    font-size: 13px;
    font-style: normal;
}

.page-main {
    padding-top: 34px;
}

.page-hero {
    padding: clamp(32px, 6vw, 64px);
    border-radius: 30px;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.25), transparent 42%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.78));
}

.page-hero h1 {
    font-size: clamp(38px, 6vw, 66px);
}

.page-hero p {
    width: min(820px, 100%);
    color: #dff9ff;
    line-height: 1.8;
    font-size: 18px;
}

.filter-box {
    width: min(740px, 100%);
    margin-top: 24px;
    padding: 14px 18px;
    border: 1px solid rgba(103, 232, 249, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.filter-box input {
    font-size: 17px;
}

.category-overview-card h2,
.category-overview-card p {
    margin: 0;
}

.mini-title-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
}

.mini-title-list span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ccfbf1;
    background: rgba(255, 255, 255, 0.06);
}

.detail-main {
    padding-top: 28px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    color: #a5f3fc;
    font-size: 14px;
}

.breadcrumbs strong {
    color: white;
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 30px;
    padding: 28px;
    border-radius: 30px;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

.detail-intro {
    align-self: center;
}

.detail-intro h1 {
    margin-top: 18px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.05;
}

.detail-one-line {
    margin: 22px 0 0;
    width: min(820px, 100%);
    color: #dff9ff;
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(103, 232, 249, 0.18);
    background: rgba(255, 255, 255, 0.06);
}

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

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    aspect-ratio: 16 / 9;
    background: #020617;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    color: white;
    background:
        radial-gradient(circle, rgba(34, 211, 238, 0.24), transparent 28%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.75));
    cursor: pointer;
}

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

.play-icon {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #042f2e;
    background: linear-gradient(135deg, #67e8f9, #5eead4);
    font-size: 28px;
    box-shadow: 0 24px 70px rgba(45, 212, 191, 0.35);
}

.player-overlay strong {
    max-width: 80%;
    text-align: center;
    font-size: clamp(24px, 4vw, 42px);
    font-weight: 950;
}

.detail-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    padding-top: 30px;
}

.detail-content article {
    padding: 28px;
    border-radius: 26px;
}

.detail-content h2 {
    margin: 0 0 14px;
    color: white;
    font-size: 24px;
    font-weight: 900;
}

.detail-content p {
    margin: 0;
    color: var(--muted);
    line-height: 1.9;
    font-size: 16px;
}

.detail-neighbors {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    padding: 18px 22px;
    border-radius: 22px;
}

.detail-neighbors a {
    color: #a5f3fc;
    font-weight: 800;
}

.related-block {
    padding-bottom: 72px;
}

.site-footer {
    margin-top: 80px;
    border-top: 1px solid rgba(103, 232, 249, 0.14);
    background: rgba(2, 6, 23, 0.72);
}

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

.footer-brand p {
    color: var(--soft);
    line-height: 1.75;
    margin: 18px 0 0;
}

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

.footer-group h2 {
    margin: 0 0 8px;
    color: white;
    font-size: 18px;
}

.footer-group a {
    color: var(--muted);
}

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

.footer-bottom {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: var(--soft);
    border-top: 1px solid rgba(103, 232, 249, 0.1);
}

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

@media (max-width: 1200px) {
    .movie-grid,
    .home-grid,
    .latest-grid,
    .related-grid,
    .category-movie-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .rank-panel {
        position: static;
    }
}

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

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

    .hero-carousel {
        height: 620px;
        min-height: 620px;
        border-radius: 22px;
    }

    .hero-overlay {
        background: linear-gradient(0deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.44) 70%, rgba(2, 6, 23, 0.2) 100%);
    }

    .hero-content {
        left: 22px;
        right: 22px;
        bottom: 74px;
        width: auto;
    }

    .hero-arrow {
        display: none;
    }

    .movie-grid,
    .home-grid,
    .latest-grid,
    .related-grid,
    .category-movie-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }

    .category-grid,
    .category-overview-grid,
    .rank-page-list,
    .detail-content,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 620px) {
    .header-inner,
    .section-block,
    .page-main,
    .detail-main,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 24px, 1440px);
    }

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

    .hero-carousel {
        width: min(100% - 24px, 1500px);
        min-height: 560px;
        margin-top: 16px;
    }

    .hero-content h1 {
        font-size: 42px;
    }

    .hero-content p {
        font-size: 15px;
    }

    .hero-actions,
    .detail-actions,
    .detail-neighbors {
        flex-direction: column;
    }

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

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

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

    .movie-card-body p,
    .tag-row {
        display: none;
    }

    .page-hero,
    .detail-layout,
    .detail-content article {
        padding: 22px;
        border-radius: 22px;
    }

    .player-card {
        border-radius: 22px;
    }
}
