:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-soft: #1e293b;
    --bg-panel: rgba(15, 23, 42, 0.82);
    --line: rgba(148, 163, 184, 0.2);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #10b981;
    --accent-strong: #059669;
    --cyan: #22d3ee;
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #0f172a 0%, #172033 42%, #0f172a 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 18% 8%, rgba(16, 185, 129, 0.18), transparent 34%),
        radial-gradient(circle at 82% 18%, rgba(34, 211, 238, 0.16), transparent 32%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.88));
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.35);
    backdrop-filter: blur(16px);
}

.site-nav,
.footer-inner,
.page-shell,
.detail-inner,
.player-section,
.detail-content,
.related-section,
.content-section,
.category-cloud,
.quick-search-panel,
.ranking-panel {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

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

.brand-mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    color: white;
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.28);
}

.brand-name {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #34d399, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link,
.mobile-link {
    color: var(--muted-strong);
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #34d399;
}

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
    color: white;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 99px;
    background: currentColor;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
    border-top: 1px solid var(--line);
}

.mobile-panel.is-open {
    display: grid;
    gap: 12px;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: #0f172a;
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.72) 36%, rgba(15, 23, 42, 0.15) 100%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.78) 0%, rgba(15, 23, 42, 0.24) 58%, rgba(15, 23, 42, 0.56) 100%);
}

.hero-content {
    position: absolute;
    left: max(16px, calc((100% - 1180px) / 2));
    right: 16px;
    bottom: 78px;
    max-width: 760px;
}

.hero-tags,
.detail-meta,
.card-meta,
.compact-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-tags a,
.hero-tags span,
.detail-meta a,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.62);
    color: #dbeafe;
    border: 1px solid rgba(148, 163, 184, 0.22);
    font-size: 14px;
}

.hero-tags a,
.detail-meta a {
    background: rgba(5, 150, 105, 0.88);
    color: white;
    border-color: rgba(16, 185, 129, 0.35);
}

.hero h1,
.hero h2 {
    margin: 18px 0 16px;
    max-width: 820px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: white;
    text-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.hero p {
    max-width: 680px;
    margin: 0 0 28px;
    color: #e2e8f0;
    font-size: 19px;
    line-height: 1.8;
    text-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
}

.hero-actions,
.quick-search-panel,
.section-heading,
.site-search,
.inline-filter {
    display: flex;
    align-items: center;
    gap: 14px;
}

.primary-btn,
.ghost-btn,
.site-search button,
.inline-filter button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 26px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn,
.site-search button,
.inline-filter button {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: white;
    box-shadow: 0 18px 38px rgba(16, 185, 129, 0.28);
}

.ghost-btn {
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.primary-btn:hover,
.ghost-btn:hover,
.site-search button:hover,
.inline-filter button:hover {
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: rgba(2, 6, 23, 0.55);
    color: white;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(2, 6, 23, 0.82);
    transform: translateY(-50%) scale(1.04);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

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

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

.quick-search-panel {
    justify-content: space-between;
    gap: 24px;
    margin-top: 42px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.64));
    box-shadow: var(--shadow);
}

.quick-search-panel h2,
.page-hero h1,
.section-heading h2,
.detail-copy h1,
.detail-content h2 {
    margin: 0;
    color: white;
}

.quick-search-panel p,
.page-hero p,
.category-card-body p,
.footer-brand p,
.detail-one-line,
.detail-content p,
.ranking-info p,
.movie-card-body p {
    color: var(--muted-strong);
    line-height: 1.75;
}

.site-search,
.inline-filter {
    flex-wrap: wrap;
}

.site-search input,
.inline-filter input,
.inline-filter select {
    min-height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: white;
    outline: none;
}

.site-search input,
.inline-filter input {
    width: min(360px, 100%);
    padding: 0 18px;
}

.inline-filter select {
    padding: 0 16px;
}

.category-cloud,
.content-section,
.ranking-panel,
.category-overview,
.ranking-list,
.detail-content,
.related-section {
    padding: 64px 0 0;
}

.section-heading {
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-heading h2 {
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 850;
}

.section-heading a {
    color: #34d399;
    font-weight: 750;
}

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

.category-tile,
.category-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(30, 41, 59, 0.72);
    box-shadow: 0 16px 48px rgba(2, 6, 23, 0.26);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile {
    display: grid;
    min-height: 138px;
    padding: 22px;
}

.category-tile:hover,
.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(16, 185, 129, 0.55);
}

.category-tile span,
.category-card h2 {
    color: white;
    font-size: 22px;
    font-weight: 850;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.88);
    box-shadow: 0 14px 44px rgba(2, 6, 23, 0.28);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 62px rgba(2, 6, 23, 0.46);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #1e293b;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.14));
    transition: opacity 0.3s ease;
}

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

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.9);
    color: white;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-region,
.card-year {
    position: absolute;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 7px;
    color: white;
    font-size: 12px;
    font-weight: 750;
}

.card-region {
    top: 10px;
    left: 10px;
    background: rgba(5, 150, 105, 0.92);
}

.card-year {
    right: 10px;
    bottom: 10px;
    background: rgba(2, 6, 23, 0.72);
}

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

.movie-card-body h3 {
    min-height: 52px;
    margin: 0 0 8px;
    color: white;
    font-size: 17px;
    line-height: 1.5;
}

.movie-card-body h3 a:hover {
    color: #34d399;
}

.movie-card-body p {
    min-height: 48px;
    margin: 0 0 12px;
    font-size: 14px;
}

.card-meta {
    justify-content: space-between;
    color: var(--muted);
    font-size: 13px;
}

.feature-section {
    padding: 36px;
    border-radius: 32px;
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.58), rgba(51, 65, 85, 0.36));
}

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

.rank-row {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.72);
}

.rank-row strong {
    color: #34d399;
    font-size: 20px;
}

.rank-row span {
    color: white;
    font-weight: 750;
}

.rank-row em {
    color: var(--muted);
    font-style: normal;
}

.page-shell {
    padding: 48px 0 72px;
}

.page-hero {
    padding: 44px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        radial-gradient(circle at 8% 16%, rgba(16, 185, 129, 0.22), transparent 34%),
        linear-gradient(135deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.86));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    font-size: clamp(36px, 6vw, 58px);
    line-height: 1.1;
}

.page-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    font-size: 18px;
}

.inline-filter {
    margin-top: 26px;
}

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

.category-card a {
    display: block;
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
    aspect-ratio: 16 / 10;
    background: #0f172a;
}

.category-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card-body {
    padding: 20px;
}

.category-card-body h2 {
    margin: 0 0 8px;
}

.category-card-body p {
    min-height: 72px;
    margin: 0 0 14px;
}

.category-card-body span {
    color: #34d399;
    font-weight: 800;
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(30, 41, 59, 0.72);
}

.ranking-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
}

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

.ranking-poster span {
    position: absolute;
    left: 12px;
    top: 12px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    color: white;
    font-weight: 900;
}

.ranking-info h2 {
    margin: 0 0 10px;
    color: white;
    font-size: 24px;
}

.ranking-info h2 a:hover {
    color: #34d399;
}

.ranking-info p {
    margin: 0 0 14px;
}

.detail-page {
    padding-bottom: 72px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 54px 0 64px;
    background: #0f172a;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    filter: blur(12px);
    transform: scale(1.08);
}

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

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #0f172a, rgba(15, 23, 42, 0.72));
}

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

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

.crumbs a:hover {
    color: #34d399;
}

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

.detail-cover {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 10;
}

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

.detail-copy h1 {
    margin-bottom: 18px;
    font-size: clamp(34px, 6vw, 60px);
    line-height: 1.08;
    font-weight: 900;
}

.detail-one-line {
    max-width: 780px;
    margin: 0 0 20px;
    font-size: 18px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 20px 0 26px;
}

.tag-list span {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.75);
    color: #dbeafe;
    border: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 13px;
}

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

.player-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 30px;
    background: #020617;
    box-shadow: var(--shadow);
}

.player-video {
    width: 100%;
    height: 100%;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: white;
    cursor: pointer;
    background:
        linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.28)),
        radial-gradient(circle at center, rgba(16, 185, 129, 0.22), transparent 32%);
    z-index: 3;
}

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

.player-icon {
    display: grid;
    width: 84px;
    height: 84px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    box-shadow: 0 18px 44px rgba(16, 185, 129, 0.35);
    font-size: 32px;
}

.player-cover strong {
    max-width: min(680px, calc(100% - 32px));
    font-size: clamp(24px, 5vw, 44px);
    line-height: 1.2;
}

.player-cover em {
    color: #d1fae5;
    font-style: normal;
    font-weight: 800;
}

.detail-content article {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(30, 41, 59, 0.64);
}

.detail-content h2 {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 28px;
}

.detail-content h2:not(:first-child) {
    margin-top: 28px;
}

.detail-content p {
    margin: 0;
    font-size: 17px;
}

.site-footer {
    margin-top: 80px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), #020617);
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding: 46px 0 30px;
}

.footer-brand p {
    max-width: 520px;
    margin: 16px 0 0;
}

.footer-links {
    display: grid;
    gap: 9px;
    align-content: start;
}

.footer-links h3 {
    margin: 0 0 8px;
    color: white;
}

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

.footer-links a:hover {
    color: #34d399;
}

.footer-bottom {
    padding: 20px 16px 34px;
    color: #64748b;
    text-align: center;
}

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

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

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

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

    .menu-toggle {
        display: block;
    }

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

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

    .hero-content {
        bottom: 70px;
    }

    .hero h1,
    .hero h2 {
        font-size: clamp(34px, 12vw, 48px);
    }

    .quick-search-panel,
    .section-heading,
    .footer-inner,
    .ranking-card,
    .detail-layout {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .movie-grid,
    .dense-grid,
    .category-grid,
    .category-overview-grid,
    .rank-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feature-section,
    .page-hero,
    .detail-content article {
        padding: 24px;
    }

    .ranking-card {
        display: block;
    }

    .ranking-poster {
        margin-bottom: 16px;
    }
}

@media (max-width: 560px) {
    .site-nav,
    .footer-inner,
    .page-shell,
    .detail-inner,
    .player-section,
    .detail-content,
    .related-section,
    .content-section,
    .category-cloud,
    .quick-search-panel,
    .ranking-panel {
        width: min(100% - 24px, 1180px);
    }

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

    .hero-arrow {
        display: none;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-actions {
        flex-wrap: wrap;
    }

    .movie-grid,
    .dense-grid,
    .category-grid,
    .category-overview-grid,
    .rank-list {
        grid-template-columns: 1fr;
    }

    .movie-card-body h3,
    .movie-card-body p {
        min-height: auto;
    }

    .detail-cover {
        aspect-ratio: 16 / 9;
    }

    .player-frame {
        border-radius: 18px;
    }
}
