:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(30, 41, 59, 0.92);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --emerald: #10b981;
    --emerald-strong: #059669;
    --cyan: #22d3ee;
    --amber: #f59e0b;
    --shadow: 0 25px 80px rgba(2, 6, 23, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 15% 5%, rgba(16, 185, 129, 0.16), transparent 28rem),
        radial-gradient(circle at 85% 20%, rgba(34, 211, 238, 0.11), transparent 24rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
}

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

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

.brand span:last-child,
.footer-brand {
    background: linear-gradient(90deg, #34d399, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #052e2b;
    background: linear-gradient(135deg, #34d399, #22d3ee);
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.45);
}

.desktop-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    font-size: 0.95rem;
    color: #dbeafe;
}

.desktop-nav a,
.mobile-panel a,
.site-footer nav a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.site-footer nav a:hover,
.text-link:hover {
    color: #34d399;
}

.header-search,
.mobile-search,
.large-search,
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-search {
    width: 260px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(51, 65, 85, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.header-search input,
.mobile-search input,
.large-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font: inherit;
}

.header-search input::placeholder,
.mobile-search input::placeholder,
.large-search input::placeholder,
.filter-bar input::placeholder {
    color: #94a3b8;
}

.header-search button,
.mobile-search button,
.large-search button {
    border: 0;
    border-radius: 999px;
    color: #022c22;
    background: linear-gradient(135deg, #34d399, #22d3ee);
    padding: 8px 16px;
    font-weight: 700;
    cursor: pointer;
}

.mobile-menu-btn {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    color: var(--text);
    background: rgba(51, 65, 85, 0.6);
    cursor: pointer;
}

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

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

.mobile-search {
    padding: 8px;
    border-radius: 18px;
    background: rgba(51, 65, 85, 0.72);
}

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

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

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

.hero-slide img {
    height: 100%;
    min-height: 78vh;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 45%, rgba(34, 211, 238, 0.18), transparent 20rem),
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.78) 42%, rgba(2, 6, 23, 0.28) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.9) 0%, transparent 35%);
}

.hero-content {
    position: absolute;
    top: 50%;
    left: max(24px, calc((100vw - 1180px) / 2));
    width: min(650px, calc(100% - 48px));
    transform: translateY(-50%);
    padding: 34px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.34));
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.eyebrow,
.section-kicker {
    margin: 0 0 10px;
    color: #34d399;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1 {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 5.6rem);
    line-height: 1;
    letter-spacing: -0.06em;
}

.hero-summary,
.page-hero p,
.intro-search p {
    color: #cbd5e1;
    font-size: 1.06rem;
}

.hero-summary {
    max-width: 48rem;
    margin: 22px 0;
}

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

.hero-tags span,
.movie-tags span,
.detail-tags span,
.meta-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #d1fae5;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.24);
    padding: 5px 11px;
    font-size: 0.8rem;
}

.hero-actions,
.page-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

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

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary,
.btn.block {
    color: #022c22;
    background: linear-gradient(135deg, #34d399, #22d3ee);
    box-shadow: 0 18px 32px rgba(16, 185, 129, 0.25);
}

.btn.secondary {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn.block {
    width: 100%;
    margin-top: 18px;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 30px;
    display: flex;
    align-items: center;
    gap: 14px;
    transform: translateX(-50%);
    padding: 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(12px);
}

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-arrow {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.12);
    font-size: 1.8rem;
    line-height: 1;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.hero-dot.is-active {
    width: 28px;
    background: linear-gradient(90deg, #34d399, #22d3ee);
}

.section {
    padding: 64px 0;
}

.section-heading,
.intro-search,
.panel-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.section-heading h2,
.panel-head h2,
.site-footer h2,
.content-card h2 {
    margin: 0;
    font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.text-link {
    color: #67e8f9;
    font-weight: 800;
}

.intro-search {
    align-items: center;
    padding: 30px;
    margin-top: -42px;
    position: relative;
    z-index: 5;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.66));
    box-shadow: var(--shadow);
}

.intro-search h2 {
    margin: 0;
    font-size: clamp(1.6rem, 4vw, 2.7rem);
}

.large-search {
    min-width: min(460px, 100%);
    padding: 8px;
    border-radius: 24px;
    background: rgba(2, 6, 23, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.large-search input {
    padding: 0 12px;
}

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

.category-grid.wide {
    grid-template-columns: repeat(4, 1fr);
}

.category-card {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: #0f172a;
    box-shadow: 0 14px 42px rgba(2, 6, 23, 0.28);
}

.category-card img {
    height: 100%;
    min-height: 210px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

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

.category-card strong,
.category-card em {
    position: absolute;
    left: 20px;
    right: 20px;
    z-index: 2;
}

.category-card strong {
    bottom: 60px;
    font-size: 1.35rem;
}

.category-card em {
    bottom: 20px;
    color: #cbd5e1;
    font-size: 0.92rem;
    font-style: normal;
}

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

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

.compact-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.88));
    box-shadow: 0 16px 38px rgba(2, 6, 23, 0.25);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(52, 211, 153, 0.35);
    box-shadow: 0 22px 52px rgba(2, 6, 23, 0.42), 0 0 0 1px rgba(16, 185, 129, 0.09);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

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

.poster-play,
.poster-score {
    position: absolute;
    z-index: 2;
}

.poster-play {
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #022c22;
    background: linear-gradient(135deg, #34d399, #22d3ee);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
    transform: translate(-50%, -50%) scale(0.82);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.poster-score {
    right: 12px;
    top: 12px;
    border-radius: 999px;
    color: #1c1917;
    background: #fbbf24;
    padding: 4px 9px;
    font-size: 0.82rem;
    font-weight: 900;
}

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

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

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

.movie-meta,
.movie-one-line {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.88rem;
}

.movie-one-line {
    min-height: 2.8em;
}

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

.ranking-panel,
.content-card,
.detail-side-card,
.filter-bar {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.82));
    box-shadow: 0 16px 48px rgba(2, 6, 23, 0.28);
}

.ranking-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
}

.ranking-panel.large {
    position: sticky;
    top: 92px;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.ranking-item:hover {
    background: rgba(16, 185, 129, 0.1);
}

.ranking-num {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: #022c22;
    background: linear-gradient(135deg, #34d399, #22d3ee);
    font-weight: 900;
}

.ranking-title {
    overflow: hidden;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-meta {
    color: var(--muted);
    font-size: 0.84rem;
}

.page-hero {
    padding: 76px 0 24px;
}

.page-hero p {
    max-width: 780px;
}

.filter-bar {
    margin-bottom: 28px;
    padding: 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 160px;
}

.filter-bar input,
.filter-bar select {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.48);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.filter-bar select option {
    color: #0f172a;
}

.empty-state {
    display: none;
    color: #cbd5e1;
    text-align: center;
    padding: 36px;
}

.empty-state.is-visible {
    display: block;
}

.rank-page {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 24px;
}

.detail-main {
    padding: 34px 0 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    color: #cbd5e1;
    font-size: 0.9rem;
}

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

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

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    background: #000;
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: var(--shadow);
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.66));
    cursor: pointer;
    z-index: 4;
}

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

.player-play {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #022c22;
    background: linear-gradient(135deg, #34d399, #22d3ee);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    font-size: 2.1rem;
    transform: translateX(4px);
}

.player-message {
    position: absolute;
    left: 50%;
    bottom: 24px;
    max-width: calc(100% - 40px);
    transform: translateX(-50%);
    color: #fecaca;
    background: rgba(127, 29, 29, 0.72);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.9rem;
    z-index: 5;
}

.player-message:empty {
    display: none;
}

.content-card {
    margin-top: 24px;
    padding: 26px;
}

.content-card h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.1;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.content-card p {
    color: #cbd5e1;
}

.detail-side-card {
    padding: 18px;
    margin-bottom: 20px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 20px;
    margin-bottom: 16px;
    background: #0f172a;
}

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

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

.related-card {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.56);
}

.related-card:hover {
    background: rgba(16, 185, 129, 0.1);
}

.related-card img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

.related-card strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-card span {
    color: var(--muted);
    font-size: 0.84rem;
}

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.92));
    padding: 48px 0 24px;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 30px;
}

.site-footer p {
    color: var(--muted);
}

.site-footer nav {
    display: grid;
    gap: 8px;
    color: #cbd5e1;
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 30px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    text-align: center;
}

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

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

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

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

    .split-layout,
    .rank-page,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .ranking-panel,
    .ranking-panel.large {
        position: static;
    }
}

@media (max-width: 760px) {
    .header-inner {
        height: 62px;
    }

    .hero-carousel,
    .hero-slide img {
        min-height: 690px;
    }

    .hero-content {
        top: auto;
        left: 16px;
        right: 16px;
        bottom: 86px;
        width: auto;
        transform: none;
        padding: 22px;
        border-radius: 24px;
    }

    .intro-search,
    .section-heading,
    .panel-head {
        display: grid;
        align-items: start;
    }

    .large-search,
    .filter-bar {
        min-width: 0;
        width: 100%;
    }

    .filter-bar {
        grid-template-columns: 1fr;
    }

    .movie-grid,
    .featured-grid,
    .compact-grid,
    .category-grid,
    .category-grid.wide {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

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

    .movie-one-line {
        min-height: 0;
    }

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

    .content-card,
    .detail-side-card {
        padding: 18px;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .featured-grid,
    .compact-grid,
    .category-grid,
    .category-grid.wide {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .page-actions,
    .detail-actions {
        display: grid;
    }

    .btn {
        width: 100%;
    }
}
