:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: #111827;
    --bg-card-strong: #1e293b;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.22);
    --accent: #10b981;
    --accent-strong: #059669;
    --accent-soft: rgba(16, 185, 129, 0.16);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    --radius: 18px;
}

* {
    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 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #22d3ee);
    box-shadow: 0 0 28px rgba(16, 185, 129, 0.45);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 19px;
}

.brand-text small {
    margin-top: 4px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}

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

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

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link.is-active,
.mobile-nav-link:hover {
    color: var(--accent);
}

.header-search {
    width: 250px;
    height: 42px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.92);
}

.header-search input,
.mobile-search input,
.large-search input,
.filter-panel input,
.filter-panel select {
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.header-search input {
    width: 100%;
    padding: 0 12px;
}

.header-search button {
    width: 44px;
    height: 42px;
    border: 0;
    color: var(--accent);
    cursor: pointer;
    background: transparent;
}

.menu-toggle {
    display: none;
    border: 0;
    color: #fff;
    background: transparent;
    font-size: 26px;
    cursor: pointer;
}

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

.mobile-nav.is-open {
    display: block;
}

.mobile-nav-link {
    display: block;
    padding: 10px 0;
    color: #cbd5e1;
    font-weight: 700;
}

.mobile-search {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.mobile-search input {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    background: #1e293b;
}

.mobile-search button,
.large-search button,
.filter-panel button {
    border: 0;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

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

.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-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.1)),
        linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.95));
}

.hero-content {
    position: absolute;
    z-index: 3;
    left: max(32px, calc((100% - 1240px) / 2));
    bottom: 13vh;
    width: min(650px, calc(100% - 64px));
}

.hero-copy-static {
    position: absolute;
    z-index: 4;
    left: max(32px, calc((100% - 1240px) / 2));
    top: 94px;
    width: min(650px, calc(100% - 64px));
}

.hero-copy-static h1 {
    margin: 0;
    font-size: clamp(30px, 5vw, 60px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy-static p {
    max-width: 560px;
    margin: 14px 0 0;
    color: #dbeafe;
    font-size: 17px;
}

.hero-kicker,
.page-kicker,
.section-kicker {
    color: var(--accent);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-content h2 {
    margin: 12px 0;
    font-size: clamp(34px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-line {
    max-width: 620px;
    color: #e2e8f0;
    font-size: 18px;
}

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

.hero-tags span,
.tag-row span {
    padding: 6px 10px;
    border: 1px solid rgba(16, 185, 129, 0.38);
    border-radius: 999px;
    color: #bbf7d0;
    background: rgba(16, 185, 129, 0.13);
    font-size: 13px;
    font-weight: 700;
}

.hero-actions,
.detail-info .btn {
    margin-top: 28px;
}

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

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

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 16px 34px rgba(16, 185, 129, 0.28);
}

.btn-ghost {
    margin-left: 10px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(12px);
}

.hero-control {
    position: absolute;
    z-index: 8;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.42);
    cursor: pointer;
    font-size: 34px;
    transform: translateY(-50%);
}

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

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

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

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

.quick-panel,
.content-section,
.page-hero,
.detail-main,
.site-footer {
    width: min(1240px, calc(100% - 32px));
    margin-inline: auto;
}

.quick-panel {
    position: relative;
    z-index: 12;
    margin-top: -42px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.large-search {
    display: flex;
    gap: 14px;
}

.large-search input {
    flex: 1;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.86);
}

.large-search button {
    padding: 0 26px;
    font-weight: 800;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.quick-links a {
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.6);
}

.content-section {
    padding: 68px 0 0;
}

.section-title {
    margin-bottom: 24px;
}

.section-title h2,
.page-hero h1,
.detail-info h1,
.player-section h2,
.detail-content h2 {
    margin: 8px 0;
    line-height: 1.15;
}

.section-title h2,
.page-hero h1 {
    font-size: clamp(28px, 4vw, 46px);
}

.section-title p,
.page-hero p,
.category-preview p,
.category-card p,
.movie-line,
.detail-content p,
.site-footer p,
.detail-one-line {
    color: var(--muted);
}

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

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.86);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(16, 185, 129, 0.44);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #111827;
}

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

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

.year-badge,
.rank-badge,
.play-chip {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 800;
}

.year-badge {
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    color: #fff;
    background: rgba(15, 23, 42, 0.78);
    font-size: 12px;
}

.rank-badge {
    top: 10px;
    left: 10px;
    min-width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.play-chip {
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(16, 185, 129, 0.85);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-card-body h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
}

.movie-card-body h3 a:hover {
    color: var(--accent);
}

.movie-meta {
    margin: 8px 0 6px;
    color: #94a3b8;
    font-size: 13px;
}

.movie-line {
    min-height: 3.2em;
    margin: 0 0 12px;
    font-size: 14px;
}

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

.rank-aside {
    position: sticky;
    top: 92px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.9);
}

.rank-aside-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.rank-aside-head h2 {
    margin: 0;
}

.rank-aside-head a,
.category-preview-head a {
    color: var(--accent);
    font-weight: 800;
}

.rank-row {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.rank-row span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(16, 185, 129, 0.22);
    font-weight: 800;
}

.rank-row strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-row em {
    grid-column: 2;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.category-showcase {
    display: grid;
    gap: 34px;
}

.category-preview {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.62);
}

.category-preview-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.category-preview h3 {
    margin: 0 0 6px;
    font-size: 24px;
}

.page-main {
    padding-bottom: 76px;
}

.page-hero {
    margin-top: 34px;
    padding: 58px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.28), transparent 24rem),
        linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(2, 6, 23, 0.92));
    box-shadow: var(--shadow);
}

.ranking-hero {
    background:
        radial-gradient(circle at 70% 10%, rgba(245, 158, 11, 0.24), transparent 22rem),
        linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(2, 6, 23, 0.95));
}

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

.category-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
}

.category-card-main {
    display: block;
    padding: 26px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(30, 41, 59, 0.42));
}

.category-card-main span {
    color: var(--accent);
    font-weight: 800;
}

.category-card-main h2 {
    margin: 8px 0;
    font-size: 30px;
}

.category-samples {
    display: grid;
    gap: 8px;
    padding: 18px 26px 24px;
}

.category-samples a {
    color: #cbd5e1;
}

.category-samples a:hover {
    color: var(--accent);
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
}

.filter-panel label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.78);
}

.filter-panel select option {
    color: #111827;
}

[data-card].is-hidden {
    display: none;
}

.detail-main {
    padding: 28px 0 76px;
}

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

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

.detail-hero {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 34px;
    margin-top: 24px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        radial-gradient(circle at 80% 0%, rgba(16, 185, 129, 0.22), transparent 26rem),
        rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    background: #111827;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 3 / 4;
}

.detail-info h1 {
    font-size: clamp(34px, 5vw, 64px);
}

.detail-one-line {
    max-width: 760px;
    font-size: 18px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0;
}

.detail-meta-grid span {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.52);
}

.detail-meta-grid b {
    display: block;
    margin-bottom: 4px;
    color: var(--accent);
}

.player-section,
.detail-content,
.detail-nav,
.related-section {
    margin-top: 34px;
}

.player-section h2,
.detail-content h2 {
    font-size: 28px;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.86));
}

.player-overlay span {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 20px 50px rgba(16, 185, 129, 0.32);
    font-size: 34px;
}

.player-overlay strong {
    font-size: 20px;
}

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

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

.detail-content article {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
}

.detail-content p {
    font-size: 16px;
}

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

.detail-nav a {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.58);
}

.detail-nav a:hover {
    color: var(--accent);
    border-color: rgba(16, 185, 129, 0.4);
}

.site-footer {
    padding: 74px 0 34px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
}

.footer-brand {
    margin-bottom: 10px;
    color: #fff;
    font-size: 22px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--accent);
    font-size: 18px;
}

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

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

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

.footer-bottom {
    padding-top: 24px;
    color: var(--muted);
    text-align: center;
}

.back-to-top {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 40;
    width: 46px;
    height: 46px;
    display: none;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--accent);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
    cursor: pointer;
}

.back-to-top.is-visible {
    display: block;
}

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

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

    .small-grid,
    .compact-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .split-section,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .rank-aside {
        position: static;
    }
}

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

    .brand-text strong {
        font-size: 17px;
    }

    .hero {
        min-height: 78vh;
    }

    .hero-copy-static {
        top: 78px;
    }

    .hero-content {
        bottom: 92px;
    }

    .hero-control {
        display: none;
    }

    .btn-ghost {
        margin: 10px 0 0;
    }

    .quick-panel {
        margin-top: -24px;
        padding: 16px;
    }

    .large-search,
    .category-preview-head,
    .detail-nav {
        flex-direction: column;
        display: flex;
    }

    .large-search button {
        min-height: 48px;
    }

    .movie-grid,
    .small-grid,
    .compact-grid,
    .latest-grid,
    .catalog-grid,
    .ranking-grid,
    .category-grid,
    .filter-panel,
    .footer-grid,
    .detail-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-hero {
        padding: 34px 22px;
    }

    .detail-hero {
        grid-template-columns: 1fr;
        padding: 20px;
    }

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

@media (max-width: 520px) {
    .movie-grid,
    .small-grid,
    .compact-grid,
    .latest-grid,
    .catalog-grid,
    .ranking-grid,
    .category-grid,
    .filter-panel,
    .footer-grid,
    .detail-meta-grid {
        grid-template-columns: 1fr;
    }

    .hero-content,
    .hero-copy-static {
        left: 18px;
        width: calc(100% - 36px);
    }

    .movie-card {
        border-radius: 16px;
    }
}
