:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --card: rgba(30, 41, 59, 0.72);
    --card-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-bright: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --yellow: #facc15;
    --danger: #fb7185;
    --radius: 18px;
    --shadow: 0 24px 70px 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(34, 211, 238, 0.16), transparent 34rem), linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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: rgba(15, 23, 42, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.nav-shell,
.footer-shell,
.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.95), rgba(59, 130, 246, 0.75));
    color: white;
    box-shadow: 0 12px 34px rgba(6, 182, 212, 0.32);
}

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

.brand-name {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.76rem;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--muted-bright);
    font-weight: 600;
    font-size: 0.94rem;
}

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

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
    color: var(--cyan);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.72);
    color: var(--text);
    cursor: pointer;
}

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

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

.mobile-nav a:hover {
    background: rgba(30, 41, 59, 0.82);
}

.hero-slider {
    position: relative;
    height: 72vh;
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

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

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

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

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.1)), linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.06) 42%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100% - 1180px) / 2));
    top: 50%;
    width: min(640px, calc(100% - 48px));
    transform: translateY(-50%);
    display: grid;
    gap: 20px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 12px;
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.12);
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 0.08em;
    font-size: 0.82rem;
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: white;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content h1,
.hero-content h2 {
    font-size: clamp(2.6rem, 6vw, 5.6rem);
}

.hero-content p,
.page-hero p,
.detail-one-line {
    margin: 0;
    color: var(--muted-bright);
    font-size: 1.08rem;
    line-height: 1.8;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    color: var(--muted-bright);
}

.hero-meta span,
.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.64);
    border: 1px solid var(--line);
}

.hero-meta span:first-child,
.detail-meta span:first-child {
    color: var(--yellow);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.primary-btn,
.ghost-btn,
.quick-search-form button,
.more-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-btn,
.quick-search-form button {
    border: 0;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-strong));
    color: white;
    box-shadow: 0 14px 36px rgba(6, 182, 212, 0.34);
    cursor: pointer;
}

.ghost-btn,
.more-link {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.primary-btn:hover,
.ghost-btn:hover,
.quick-search-form button:hover,
.more-link:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 3;
}

.hero-controls > button {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    cursor: pointer;
    font-size: 1.8rem;
    backdrop-filter: blur(8px);
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: var(--cyan);
}

.home-shell,
.page-stack {
    display: grid;
    gap: 56px;
    padding: 56px 0;
}

.quick-search,
.content-card,
.filter-panel,
.site-footer,
.category-tile,
.movie-card,
.rank-row,
.latest-row {
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
}

.quick-search {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
    align-items: center;
    padding: 28px;
    border-radius: 24px;
}

.quick-search h2 {
    margin: 14px 0 10px;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.quick-search p {
    margin: 0;
    color: var(--muted-bright);
    line-height: 1.8;
}

.quick-search-form,
.search-line {
    display: flex;
    gap: 12px;
}

.quick-search-form input,
.search-line input {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: var(--text);
    padding: 0 18px;
    outline: none;
}

.search-line a {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    color: var(--cyan);
    font-weight: 700;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.55rem, 2.4vw, 2.2rem);
}

.section-icon {
    color: var(--cyan);
    font-weight: 900;
}

.section-line {
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.48), transparent);
}

.movie-rail {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 0 22px;
}

.rail-item {
    flex: 0 0 270px;
}

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

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px) scale(1.015);
    border-color: rgba(34, 211, 238, 0.42);
    background: rgba(30, 41, 59, 0.94);
    box-shadow: 0 20px 60px rgba(6, 182, 212, 0.12);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

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

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

.score-badge,
.play-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.64);
    backdrop-filter: blur(8px);
}

.score-badge {
    top: 10px;
    right: 10px;
    padding: 6px 9px;
    color: var(--yellow);
    font-weight: 800;
    font-size: 0.82rem;
}

.play-badge {
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    color: white;
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-body {
    display: grid;
    gap: 9px;
    padding: 16px;
}

.movie-body strong {
    overflow: hidden;
    color: var(--text);
    font-size: 1.04rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-meta,
.movie-line,
.latest-row em,
.rank-info span {
    color: var(--muted);
    font-size: 0.9rem;
}

.movie-line {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.tag-row span {
    padding: 5px 9px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.1);
    color: var(--cyan);
    font-size: 0.78rem;
    font-weight: 700;
}

.movie-card-compact .movie-body {
    padding: 14px;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: 24px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 190px;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

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

.category-tile-content {
    position: absolute;
    inset: auto 16px 16px;
    display: grid;
    gap: 8px;
}

.category-tile-content strong {
    font-size: 1.18rem;
}

.category-tile-content span {
    color: var(--muted-bright);
    font-size: 0.88rem;
    line-height: 1.55;
}

.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 34px;
    align-items: start;
}

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

.rank-row,
.latest-row {
    display: grid;
    grid-template-columns: auto 74px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-row:hover,
.latest-row:hover {
    transform: translateX(4px);
    border-color: rgba(34, 211, 238, 0.38);
    background: rgba(30, 41, 59, 0.92);
}

.rank-number {
    width: 34px;
    color: var(--cyan);
    font-size: 1.2rem;
    font-weight: 900;
    text-align: center;
}

.rank-row img,
.latest-row img {
    width: 74px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-info,
.latest-row span {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.rank-info strong,
.latest-row strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-score {
    color: var(--yellow);
    font-weight: 900;
}

.latest-row {
    grid-template-columns: 92px 1fr auto;
}

.latest-row img {
    width: 92px;
    height: 58px;
}

.latest-row b {
    color: var(--cyan);
}

.more-link {
    margin-top: 18px;
}

.page-hero {
    padding: 62px 0 42px;
    background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.2), transparent 34rem), rgba(2, 6, 23, 0.52);
    border-bottom: 1px solid var(--line);
}

.small-hero {
    padding: 74px 0 54px;
}

.category-hero {
    padding-top: 50px;
}

.page-hero h1 {
    margin-top: 18px;
    font-size: clamp(2.1rem, 4vw, 4rem);
}

.page-hero p {
    max-width: 820px;
    margin-top: 16px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 0.92rem;
}

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

.filter-panel {
    padding: 18px;
    border-radius: 22px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 22px;
}

.filter-chips button {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: var(--muted-bright);
    cursor: pointer;
}

.filter-chips button.is-active,
.filter-chips button:hover {
    border-color: rgba(34, 211, 238, 0.4);
    background: rgba(6, 182, 212, 0.22);
    color: white;
}

.empty-state {
    display: none;
    margin: 22px 0 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--muted-bright);
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

.detail-top {
    padding: 42px 0 22px;
    background: radial-gradient(circle at 70% 20%, rgba(34, 211, 238, 0.16), transparent 30rem), rgba(2, 6, 23, 0.35);
    border-bottom: 1px solid var(--line);
}

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

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--card-strong);
    box-shadow: var(--shadow);
}

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

.detail-info {
    display: grid;
    gap: 18px;
}

.detail-info h1 {
    font-size: clamp(2.2rem, 5vw, 4.8rem);
}

.large-tags span {
    font-size: 0.86rem;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-start {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.62));
    color: white;
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-strong));
    box-shadow: 0 18px 42px rgba(6, 182, 212, 0.36);
    font-size: 2rem;
}

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

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

.content-card {
    padding: 26px;
    border-radius: 22px;
}

.content-card h2 {
    margin: 0 0 14px;
    color: white;
}

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

.site-footer {
    margin-top: 44px;
    border-width: 1px 0 0;
    background: rgba(2, 6, 23, 0.88);
}

.footer-shell {
    padding: 38px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
}

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

.footer-grid h3 {
    margin: 0 0 16px;
}

.footer-links {
    display: grid;
    gap: 10px;
    color: var(--muted-bright);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9rem;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

[data-filter-item].is-hidden {
    display: none;
}

@media (max-width: 1100px) {
    .desktop-nav {
        gap: 12px;
        font-size: 0.86rem;
    }

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

    .split-section,
    .content-grid {
        grid-template-columns: 1fr;
    }
}

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

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

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

    .brand-subtitle {
        display: none;
    }

    .hero-slider {
        height: 72vh;
        min-height: 520px;
    }

    .hero-content {
        top: 48%;
        gap: 16px;
    }

    .hero-controls {
        bottom: 20px;
    }

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

    .quick-search-form,
    .search-line {
        flex-direction: column;
    }

    .movie-grid,
    .home-grid,
    .category-page-grid,
    .search-page-grid,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

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

    .footer-bottom {
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .nav-shell,
    .footer-shell,
    .page-shell,
    .mobile-nav {
        width: min(100% - 24px, 1180px);
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .brand-name {
        font-size: 1rem;
    }

    .hero-slider {
        min-height: 500px;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 2.35rem;
    }

    .hero-meta span,
    .detail-meta span {
        padding: 7px 10px;
        font-size: 0.82rem;
    }

    .movie-grid,
    .home-grid,
    .category-page-grid,
    .search-page-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .rail-item {
        flex-basis: 235px;
    }

    .rank-row {
        grid-template-columns: auto 64px 1fr;
    }

    .rank-score {
        grid-column: 3;
    }
}
