:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.78);
    --bg-card-strong: rgba(30, 41, 59, 0.92);
    --text: #ffffff;
    --muted: #94a3b8;
    --muted-2: #cbd5e1;
    --line: rgba(148, 163, 184, 0.18);
    --accent: #10b981;
    --accent-2: #34d399;
    --accent-dark: #047857;
    --purple: #a855f7;
    --warning: #facc15;
    --radius: 22px;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 0%, rgba(16, 185, 129, 0.18), transparent 34%),
        radial-gradient(circle at 85% 8%, rgba(168, 85, 247, 0.18), transparent 30%),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

main {
    min-height: 70vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(2, 6, 23, 0.78);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

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

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

.brand-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    box-shadow: 0 16px 34px rgba(16, 185, 129, 0.24);
}

.brand-text {
    display: grid;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 19px;
    letter-spacing: 0.02em;
}

.brand-text small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}

.nav-link {
    color: var(--muted-2);
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-2);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-input,
.filter-select {
    border: 1px solid rgba(148, 163, 184, 0.24);
    outline: none;
    color: #fff;
    background: rgba(15, 23, 42, 0.86);
    border-radius: 999px;
    padding: 10px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 190px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-input:focus,
.filter-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.header-search button,
.mobile-search button,
.btn,
.chip-button {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(16, 185, 129, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.btn:hover,
.chip-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(16, 185, 129, 0.28);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.82);
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #fff;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-nav nav {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.section,
.page-section {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 1s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.02);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.2)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 50%, rgba(2, 6, 23, 0.66) 100%);
}

.hero-content {
    position: absolute;
    z-index: 4;
    left: max(24px, calc((100% - var(--container)) / 2));
    bottom: 14%;
    width: min(680px, calc(100% - 48px));
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--accent-2);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-title {
    margin: 0 0 18px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 0.95;
    letter-spacing: -0.04em;
    text-shadow: 0 24px 58px rgba(0, 0, 0, 0.55);
}

.hero-summary {
    max-width: 620px;
    margin: 0 0 22px;
    color: #dbeafe;
    font-size: clamp(16px, 2vw, 20px);
}

.hero-meta,
.movie-meta-row,
.detail-meta,
.stats-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta span,
.detail-meta span,
.stats-row span,
.movie-meta-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    font-size: 13px;
}

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

.btn.secondary {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 32px;
    background: var(--accent);
}

.section-header,
.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.section-title,
.page-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-desc,
.page-desc {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted-2);
}

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

.movie-card {
    min-width: 0;
}

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.75);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
}

.poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 20%, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.82));
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

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

.movie-card:hover .poster::after {
    opacity: 1;
}

.duration {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    padding: 3px 8px;
    color: #fff;
    background: rgba(0, 0, 0, 0.68);
    border-radius: 999px;
    font-size: 12px;
}

.play-mark {
    position: absolute;
    z-index: 4;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    color: #fff;
    background: rgba(16, 185, 129, 0.86);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.84);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-meta-row {
    gap: 6px;
    margin-bottom: 8px;
}

.movie-meta-row span {
    min-height: 24px;
    padding: 3px 8px;
    color: var(--muted-2);
    font-size: 12px;
}

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
}

.movie-card h3 a {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.movie-card h3 a:hover {
    color: var(--accent-2);
}

.movie-card p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.tag-row span,
.keyword-pill {
    color: #bbf7d0;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 12px;
}

.feature-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.8fr);
    gap: 28px;
}

.panel {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.panel-pad {
    padding: 24px;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 34px 62px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 18px;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ranking-item:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(16, 185, 129, 0.25);
    transform: translateY(-1px);
}

.ranking-number {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    border-radius: 11px;
    font-weight: 900;
}

.ranking-item img {
    width: 62px;
    height: 82px;
    object-fit: cover;
    border-radius: 12px;
}

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

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

.ranking-info small {
    margin-top: 4px;
    color: var(--muted);
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    padding: 22px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.74));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.category-card::before {
    content: "";
    position: absolute;
    right: -50px;
    top: -50px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.32), transparent 65%);
}

.category-card h2,
.category-card h3 {
    position: relative;
    margin: 0 0 10px;
    font-size: 22px;
}

.category-card p {
    position: relative;
    margin: 0 0 16px;
    color: var(--muted-2);
    font-size: 14px;
}

.category-count {
    position: relative;
    color: var(--accent-2);
    font-weight: 900;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 0 0 28px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    border-radius: 20px;
}

.filter-input {
    min-width: min(100%, 320px);
}

.filter-select {
    min-width: 160px;
}

.empty-state {
    display: none;
    padding: 44px;
    text-align: center;
    color: var(--muted-2);
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 0;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-hero {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 46px;
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 34px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: var(--shadow);
}

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

.detail-content h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.detail-content .lead {
    max-width: 820px;
    margin: 0 0 22px;
    color: #dbeafe;
    font-size: 18px;
}

.player-section {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 54px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 28px;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.45);
}

.video-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.14), rgba(2, 6, 23, 0.52));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
    display: inline-grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    box-shadow: 0 28px 70px rgba(16, 185, 129, 0.34);
    font-size: 36px;
}

.video-shell.is-playing .play-overlay {
    visibility: hidden;
    opacity: 0;
}

.player-note {
    min-height: 28px;
    margin: 12px 0 0;
    color: var(--muted-2);
}

.detail-grid {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 54px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
}

.article-body {
    padding: 28px;
}

.article-body h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.article-body p {
    margin: 0 0 22px;
    color: var(--muted-2);
    font-size: 16px;
}

.info-list {
    display: grid;
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted-2);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    padding-bottom: 10px;
}

.info-list strong {
    color: #fff;
}

.search-results-count {
    color: var(--muted-2);
    font-weight: 700;
}

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

.sitemap-list a {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding: 10px 12px;
    color: var(--muted-2);
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 12px;
}

.sitemap-list a:hover {
    color: var(--accent-2);
    border-color: rgba(16, 185, 129, 0.32);
}

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

.footer-inner {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 28px;
    padding: 36px 0;
}

.footer-logo {
    margin-bottom: 8px;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}

.footer-inner p {
    margin: 0;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 10px 18px;
}

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

.footer-links a:hover {
    color: var(--accent-2);
}

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

    .mobile-menu-button {
        display: block;
    }

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

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

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

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

@media (max-width: 760px) {
    .header-inner {
        width: min(100% - 24px, var(--container));
    }

    .brand-text small {
        display: none;
    }

    .hero-slider {
        min-height: 78vh;
    }

    .hero-content {
        left: 18px;
        bottom: 12%;
        width: calc(100% - 36px);
    }

    .hero-actions,
    .section-header,
    .page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .section,
    .page-section {
        width: min(100% - 24px, var(--container));
        padding: 38px 0;
    }

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

    .category-grid,
    .sitemap-list {
        grid-template-columns: 1fr;
    }

    .detail-hero {
        width: min(100% - 24px, var(--container));
        grid-template-columns: 1fr;
        padding-top: 24px;
    }

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

    .player-section,
    .detail-grid,
    .breadcrumb {
        width: min(100% - 24px, var(--container));
    }

    .article-body {
        padding: 20px;
    }

    .footer-inner {
        width: min(100% - 24px, var(--container));
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .movie-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 38px;
    }
}
