:root {
    color-scheme: dark;
    --bg: #06151d;
    --bg-soft: #0a2230;
    --panel: rgba(10, 32, 45, 0.78);
    --panel-solid: #102838;
    --text: #f2fbff;
    --muted: #9fc1cb;
    --line: rgba(103, 232, 249, 0.18);
    --cyan: #22d3ee;
    --teal: #14b8a6;
    --cyan-soft: rgba(34, 211, 238, 0.16);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 24px;
    --max: 1280px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.18), transparent 32rem),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 30rem),
        linear-gradient(180deg, #06151d 0%, #081a24 48%, #061119 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(17, 94, 89, 0.96), rgba(8, 51, 68, 0.96), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid rgba(103, 232, 249, 0.18);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
}

.top-nav {
    max-width: var(--max);
    margin: 0 auto;
    min-height: 68px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    color: white;
    font-size: 15px;
    box-shadow: 0 10px 26px rgba(20, 184, 166, 0.35);
}

.brand-name,
.footer-brand {
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #a5f3fc, #5eead4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-name {
    font-size: 20px;
}

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

.nav-link {
    color: #dbf7ff;
    font-size: 15px;
    white-space: nowrap;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.nav-link:hover {
    transform: translateY(-1px);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(320px, 28vw);
}

.nav-search input,
.wide-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-radius: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input {
    padding: 10px 12px;
}

.nav-search input:focus,
.wide-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
    background: rgba(255, 255, 255, 0.1);
}

.nav-search button,
.wide-search button {
    border: 0;
    color: white;
    border-radius: 14px;
    cursor: pointer;
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    box-shadow: 0 12px 26px rgba(20, 184, 166, 0.22);
}

.nav-search button {
    padding: 10px 14px;
}

.menu-toggle {
    display: none;
    color: white;
    border: 0;
    background: transparent;
    font-size: 26px;
    cursor: pointer;
}

main {
    max-width: var(--max);
    margin: 0 auto;
    padding: 1px 20px 70px;
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 520px;
    margin: 28px 0 28px;
    overflow: hidden;
    border-radius: var(--radius);
    background: #0f2735;
    box-shadow: var(--shadow);
    border: 1px solid rgba(103, 232, 249, 0.18);
}

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

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

.hero-slide img {
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.04);
}

.hero-slide img.is-hidden,
.movie-card img.is-hidden,
.detail-poster img.is-hidden,
.mini-poster img.is-hidden {
    opacity: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(3, 7, 18, 0.86), rgba(3, 7, 18, 0.48) 48%, rgba(3, 7, 18, 0.18)),
        linear-gradient(0deg, rgba(3, 7, 18, 0.8), transparent 48%);
}

.hero-content {
    position: absolute;
    left: clamp(24px, 6vw, 80px);
    right: clamp(24px, 12vw, 180px);
    bottom: clamp(28px, 7vw, 78px);
    max-width: 760px;
}

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

.hero-tags span,
.tag-row span,
.eyebrow {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(103, 232, 249, 0.24);
    background: rgba(34, 211, 238, 0.12);
    color: #a5f3fc;
}

.hero-tags span,
.tag-row span {
    padding: 6px 10px;
    font-size: 12px;
}

.eyebrow {
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 18px 0 14px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 680px;
    color: #d7f6ff;
    font-size: clamp(17px, 2.1vw, 22px);
    line-height: 1.7;
    margin: 0 0 22px;
}

.hero-actions,
.detail-actions,
.quick-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.primary-button,
.ghost-button,
.section-more,
.quick-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button {
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    color: #031015;
    box-shadow: 0 18px 40px rgba(20, 184, 166, 0.28);
}

.ghost-button,
.section-more,
.quick-links a {
    padding: 11px 18px;
    border: 1px solid rgba(103, 232, 249, 0.28);
    background: rgba(255, 255, 255, 0.08);
    color: #dffbff;
}

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

.hero-meta,
.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
}

.hero-meta {
    margin-top: 20px;
}

.hero-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(8, 21, 31, 0.46);
    color: white;
    cursor: pointer;
    font-size: 34px;
    display: grid;
    place-items: center;
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 28px;
    background: var(--cyan);
}

.search-panel,
.page-hero,
.detail-hero,
.content-section,
.site-footer {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-panel {
    margin: 0 0 28px;
    padding: 22px;
    border-radius: var(--radius);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
}

.wide-search {
    display: flex;
    gap: 12px;
}

.wide-search input {
    padding: 15px 18px;
}

.wide-search button {
    padding: 0 24px;
    white-space: nowrap;
}

.content-section,
.page-hero,
.detail-hero {
    margin: 28px 0;
    padding: clamp(22px, 4vw, 40px);
    border-radius: var(--radius);
}

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

.section-heading h2,
.page-hero h1,
.detail-intro h1,
.ranking-copy h2 {
    margin: 12px 0 0;
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.section-heading h2 {
    font-size: clamp(26px, 3vw, 38px);
}

.page-hero {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    align-items: center;
    background:
        linear-gradient(135deg, rgba(20, 184, 166, 0.14), rgba(15, 23, 42, 0.86)),
        var(--panel);
}

.page-hero h1,
.detail-intro h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.page-hero p,
.ranking-copy p,
.copy-card p,
.detail-one-line {
    color: #c7e5ed;
    line-height: 1.8;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(103, 232, 249, 0.15);
    background:
        linear-gradient(145deg, rgba(15, 39, 53, 0.92), rgba(7, 22, 32, 0.92)),
        radial-gradient(circle at top, rgba(34, 211, 238, 0.16), transparent 24rem);
    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.35);
    box-shadow: 0 22px 45px rgba(0, 0, 0, 0.35);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.15;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.24), rgba(20, 184, 166, 0.16), rgba(15, 23, 42, 0.78));
}

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

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

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 7px 10px;
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    color: #031015;
}

.rank-badge {
    left: 10px;
    top: 10px;
    padding: 7px 10px;
    background: rgba(3, 7, 18, 0.72);
    color: #a5f3fc;
    border: 1px solid rgba(103, 232, 249, 0.28);
}

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

.movie-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 17px;
    font-weight: 800;
    color: white;
}

.movie-card-title:hover {
    color: #67e8f9;
}

.movie-meta {
    margin: 8px 0 10px;
    font-size: 12px;
}

.movie-card p {
    display: -webkit-box;
    min-height: 42px;
    margin: 0 0 12px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #b7d9e1;
    font-size: 13px;
    line-height: 1.62;
}

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

.movie-card-compact .movie-card-title {
    font-size: 15px;
}

.movie-card-compact p {
    display: none;
}

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

.category-tile {
    border-radius: 18px;
    border: 1px solid rgba(103, 232, 249, 0.16);
    background: linear-gradient(145deg, rgba(20, 184, 166, 0.14), rgba(15, 23, 42, 0.84));
    overflow: hidden;
}

.category-tile > a {
    display: block;
    padding: 20px;
}

.category-tile span {
    color: #67e8f9;
    font-weight: 800;
}

.category-tile strong {
    display: block;
    margin-top: 10px;
    color: white;
    line-height: 1.6;
}

.category-samples {
    display: grid;
    gap: 8px;
    padding: 0 20px 20px;
}

.category-samples a {
    color: var(--muted);
    font-size: 13px;
}

.category-samples a:hover {
    color: #67e8f9;
}

.ranking-split {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 26px;
    align-items: stretch;
}

.ranking-panel,
.ranking-copy,
.copy-card {
    border-radius: 22px;
    border: 1px solid rgba(103, 232, 249, 0.15);
    background: rgba(6, 21, 29, 0.56);
    padding: 22px;
}

.compact-heading {
    margin-bottom: 18px;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(103, 232, 249, 0.1);
}

.mini-card:hover {
    border-color: rgba(103, 232, 249, 0.36);
}

.mini-poster {
    width: 58px;
    height: 76px;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(20, 184, 166, 0.18));
}

.mini-poster img {
    height: 100%;
    object-fit: cover;
}

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

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

.mini-info strong {
    color: white;
    margin-bottom: 8px;
}

.mini-info em {
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
}

.mini-rank {
    display: inline-flex;
    min-width: 22px;
    height: 22px;
    margin-right: 6px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.16);
    color: #67e8f9;
    font-size: 12px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 160px 160px;
    gap: 12px;
    margin-bottom: 24px;
}

.filter-bar input,
.filter-bar select {
    padding: 13px 14px;
}

.filter-empty {
    display: none;
    padding: 24px;
    border-radius: 18px;
    text-align: center;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.05);
}

.breadcrumb {
    max-width: var(--max);
    margin: 24px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: var(--muted);
    font-size: 14px;
}

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

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

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(103, 232, 249, 0.18);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(20, 184, 166, 0.14));
    box-shadow: var(--shadow);
}

.detail-poster img {
    aspect-ratio: 3 / 4.15;
    object-fit: cover;
}

.detail-one-line {
    font-size: 18px;
    max-width: 820px;
}

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

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

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #02090d;
    border: 1px solid rgba(103, 232, 249, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #02090d;
}

.player-start {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: white;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.18), rgba(2, 9, 13, 0.62));
    cursor: pointer;
}

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

.player-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    color: #031015;
    font-size: 28px;
    box-shadow: 0 18px 46px rgba(20, 184, 166, 0.34);
}

.detail-copy {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.copy-card p {
    margin-bottom: 0;
}

.site-footer {
    max-width: var(--max);
    margin: 28px auto;
    padding: 34px 24px 20px;
    border-radius: var(--radius);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 0.8fr;
    gap: 30px;
}

.footer-brand {
    font-size: 22px;
}

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

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 17px;
}

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

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

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

.footer-bottom {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid rgba(103, 232, 249, 0.13);
    color: #7fa7b1;
    font-size: 13px;
}

[data-filter-hidden="true"] {
    display: none !important;
}

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

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

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

    .nav-search {
        display: none;
    }
}

@media (max-width: 860px) {
    .top-nav {
        flex-wrap: wrap;
        padding: 12px 18px;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .nav-links {
        display: none;
        order: 3;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding-top: 10px;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-link {
        padding: 12px 0;
        border-top: 1px solid rgba(103, 232, 249, 0.12);
    }

    .hero-carousel {
        min-height: 560px;
        height: 78vh;
    }

    .hero-content {
        left: 22px;
        right: 22px;
    }

    .search-panel,
    .ranking-split,
    .detail-hero,
    .detail-copy,
    .footer-grid,
    .page-hero {
        grid-template-columns: 1fr;
        display: grid;
    }

    .page-hero {
        align-items: start;
    }

    .wide-search {
        flex-direction: column;
    }

    .wide-search button {
        padding: 14px 18px;
    }

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

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

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

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

    .mini-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    main {
        padding-left: 14px;
        padding-right: 14px;
    }

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

    .hero-carousel {
        border-radius: 18px;
        min-height: 510px;
    }

    .hero-control {
        display: none;
    }

    .content-section,
    .page-hero,
    .detail-hero,
    .search-panel,
    .site-footer {
        border-radius: 18px;
        padding: 20px;
    }

    .section-heading {
        display: grid;
        align-items: start;
    }

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

    .footer-links {
        grid-template-columns: 1fr;
    }
}
