
:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: rgba(15, 23, 42, 0.72);
    --line: #1e293b;
    --line-strong: #334155;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --emerald: #10b981;
    --emerald-light: #34d399;
    --cyan: #22d3ee;
    --amber: #f59e0b;
    --rose: #fb7185;
    --radius: 18px;
    --shadow: 0 25px 70px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    min-height: 100%;
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 0%, rgba(16, 185, 129, 0.18), transparent 26rem),
        radial-gradient(circle at 82% 12%, rgba(34, 211, 238, 0.12), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #07111f 46%, #020617 100%);
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(30, 41, 59, 0.92);
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--emerald-light), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: white;
    font-size: 14px;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.35);
}

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

.nav-link {
    color: #cbd5e1;
    font-weight: 650;
    font-size: 15px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--emerald-light);
}

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

.nav-lite {
    color: #94a3b8;
    font-weight: 520;
}

.site-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-search input {
    width: 210px;
    border: 1px solid #334155;
    border-radius: 999px;
    padding: 10px 14px;
    color: #e2e8f0;
    background: #0f172a;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search input:focus {
    border-color: var(--emerald);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14);
}

.site-search button,
.primary-button,
.ghost-button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    color: white;
    font-weight: 750;
    background: linear-gradient(135deg, var(--emerald), #059669);
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.site-search button:hover,
.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(16, 185, 129, 0.38);
}

.ghost-button {
    color: #d1fae5;
    border: 1px solid rgba(16, 185, 129, 0.42);
    background: rgba(15, 23, 42, 0.62);
    box-shadow: none;
}

.ghost-button:hover {
    transform: translateY(-1px);
    border-color: rgba(52, 211, 153, 0.72);
    background: rgba(16, 185, 129, 0.18);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid #334155;
    border-radius: 12px;
    color: #d1d5db;
    background: #0f172a;
}

.mobile-panel {
    border-top: 1px solid #1e293b;
    padding: 16px;
    background: #0f172a;
}

.mobile-panel nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.mobile-panel a {
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 12px;
    color: #cbd5e1;
    background: rgba(2, 6, 23, 0.42);
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    border-bottom: 1px solid #1e293b;
    background: #020617;
}

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

.hero-slide {
    display: flex;
    align-items: center;
    background-position: center;
    background-size: cover;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.7s ease, transform 1.2s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-content {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    max-width: 720px;
    padding-top: 38px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: 1px solid rgba(16, 185, 129, 0.32);
    border-radius: 999px;
    padding: 8px 14px;
    color: var(--emerald-light);
    font-size: 14px;
    font-weight: 750;
    background: rgba(16, 185, 129, 0.14);
    backdrop-filter: blur(10px);
}

.hero-content h1,
.page-hero h1,
.detail-title-block h1 {
    margin: 18px 0 18px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.04em;
    color: white;
}

.hero-content p,
.page-hero p,
.detail-title-block p {
    max-width: 680px;
    margin: 0 0 26px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.72;
}

.hero-tags,
.mini-tags,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.mini-tags span,
.detail-meta span {
    border-radius: 999px;
    padding: 6px 10px;
    color: #dbeafe;
    font-size: 13px;
    background: rgba(30, 41, 59, 0.72);
    border: 1px solid rgba(51, 65, 85, 0.9);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 999px;
    color: white;
    font-size: 34px;
    line-height: 1;
    background: rgba(15, 23, 42, 0.56);
    backdrop-filter: blur(10px);
    transform: translateY(-50%);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.hero-control:hover {
    border-color: rgba(52, 211, 153, 0.58);
    background: rgba(15, 23, 42, 0.82);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    padding: 0;
    background: rgba(203, 213, 225, 0.48);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 30px;
    background: var(--emerald-light);
}

.quick-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: -42px;
    position: relative;
    z-index: 8;
}

.quick-panel a {
    border: 1px solid rgba(51, 65, 85, 0.88);
    border-radius: var(--radius);
    padding: 24px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.quick-panel a:hover {
    transform: translateY(-4px);
    border-color: rgba(52, 211, 153, 0.52);
}

.quick-panel strong {
    display: block;
    margin-bottom: 6px;
    color: white;
    font-size: 20px;
}

.quick-panel span {
    color: var(--muted);
}

.section-block {
    padding: 72px 0;
}

.section-muted {
    background: rgba(15, 23, 42, 0.34);
    border-top: 1px solid rgba(30, 41, 59, 0.74);
    border-bottom: 1px solid rgba(30, 41, 59, 0.74);
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.section-heading.centered {
    display: block;
    text-align: center;
}

.section-heading h2 {
    margin: 0;
    color: white;
    font-size: 32px;
    letter-spacing: -0.03em;
}

.section-heading p {
    margin: 10px auto 0;
    max-width: 640px;
    color: var(--muted);
    line-height: 1.7;
}

.section-heading a {
    margin-left: auto;
    color: var(--emerald-light);
    font-weight: 700;
}

.section-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

.section-icon.amber {
    background: linear-gradient(135deg, var(--amber), #f97316);
}

.section-icon.cyan {
    background: linear-gradient(135deg, var(--cyan), #3b82f6);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(30, 41, 59, 0.95);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.82);
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(52, 211, 153, 0.56);
    box-shadow: 0 24px 60px rgba(16, 185, 129, 0.12);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
}

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

.movie-card:hover .poster-link img {
    transform: scale(1.065);
    filter: saturate(1.12) brightness(1.04);
}

.quality-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    border-radius: 999px;
    padding: 5px 9px;
    color: white;
    font-size: 12px;
    font-weight: 800;
    background: rgba(16, 185, 129, 0.92);
}

.rank-badge {
    left: auto;
    right: 12px;
    min-width: 34px;
    text-align: center;
    background: rgba(245, 158, 11, 0.94);
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    color: white;
    background: rgba(16, 185, 129, 0.88);
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.42);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-body {
    padding: 18px;
}

.meta-line {
    display: flex;
    gap: 8px;
    color: var(--muted-2);
    font-size: 12px;
    margin-bottom: 8px;
}

.movie-card h3 {
    margin: 0 0 8px;
    color: #f8fafc;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--emerald-light);
}

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

.mini-tags span {
    padding: 4px 8px;
    font-size: 12px;
}

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

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    border: 1px solid rgba(51, 65, 85, 0.86);
    border-radius: 24px;
    padding: 22px;
    background: rgba(15, 23, 42, 0.86);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(52, 211, 153, 0.58);
}

.category-glow {
    position: absolute;
    inset: -20% -10% auto auto;
    width: 180px;
    height: 180px;
    border-radius: 999px;
    opacity: 0.18;
    filter: blur(6px);
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

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

.category-preview img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    object-fit: cover;
}

.category-card strong {
    display: block;
    color: white;
    font-size: 22px;
    margin-bottom: 6px;
}

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 52px 92px 1fr 24px;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(30, 41, 59, 0.95);
    border-radius: 18px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.82);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-item:hover {
    transform: translateX(4px);
    border-color: rgba(52, 211, 153, 0.5);
}

.ranking-number {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

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

.ranking-text strong,
.ranking-text em {
    display: block;
}

.ranking-text strong {
    color: #f8fafc;
    margin-bottom: 4px;
}

.ranking-text em {
    color: var(--muted-2);
    font-style: normal;
    font-size: 13px;
}

.ranking-arrow {
    color: var(--emerald-light);
    font-size: 28px;
}

.page-hero {
    padding: 88px 0 74px;
    border-bottom: 1px solid rgba(30, 41, 59, 0.82);
    background:
        radial-gradient(circle at 18% 20%, rgba(16, 185, 129, 0.18), transparent 24rem),
        radial-gradient(circle at 84% 0%, rgba(34, 211, 238, 0.13), transparent 26rem),
        rgba(15, 23, 42, 0.34);
}

.compact-hero h1 {
    max-width: 880px;
    font-size: clamp(36px, 5vw, 58px);
}

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

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

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.filter-bar button {
    border: 1px solid #334155;
    border-radius: 999px;
    padding: 9px 15px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.82);
}

.filter-bar button:hover,
.filter-bar button.is-active {
    color: white;
    border-color: rgba(52, 211, 153, 0.62);
    background: rgba(16, 185, 129, 0.24);
}

.result-line {
    margin-bottom: 20px;
    color: var(--muted);
    font-weight: 650;
}

.search-hero-form {
    max-width: 680px;
    margin-top: 28px;
}

.search-hero-form input {
    width: 100%;
    border-radius: 18px;
    padding: 16px 18px;
}

.search-hero-form button {
    padding: 16px 24px;
}

.detail-hero {
    min-height: 560px;
    display: flex;
    align-items: center;
    background-position: center;
    background-size: cover;
    border-bottom: 1px solid rgba(30, 41, 59, 0.86);
}

.detail-hero-inner {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 34px;
    align-items: center;
    padding: 86px 0 62px;
}

.detail-hero-inner .breadcrumb {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: var(--shadow);
}

.detail-title-block h1 {
    font-size: clamp(34px, 5vw, 62px);
}

.detail-section {
    padding-top: 54px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.92);
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.68));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    padding-left: 6px;
    font-size: 32px;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 18px 44px rgba(16, 185, 129, 0.46);
}

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

.detail-panel,
.related-sidebar {
    border: 1px solid rgba(30, 41, 59, 0.95);
    border-radius: 22px;
    padding: 24px;
    margin-top: 24px;
    background: rgba(15, 23, 42, 0.82);
}

.detail-panel h2,
.related-sidebar h2 {
    margin: 0 0 16px;
    color: white;
    font-size: 24px;
}

.detail-panel p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.9;
}

.detail-panel p + p {
    margin-top: 16px;
}

.detail-panel .one-line {
    color: #fbbf24;
    font-style: italic;
}

.related-sidebar {
    position: sticky;
    top: 90px;
    margin-top: 0;
}

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

.related-card {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 12px;
    align-items: center;
    border: 1px solid rgba(30, 41, 59, 0.92);
    border-radius: 16px;
    padding: 10px;
    background: rgba(2, 6, 23, 0.3);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.related-card:hover {
    transform: translateY(-2px);
    border-color: rgba(52, 211, 153, 0.56);
}

.related-card img {
    width: 112px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
}

.related-card strong,
.related-card em {
    display: block;
}

.related-card strong {
    color: #f8fafc;
    line-height: 1.45;
}

.related-card em {
    margin-top: 4px;
    color: var(--muted-2);
    font-style: normal;
    font-size: 13px;
}

.site-footer {
    border-top: 1px solid rgba(30, 41, 59, 0.92);
    background: rgba(2, 6, 23, 0.74);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    padding: 48px 0;
}

.footer-brand {
    margin-bottom: 14px;
}

.site-footer p {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

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

.footer-links a {
    color: #cbd5e1;
}

.footer-links a:hover {
    color: var(--emerald-light);
}

.footer-bottom {
    border-top: 1px solid rgba(30, 41, 59, 0.72);
    padding: 18px 0;
    color: var(--muted-2);
    text-align: center;
    font-size: 14px;
}

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

@media (max-width: 1080px) {
    .desktop-nav .nav-lite {
        display: none;
    }

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

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

    .related-sidebar {
        position: static;
    }
}

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

    .mobile-menu-button {
        display: grid;
        place-items: center;
        margin-left: auto;
    }

    .hero-carousel {
        min-height: 640px;
    }

    .hero-control {
        display: none;
    }

    .quick-panel,
    .ranking-grid,
    .footer-grid,
    .detail-hero-inner {
        grid-template-columns: 1fr;
    }

    .quick-panel {
        margin-top: 18px;
    }

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

@media (max-width: 640px) {
    .container,
    .header-inner,
    .hero-content {
        width: min(100% - 24px, 1180px);
    }

    .brand {
        font-size: 18px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-title-block h1 {
        font-size: 34px;
    }

    .hero-content p,
    .page-hero p,
    .detail-title-block p {
        font-size: 16px;
    }

    .section-block {
        padding: 48px 0;
    }

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

    .ranking-item {
        grid-template-columns: 42px 78px 1fr;
    }

    .ranking-arrow {
        display: none;
    }

    .related-card {
        grid-template-columns: 94px 1fr;
    }

    .related-card img {
        width: 94px;
        height: 64px;
    }

    .search-hero-form {
        display: grid;
    }

    .search-hero-form input,
    .search-hero-form button {
        width: 100%;
    }
}
