:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: #111827;
    --line: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --emerald: #34d399;
    --cyan: #22d3ee;
    --amber: #f59e0b;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.14), transparent 32rem),
        radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.12), transparent 28rem),
        var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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: 65vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.header-inner {
    width: min(1240px, 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.04em;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #052e2b;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 0 28px rgba(52, 211, 153, 0.25);
}

.brand-name,
.footer-brand {
    font-size: 21px;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

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

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

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

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

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
    height: 40px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    outline: none;
    border-radius: 999px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.9);
    padding: 0 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-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(52, 211, 153, 0.8);
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.1);
}

.header-search button,
.mobile-search button,
.filter-bar button,
.primary-button,
.secondary-button,
.text-link {
    border: 0;
    border-radius: 999px;
    color: #052e2b;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    font-weight: 800;
    padding: 10px 18px;
    box-shadow: 0 18px 36px rgba(16, 185, 129, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.filter-bar button:hover,
.primary-button:hover,
.secondary-button:hover,
.text-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 48px rgba(16, 185, 129, 0.24);
}

.secondary-button {
    color: var(--text);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: none;
}

.primary-button.small {
    padding: 8px 14px;
    font-size: 14px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.88);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: var(--text);
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.98);
    padding: 16px;
}

.mobile-panel nav {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    border-bottom: 1px solid var(--line);
}

.hero-stage {
    position: relative;
    height: min(760px, 76vh);
    min-height: 560px;
}

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.75) 38%, rgba(2, 6, 23, 0.16) 100%),
        linear-gradient(0deg, var(--bg) 0%, transparent 44%);
}

.hero-content {
    position: absolute;
    left: max(7vw, calc((100vw - 1240px) / 2));
    bottom: 92px;
    width: min(680px, calc(100% - 48px));
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--emerald);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.hero h1 {
    margin: 14px 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.08em;
}

.hero p {
    max-width: 620px;
    margin: 0;
    color: var(--soft);
    font-size: 18px;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags span,
.tag-row span {
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: 999px;
    color: #baf7de;
    background: rgba(16, 185, 129, 0.08);
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-control {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 50%;
    color: var(--text);
    background: rgba(15, 23, 42, 0.62);
    transform: translateY(-50%);
    font-size: 30px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(16, 185, 129, 0.32);
    transform: translateY(-50%) scale(1.05);
}

.hero-control.prev {
    left: 28px;
}

.hero-control.next {
    right: 28px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.55);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.section {
    padding: 72px 0;
}

.section-muted {
    background: rgba(15, 23, 42, 0.32);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section-inner,
.footer-inner,
.detail-layout {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

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

.section-heading.compact {
    align-items: center;
    margin-bottom: 22px;
}

.section-heading h2,
.intro-strip h2,
.page-hero h1,
.detail-content h1 {
    margin: 4px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.06em;
}

.section-heading a {
    color: var(--emerald);
    font-weight: 800;
}

.intro-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
    align-items: center;
}

.intro-strip p,
.page-hero p {
    color: var(--muted);
    max-width: 760px;
    margin: 12px 0 0;
}

.intro-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.intro-actions a {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.62);
    padding: 12px 16px;
    font-weight: 800;
}

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

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

.catalog-grid {
    margin-top: 28px;
}

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

.movie-card,
.category-card,
.sidebar-card,
.detail-content,
.player-card,
.rank-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(15, 23, 42, 0.92));
    box-shadow: var(--shadow);
}

.movie-card {
    overflow: hidden;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(52, 211, 153, 0.5);
    box-shadow: 0 30px 70px rgba(16, 185, 129, 0.14);
    transform: translateY(-5px);
}

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

.movie-card:not(.large-card) .poster-link {
    aspect-ratio: 3 / 4;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.85));
}

.play-chip {
    position: absolute;
    right: 12px;
    bottom: 12px;
    border-radius: 999px;
    color: #052e2b;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 900;
}

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

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.movie-meta span,
.detail-meta span {
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.1);
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.25;
}

.movie-card p {
    min-height: 3.1em;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
}

.large-card {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
}

.large-card .poster-link {
    height: 100%;
}

.large-card .movie-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 22px;
}

.large-card h3 {
    font-size: 24px;
}

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

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

.category-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    overflow: hidden;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-visual {
    position: relative;
    min-height: 210px;
    overflow: hidden;
}

.category-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-visual span {
    position: absolute;
    left: 14px;
    bottom: 14px;
    border-radius: 999px;
    color: #052e2b;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    padding: 8px 12px;
    font-weight: 900;
}

.category-body {
    padding: 22px;
}

.category-body h2 {
    margin: 0 0 8px;
    font-size: 25px;
}

.category-body p {
    margin: 0 0 14px;
    color: var(--muted);
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.category-samples a {
    border-radius: 999px;
    color: var(--soft);
    background: rgba(148, 163, 184, 0.1);
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}

.text-link {
    display: inline-flex;
    padding: 9px 14px;
}

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

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

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

.rank-item {
    display: grid;
    grid-template-columns: auto 76px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.64);
    padding: 10px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

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

.rank-number {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #052e2b;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    font-size: 13px;
    font-weight: 900;
}

.rank-item img {
    width: 76px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    background: #0f172a;
}

.rank-text {
    min-width: 0;
}

.rank-text strong,
.rank-text em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-text strong {
    font-size: 15px;
}

.rank-text em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 15% 20%, rgba(52, 211, 153, 0.18), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.98));
}

.small-hero {
    padding: 82px 0 72px;
}

.page-hero-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.category-hero.amber,
.category-card.amber .category-visual span {
    --emerald: #f59e0b;
    --cyan: #fde047;
}

.category-hero.cyan,
.category-card.cyan .category-visual span {
    --emerald: #22d3ee;
    --cyan: #38bdf8;
}

.category-hero.blue,
.category-card.blue .category-visual span {
    --emerald: #60a5fa;
    --cyan: #22d3ee;
}

.category-hero.green,
.category-card.green .category-visual span {
    --emerald: #4ade80;
    --cyan: #34d399;
}

.category-hero.rose,
.category-card.rose .category-visual span {
    --emerald: #fb7185;
    --cyan: #f43f5e;
}

.category-hero.pink,
.category-card.pink .category-visual span {
    --emerald: #f472b6;
    --cyan: #fb7185;
}

.category-hero.violet,
.category-card.violet .category-visual span {
    --emerald: #a78bfa;
    --cyan: #c084fc;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 210px 180px auto;
    gap: 14px;
    align-items: end;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.7);
    padding: 18px;
}

.filter-bar label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    border-radius: 14px;
}

.empty-message {
    display: none;
    margin: 28px 0 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    background: rgba(15, 23, 42, 0.7);
    padding: 28px;
    text-align: center;
}

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

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

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

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

.breadcrumb strong {
    color: var(--soft);
    font-weight: 800;
}

.player-card {
    position: relative;
    overflow: hidden;
    background: #000;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--text);
    background: #000;
    padding: 0;
    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.62;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.18), rgba(2, 6, 23, 0.75));
}

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

.play-badge {
    position: relative;
    z-index: 2;
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #052e2b;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 0 0 14px rgba(52, 211, 153, 0.14), 0 30px 60px rgba(0, 0, 0, 0.45);
    font-size: 32px;
    transform: translateX(2px);
}

.detail-content {
    margin-top: 24px;
    padding: 28px;
}

.detail-title-row {
    display: flex;
    gap: 18px;
    align-items: start;
    justify-content: space-between;
}

.detail-meta {
    margin: 18px 0;
}

.one-line {
    color: var(--soft);
    font-size: 18px;
    margin: 0 0 18px;
}

.detail-tags {
    margin-bottom: 24px;
}

.text-section {
    border-top: 1px solid var(--line);
    padding-top: 22px;
    margin-top: 22px;
}

.text-section h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.text-section p {
    margin: 0;
    color: var(--soft);
}

.detail-sidebar {
    position: sticky;
    top: 92px;
}

.sidebar-card {
    padding: 22px;
}

.sidebar-card h2 {
    margin: 0 0 18px;
    font-size: 22px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.96);
    padding: 44px 0 24px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.footer-inner p {
    color: var(--muted);
    max-width: 560px;
    margin: 12px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    justify-content: flex-end;
}

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

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

.copyright {
    width: min(1240px, calc(100% - 32px));
    margin: 30px auto 0;
    border-top: 1px solid var(--line);
    color: #64748b;
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
}

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

    .menu-toggle {
        display: block;
    }

    .header-search {
        margin-left: auto;
    }

    body.menu-open .mobile-panel {
        display: block;
    }

    .two-columns,
    .detail-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .rank-panel,
    .detail-sidebar {
        position: static;
    }

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

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

    .header-search {
        display: none;
    }

    .hero-stage {
        height: 72vh;
        min-height: 520px;
    }

    .hero-content {
        left: 20px;
        bottom: 84px;
        width: calc(100% - 40px);
    }

    .hero-control {
        display: none;
    }

    .intro-grid,
    .featured-grid,
    .category-grid,
    .category-grid.full,
    .rank-list.wide,
    .filter-bar {
        grid-template-columns: 1fr;
    }

    .intro-actions {
        justify-content: flex-start;
    }

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

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

    .large-card .poster-link,
    .category-visual {
        min-height: 240px;
    }

    .section {
        padding: 52px 0;
    }

    .section-heading,
    .detail-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .small-hero {
        padding: 58px 0 52px;
    }
}

@media (max-width: 560px) {
    .brand-name {
        font-size: 18px;
    }

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

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

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

    .rank-item {
        grid-template-columns: auto 64px minmax(0, 1fr);
    }

    .rank-item img {
        width: 64px;
        height: 48px;
    }

    .detail-content,
    .sidebar-card {
        padding: 20px;
    }
}
