:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --accent: #34d399;
    --accent-deep: #059669;
    --teal: #2dd4bf;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 10%, rgba(16, 185, 129, 0.18), transparent 34rem),
        radial-gradient(circle at 85% 0%, rgba(45, 212, 191, 0.14), transparent 28rem),
        linear-gradient(180deg, #0f172a 0%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(15, 23, 42, 0.82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1280px;
    min-height: 72px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #052e2b;
    background: linear-gradient(135deg, var(--accent), var(--teal));
    box-shadow: 0 12px 32px rgba(52, 211, 153, 0.25);
}

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

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

.nav-link {
    color: var(--muted);
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: rgba(52, 211, 153, 0.12);
}

.nav-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 320px;
}

.nav-search input,
.big-search input,
.inline-filter input {
    width: 100%;
    color: var(--text);
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    padding: 12px 16px;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.big-search input:focus,
.inline-filter input:focus {
    border-color: rgba(52, 211, 153, 0.72);
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}

.nav-search button,
.big-search button {
    border: 0;
    border-radius: 999px;
    color: #052e2b;
    background: linear-gradient(135deg, var(--accent), var(--teal));
    font-weight: 700;
    padding: 12px 18px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.74);
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    background: var(--text);
    display: block;
    margin: 5px auto;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 0 24px 20px;
    border-top: 1px solid var(--line);
}

.mobile-nav a {
    display: block;
    padding: 12px 0;
    color: var(--muted);
}

.hero-carousel {
    position: relative;
    min-height: 76vh;
    overflow: hidden;
    background: #020617;
}

.hero-stage {
    position: relative;
    min-height: 76vh;
}

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

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade,
.detail-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.74) 42%, rgba(2, 6, 23, 0.18)),
        linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.34) 42%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 76vh;
    margin: 0 auto;
    padding: 104px 24px 96px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 760px;
    margin-left: calc((100vw - min(1280px, 100vw)) / 2 + 24px);
}

.eyebrow,
.section-kicker {
    color: var(--accent);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
    font-size: clamp(36px, 6vw, 76px);
    line-height: 1;
    font-weight: 900;
    margin-bottom: 22px;
}

.hero-line {
    color: var(--muted);
    font-size: clamp(17px, 2.2vw, 24px);
    line-height: 1.7;
    margin-bottom: 16px;
}

.hero-meta,
.detail-meta,
.movie-meta {
    color: var(--soft);
}

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

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 5px 10px;
    color: #d1fae5;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.24);
    font-size: 12px;
}

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

.primary-btn,
.ghost-btn,
.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, background 0.2s ease, border 0.2s ease;
}

.primary-btn {
    color: #052e2b;
    background: linear-gradient(135deg, var(--accent), var(--teal));
}

.ghost-btn,
.section-more {
    color: var(--text);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.64);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.movie-card:hover {
    transform: translateY(-3px);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 4;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.48);
    border: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.hero-prev,
.hero-next,
.hero-dot {
    border: 0;
    color: var(--text);
    background: transparent;
}

.hero-prev,
.hero-next {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 26px;
    line-height: 1;
}

.hero-prev:hover,
.hero-next:hover {
    background: rgba(255, 255, 255, 0.1);
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(226, 232, 240, 0.42);
}

.hero-dot.active {
    width: 28px;
    border-radius: 999px;
    background: var(--accent);
}

.section-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 24px;
}

.search-panel,
.page-hero,
.split-section,
.detail-layout {
    display: grid;
    gap: 28px;
}

.search-panel {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    padding-top: 56px;
}

.search-panel h2,
.section-heading h2,
.category-panel h2,
.content-card h2,
.player-card h2,
.side-card h2 {
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.15;
    font-weight: 900;
    margin-bottom: 14px;
}

.search-panel p,
.category-panel p,
.page-hero p,
.content-card p {
    color: var(--muted);
    line-height: 1.85;
}

.big-search {
    display: flex;
    gap: 10px;
}

.chip-cloud,
.category-mini-grid {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 15px;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
}

.chip-link:hover {
    color: var(--text);
    border-color: rgba(52, 211, 153, 0.56);
}

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

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

.movie-card {
    min-width: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.18);
    transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    border-color: rgba(52, 211, 153, 0.48);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    aspect-ratio: 2 / 3;
    display: block;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.72);
}

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

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

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

.rank-badge,
.mini-rank {
    position: absolute;
    z-index: 2;
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #052e2b;
    background: linear-gradient(135deg, var(--accent), var(--teal));
    font-weight: 900;
}

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

.movie-title {
    display: block;
    color: var(--text);
    font-weight: 800;
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 46px;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
    margin-top: 9px;
}

.split-section {
    grid-template-columns: 1.7fr 1fr;
    align-items: start;
}

.ranking-panel,
.category-panel,
.content-card,
.player-card,
.side-card,
.search-panel,
.page-hero {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.ranking-panel,
.category-panel,
.content-card,
.player-card,
.side-card {
    padding: 26px;
}

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

.wide-link {
    position: relative;
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 14px;
    align-items: center;
    min-height: 88px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.35);
    border: 1px solid transparent;
}

.wide-link:hover {
    border-color: rgba(52, 211, 153, 0.34);
    background: rgba(15, 23, 42, 0.92);
}

.wide-link img {
    width: 72px;
    height: 68px;
    object-fit: cover;
    border-radius: 14px;
}

.wide-link strong,
.wide-link em {
    display: block;
}

.wide-link strong {
    color: var(--text);
    margin-bottom: 6px;
}

.wide-link em {
    color: var(--soft);
    font-style: normal;
    font-size: 13px;
}

.mini-rank {
    left: 6px;
    top: 6px;
    min-width: 26px;
    height: 26px;
    font-size: 12px;
}

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

.category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 230px;
    padding: 24px;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.74);
    box-shadow: var(--shadow);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.92));
}

.category-card strong,
.category-card em {
    position: relative;
    z-index: 1;
}

.category-card strong {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 10px;
}

.category-card em {
    color: var(--muted);
    font-style: normal;
    line-height: 1.7;
}

.page-hero {
    max-width: 1280px;
    margin: 38px auto 0;
    padding: 52px;
    grid-template-columns: 1.3fr 0.7fr;
    align-items: end;
}

.inline-filter {
    align-self: center;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
}

.detail-inner {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 620px;
    margin: 0 auto;
    padding: 92px 24px 64px;
    display: grid;
    grid-template-columns: 320px 1fr;
    align-items: end;
    gap: 40px;
}

.detail-poster {
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: var(--shadow);
    background: rgba(2, 6, 23, 0.8);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    margin-bottom: 18px;
}

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

.detail-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
}

.detail-main,
.detail-side {
    display: grid;
    gap: 24px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    aspect-ratio: 16 / 9;
    background: #020617;
    border: 1px solid var(--line);
}

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

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--text);
    border: 0;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.34), rgba(2, 6, 23, 0.82));
}

.play-layer.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #052e2b;
    background: linear-gradient(135deg, var(--accent), var(--teal));
    font-size: 30px;
    box-shadow: 0 20px 50px rgba(52, 211, 153, 0.28);
}

.content-card p {
    font-size: 16px;
}

.info-list {
    display: grid;
    gap: 14px;
}

.info-list div {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.info-list dt {
    color: var(--soft);
}

.info-list dd {
    color: var(--text);
    margin: 0;
}

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

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px;
    display: grid;
    gap: 14px;
    color: var(--muted);
}

.footer-brand {
    color: var(--text);
}

.copyright {
    color: var(--soft);
    font-size: 14px;
}

.is-filtered-out {
    display: none !important;
}

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

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

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

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

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

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

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

    .hero-content {
        margin-left: 0;
        padding: 98px 24px 92px;
    }

    .search-panel,
    .split-section,
    .page-hero,
    .detail-inner {
        grid-template-columns: 1fr;
    }

    .detail-inner {
        padding-top: 96px;
    }

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

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

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

@media (max-width: 640px) {
    .header-inner {
        padding: 0 16px;
    }

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

    .hero-carousel,
    .hero-stage {
        min-height: 680px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 38px;
    }

    .section-wrap,
    .page-hero {
        padding: 42px 16px;
    }

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

    .movie-grid,
    .category-grid,
    .detail-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

    .movie-title {
        font-size: 14px;
    }

    .movie-desc {
        font-size: 12px;
    }

    .category-card {
        min-height: 190px;
        padding: 18px;
    }

    .detail-inner {
        gap: 24px;
        min-height: 560px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .ranking-panel,
    .category-panel,
    .content-card,
    .player-card,
    .side-card {
        padding: 18px;
        border-radius: 22px;
    }
}
