:root {
    color-scheme: dark;
    --bg-deep: #020617;
    --bg-main: #0f172a;
    --bg-soft: #1e293b;
    --bg-card: rgba(15, 23, 42, 0.78);
    --bg-card-strong: rgba(30, 41, 59, 0.92);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --weak: #94a3b8;
    --brand: #10b981;
    --brand-soft: rgba(16, 185, 129, 0.18);
    --cyan: #22d3ee;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.18), transparent 28rem),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 24rem),
        linear-gradient(180deg, #0f172a 0%, #111827 42%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.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(0, 0, 0, 0.24);
    backdrop-filter: blur(18px);
}

.nav-wrap,
.main-container,
.footer-inner,
.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

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

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
    color: #06251c;
    box-shadow: 0 14px 30px rgba(16, 185, 129, 0.22);
}

.brand-name {
    font-size: 1.55rem;
    background: linear-gradient(90deg, #6ee7b7, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--muted);
    font-weight: 600;
}

.nav-link {
    position: relative;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link.active,
.mobile-link:hover {
    color: #6ee7b7;
}

.nav-link.active::after,
.nav-link:hover::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand), var(--cyan));
}

.menu-button {
    width: 42px;
    height: 42px;
    display: none;
    place-items: center;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.68);
}

.menu-button span {
    width: 20px;
    height: 2px;
    display: block;
    margin: 3px auto;
    border-radius: 2px;
    background: var(--muted);
}

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

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

.mobile-link {
    padding: 10px 0;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

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

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

.hero-slide {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
    transform: scale(1.02);
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.2) 0%, rgba(2, 6, 23, 0.72) 68%, #0f172a 100%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.45) 46%, rgba(2, 6, 23, 0.2) 100%);
}

.hero-copy {
    position: absolute;
    left: max(24px, calc((100vw - 1180px) / 2));
    bottom: 98px;
    max-width: 720px;
    padding-right: 24px;
}

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

.hero-tags span,
.detail-tags span,
.mini-tags span,
.card-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: #a7f3d0;
    border: 1px solid rgba(16, 185, 129, 0.24);
    font-size: 0.82rem;
    line-height: 1;
}

.card-meta span {
    min-height: 24px;
    padding: 4px 8px;
    color: var(--muted);
    background: rgba(51, 65, 85, 0.72);
    border-color: transparent;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 18px 0 16px;
    font-size: clamp(2.6rem, 6vw, 5.3rem);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.05em;
    text-shadow: 0 8px 34px rgba(0, 0, 0, 0.5);
}

.hero-copy p {
    margin: 0;
    max-width: 680px;
    color: #e2e8f0;
    font-size: 1.12rem;
    line-height: 1.85;
}

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

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

.primary-button,
.inline-search button,
.hero-search button {
    background: linear-gradient(135deg, var(--brand), #059669);
    color: white;
    box-shadow: 0 14px 30px rgba(16, 185, 129, 0.24);
}

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

.ghost-button {
    background: rgba(15, 23, 42, 0.62);
    color: #d1fae5;
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.primary-button.full {
    width: 100%;
    margin-top: 16px;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.38);
    color: white;
    font-size: 2rem;
    line-height: 1;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.hero-search,
.inline-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero-search {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 42px;
    z-index: 7;
    width: min(420px, calc(100% - 48px));
}

.hero-search input,
.inline-search input,
.filter-bar input {
    width: 100%;
    min-height: 44px;
    border: 0;
    outline: 0;
    border-radius: 999px;
    padding: 0 16px;
    background: transparent;
    color: var(--text);
}

.main-container {
    padding: 56px 0 76px;
}

.content-section {
    margin-bottom: 64px;
}

.content-section.soft-panel,
.category-section,
.ranking-panel,
.primary-list,
.side-panel,
.detail-card,
.side-info {
    border: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.64), rgba(15, 23, 42, 0.72));
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.content-section.soft-panel,
.category-section,
.ranking-panel,
.primary-list {
    padding: 32px;
}

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

.section-head h2,
.footer-col h2,
.side-panel h2,
.detail-card h2,
.side-info h2 {
    margin: 0 0 8px;
    color: white;
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 850;
}

.section-head p,
.footer-brand p,
.side-info p,
.detail-card p,
.page-hero p,
.movie-card p,
.ranking-body p {
    margin: 0;
    color: var(--muted);
    line-height: 1.78;
}

.section-more {
    color: #6ee7b7;
    font-weight: 800;
}

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

.search-grid {
    align-items: stretch;
}

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(16, 185, 129, 0.42);
    box-shadow: 0 24px 70px rgba(16, 185, 129, 0.12);
}

.card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
}

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

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

.card-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.92);
    color: white;
    font-size: 0.85rem;
    font-weight: 800;
}

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 12px 0 8px;
    color: white;
    font-size: 1.08rem;
    line-height: 1.35;
}

.card-body h3 a:hover,
.ranking-body h2 a:hover {
    color: #6ee7b7;
}

.card-body p {
    display: -webkit-box;
    min-height: 3.4em;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 0.94rem;
}

.mini-tags {
    margin-top: 14px;
}

.mini-tags span {
    min-height: 22px;
    padding: 4px 8px;
    font-size: 0.76rem;
}

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

.category-card,
.category-overview-card {
    min-height: 168px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    padding: 22px;
    border: 1px solid rgba(16, 185, 129, 0.18);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 60%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.82));
    transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card span,
.category-overview-card span {
    color: white;
    font-size: 1.22rem;
    font-weight: 850;
}

.category-card p,
.category-overview-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

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

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

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

.rank-row {
    display: grid;
    grid-template-columns: auto 72px 1fr;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: rgba(16, 185, 129, 0.42);
}

.rank-row img {
    width: 72px;
    height: 54px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-num {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
    color: #022c22;
    font-weight: 900;
}

.rank-info strong,
.rank-info em {
    display: block;
}

.rank-info strong {
    color: white;
    line-height: 1.3;
}

.rank-info em {
    margin-top: 5px;
    color: var(--weak);
    font-size: 0.85rem;
    font-style: normal;
}

.page-hero {
    min-height: 300px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    padding: 72px 0 44px;
}

.compact-hero,
.category-hero {
    border-bottom: 1px solid var(--line);
}

.page-hero h1 {
    margin: 12px 0 14px;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    line-height: 1;
    letter-spacing: -0.04em;
    font-weight: 900;
}

.inline-search {
    width: min(420px, 100%);
    flex: 0 0 auto;
}

.filter-bar {
    margin-bottom: 22px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
}

.filter-bar.wide {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

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

.side-panel {
    position: sticky;
    top: 96px;
    padding: 24px;
}

.ranking-grid {
    display: grid;
    gap: 18px;
}

.ranking-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
}

.ranking-cover {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
}

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

.ranking-cover span {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(16, 185, 129, 0.95);
    color: white;
    font-weight: 900;
}

.ranking-body h2 {
    margin: 0 0 10px;
    color: white;
    font-size: 1.45rem;
}

.ranking-body .card-meta {
    margin-top: 14px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--weak);
    margin-bottom: 24px;
}

.breadcrumb a:hover {
    color: #6ee7b7;
}

.detail-container {
    padding-top: 34px;
}

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

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

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-xl);
    background: #020617;
    border: 1px solid rgba(16, 185, 129, 0.22);
    box-shadow: var(--shadow);
}

.stream-player {
    width: 100%;
    height: 100%;
    background: #020617;
    object-fit: cover;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(2, 6, 23, 0.36);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
}

.play-button {
    position: relative;
    z-index: 2;
    min-width: 150px;
    min-height: 54px;
    padding: 0 28px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
    color: #022c22;
    font-weight: 900;
    font-size: 1.05rem;
    box-shadow: 0 16px 46px rgba(16, 185, 129, 0.36);
}

.player-shell.is-ready .player-cover,
.player-shell.is-playing .player-cover {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-card {
    padding: 28px;
}

.detail-card h1 {
    margin: 16px 0 14px;
    color: white;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.lead-text {
    color: #a7f3d0 !important;
    font-size: 1.08rem;
}

.detail-tags {
    margin: 22px 0 28px;
}

.detail-card h2 {
    margin-top: 28px;
    font-size: 1.4rem;
}

.detail-side {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 96px;
}

.detail-poster {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-xl);
    object-fit: cover;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.side-info {
    padding: 22px;
}

.related-section {
    margin-top: 42px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.74), rgba(2, 6, 23, 0.98));
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(180px, 0.7fr));
    gap: 32px;
    padding: 46px 0;
}

.footer-logo {
    margin-bottom: 16px;
}

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

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

.footer-links a:hover {
    color: #6ee7b7;
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: var(--weak);
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
}

.hidden-by-search {
    display: none !important;
}

@media (max-width: 1080px) {
    .nav-links {
        gap: 14px;
        font-size: 0.92rem;
    }

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

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

    .side-panel,
    .detail-side {
        position: static;
    }
}

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

    .menu-button {
        display: block;
    }

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

    .hero-copy {
        left: 20px;
        right: 20px;
        bottom: 160px;
        padding-right: 0;
    }

    .hero-search {
        left: 20px;
        right: 20px;
        bottom: 70px;
        width: auto;
    }

    .hero-arrow {
        display: none;
    }

    .page-hero {
        min-height: 360px;
        display: grid;
        align-content: end;
    }

    .inline-search {
        width: 100%;
    }

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

    .rank-list,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .ranking-card {
        grid-template-columns: 1fr;
    }

    .ranking-cover img {
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 560px) {
    .nav-wrap,
    .main-container,
    .footer-inner,
    .page-hero,
    .copyright {
        width: min(100% - 24px, 1180px);
    }

    .brand-name {
        font-size: 1.25rem;
    }

    .hero-copy h1,
    .hero-copy h2 {
        font-size: 2.4rem;
    }

    .hero-actions,
    .hero-search,
    .inline-search {
        align-items: stretch;
        flex-direction: column;
        border-radius: 22px;
    }

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

    .content-section.soft-panel,
    .category-section,
    .ranking-panel,
    .primary-list,
    .detail-card {
        padding: 20px;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }
}
