:root {
    --night-dark: #0a0e1a;
    --night-medium: #111827;
    --night-light: #1a1f2e;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-teal: #14b8a6;
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --panel: rgba(255, 255, 255, 0.06);
    --panel-strong: rgba(255, 255, 255, 0.11);
    --line: rgba(255, 255, 255, 0.12);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 15% 10%, rgba(6, 182, 212, 0.18), transparent 30%),
        radial-gradient(circle at 90% 20%, rgba(59, 130, 246, 0.16), transparent 28%),
        linear-gradient(135deg, #0a0e1a 0%, #101524 48%, #0b1020 100%);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

main {
    overflow: hidden;
}

.glass-effect {
    border: 1px solid var(--line);
    background: var(--panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 26px 60px rgba(6, 182, 212, 0.18);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 14, 26, 0.78);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue), var(--accent-teal));
    color: white;
    box-shadow: 0 16px 32px rgba(6, 182, 212, 0.22);
}

.brand-text {
    font-size: 1.25rem;
    background: linear-gradient(90deg, #22d3ee, #3b82f6, #2dd4bf);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 0.02em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: 1;
    justify-content: flex-end;
}

.nav-link {
    color: var(--text-secondary);
    transition: color 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
    color: #67e8f9;
}

.nav-group {
    position: relative;
}

.nav-menu {
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: 180px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-group:hover .nav-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.nav-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-secondary);
}

.nav-menu a:hover {
    color: #67e8f9;
    background: rgba(255, 255, 255, 0.06);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 290px;
}

.nav-search input,
.quick-search input,
.inline-filter input,
.search-page-form input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 12px 16px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.nav-search input:focus,
.quick-search input:focus,
.inline-filter input:focus,
.search-page-form input:focus {
    border-color: rgba(34, 211, 238, 0.65);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.09);
}

.nav-search button,
.quick-search button,
.search-page-form button {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    color: white;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
    cursor: pointer;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--text-primary);
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
}

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

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

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) brightness(0.75);
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10, 14, 26, 0.92) 0%, rgba(10, 14, 26, 0.58) 48%, rgba(10, 14, 26, 0.32) 100%),
        linear-gradient(0deg, rgba(10, 14, 26, 1) 0%, transparent 38%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 36px));
    min-height: 70vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 46px;
    align-items: center;
    padding: 74px 0 86px;
}

.hero-copy {
    width: min(720px, 100%);
    border-radius: var(--radius-lg);
    padding: clamp(26px, 4vw, 46px);
}

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

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(2.2rem, 5vw, 4.8rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1.06rem;
    line-height: 1.8;
}

.hero-tags {
    margin-top: 22px;
}

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

.btn-primary,
.btn-ghost,
.text-link,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
    color: white;
    box-shadow: 0 14px 32px rgba(6, 182, 212, 0.26);
}

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

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

.hero-poster {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--night-light);
    box-shadow: var(--shadow);
}

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

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

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

.hero-dot.is-active {
    background: #67e8f9;
}

.quick-search,
.content-section,
.page-hero,
.detail-shell,
.player-section {
    width: min(1280px, calc(100% - 36px));
    margin-left: auto;
    margin-right: auto;
}

.quick-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
    gap: 24px;
    align-items: center;
    margin-top: -44px;
    position: relative;
    z-index: 8;
    border-radius: var(--radius-lg);
    padding: 28px;
}

.quick-search h2 {
    margin: 0;
    font-size: clamp(1.45rem, 3vw, 2.2rem);
}

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

.content-section {
    padding: 68px 0 0;
}

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

.section-head.compact {
    align-items: center;
}

.section-head h2 {
    margin: 0 0 8px;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.section-head p {
    margin: 0;
    color: var(--text-secondary);
}

.section-more,
.text-link {
    color: #67e8f9;
    border: 1px solid rgba(103, 232, 249, 0.28);
    background: rgba(6, 182, 212, 0.08);
    white-space: nowrap;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.26s ease, border-color 0.26s ease, box-shadow 0.26s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(103, 232, 249, 0.38);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.3);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--night-light);
}

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

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

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.play-chip {
    right: 10px;
    bottom: 10px;
    padding: 7px 10px;
    background: rgba(6, 182, 212, 0.92);
    color: white;
}

.rank-badge {
    top: 10px;
    left: 10px;
    min-width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    color: white;
}

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

.movie-meta-line,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.movie-card h2 {
    margin: 9px 0 8px;
    font-size: 1rem;
    line-height: 1.35;
}

.movie-card p {
    min-height: 3.3em;
    margin: 0 0 12px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

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

.category-tile,
.category-card {
    border-radius: var(--radius-md);
    padding: 22px;
}

.category-title,
.category-card h2 {
    display: inline-block;
    margin: 0 0 10px;
    font-size: 1.25rem;
    font-weight: 800;
}

.category-tile p,
.category-card p {
    margin: 0 0 16px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.category-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-preview a {
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.07);
    font-size: 0.86rem;
}

.category-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}

.category-card-cover {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.category-card-cover img {
    aspect-ratio: 2 / 3;
    width: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.split-section {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 28px;
}

.ranking-list {
    border-radius: var(--radius-md);
    padding: 14px;
}

.compact-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 34px;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(4px);
}

.compact-card img {
    width: 54px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 10px;
}

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

.compact-card em {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-style: normal;
}

.compact-card > span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: rgba(6, 182, 212, 0.22);
    font-weight: 800;
}

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

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

.page-hero {
    padding: 72px 0 12px;
}

.page-hero > .glass-effect {
    border-radius: var(--radius-lg);
    padding: clamp(28px, 5vw, 58px);
    background:
        linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(59, 130, 246, 0.08)),
        rgba(255, 255, 255, 0.06);
}

.compact-hero h1,
.category-hero h1,
.search-hero h1 {
    max-width: 920px;
}

.inline-filter,
.search-page-form {
    margin-top: 28px;
    max-width: 720px;
}

.detail-hero {
    position: relative;
    padding: 58px 0 40px;
    overflow: hidden;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.32;
    filter: blur(22px);
    transform: scale(1.1);
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, var(--night-dark), rgba(10, 14, 26, 0.72));
}

.detail-shell {
    position: relative;
    z-index: 2;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
    color: var(--text-secondary);
}

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

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

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--night-light);
}

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

.detail-info {
    border-radius: var(--radius-lg);
    padding: clamp(26px, 4vw, 44px);
}

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

.detail-meta {
    margin: 20px 0;
}

.detail-meta span {
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.detail-tags {
    margin-bottom: 26px;
}

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

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #050816;
}

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

.player-start {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 0;
    border-radius: 999px;
    padding: 18px 30px;
    color: white;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
    box-shadow: 0 18px 42px rgba(6, 182, 212, 0.32);
    cursor: pointer;
    font-weight: 900;
}

.player-start.is-hidden {
    display: none;
}

.article-panel {
    max-width: 980px;
    border-radius: var(--radius-lg);
    padding: clamp(24px, 4vw, 42px);
}

.article-panel h2 {
    margin: 0 0 14px;
    font-size: 1.45rem;
}

.article-panel p {
    margin: 0 0 24px;
    color: var(--text-secondary);
    line-height: 1.95;
}

.article-panel p:last-child {
    margin-bottom: 0;
}

.site-footer {
    margin-top: 74px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(5, 8, 22, 0.62);
}

.footer-grid {
    width: min(1280px, calc(100% - 36px));
    margin: 0 auto;
    padding: 44px 0;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 32px;
}

.footer-grid p {
    max-width: 520px;
    color: var(--text-secondary);
    line-height: 1.75;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 1.05rem;
}

.footer-grid a:not(.brand) {
    display: block;
    margin: 10px 0;
    color: var(--text-secondary);
}

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

.footer-bottom {
    width: min(1280px, calc(100% - 36px));
    margin: 0 auto;
    padding: 18px 0 32px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

[data-filter-empty] {
    display: none;
    margin: 28px 0 0;
    color: var(--text-secondary);
}

.movie-card.is-hidden {
    display: none;
}

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

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

    .hero-content {
        grid-template-columns: minmax(0, 1fr) 260px;
    }

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

@media (max-width: 920px) {
    .nav-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        left: 18px;
        right: 18px;
        top: 86px;
        display: none;
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: var(--shadow);
    }

    .main-nav.is-open {
        display: flex;
    }

    .nav-menu {
        position: static;
        transform: none;
        width: 100%;
        margin-top: 8px;
        opacity: 1;
        pointer-events: auto;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav-search {
        min-width: 0;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        align-content: center;
    }

    .hero-poster {
        display: none;
    }

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

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

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

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

@media (max-width: 640px) {
    .nav-shell,
    .quick-search,
    .content-section,
    .page-hero,
    .detail-shell,
    .player-section,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 28px, 1280px);
    }

    .brand-text {
        font-size: 1.05rem;
    }

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

    .hero-copy {
        padding: 24px;
    }

    .movie-grid,
    .wide-grid,
    .ranking-grid,
    .mini-grid,
    .category-grid,
    .category-page-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

    .movie-card p {
        display: none;
    }

    .section-head {
        display: block;
    }

    .section-more {
        margin-top: 14px;
    }

    .detail-info,
    .article-panel,
    .page-hero > .glass-effect {
        padding: 22px;
    }

    .player-start {
        padding: 14px 22px;
    }
}
