:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: rgba(15, 23, 42, 0.72);
    --panel-strong: #111827;
    --line: #1e293b;
    --muted: #94a3b8;
    --text: #f8fafc;
    --subtext: #cbd5e1;
    --green: #10b981;
    --green-soft: rgba(16, 185, 129, 0.16);
    --green-bright: #34d399;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.12), transparent 28rem), var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(30, 41, 59, 0.92);
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(12px);
}

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

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--green), #065f46);
    box-shadow: 0 14px 34px rgba(16, 185, 129, 0.28);
}

.logo-mark svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    color: var(--subtext);
    font-size: 15px;
}

.nav-links a {
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--green-bright);
}

.nav-toggle {
    display: none;
    border: 0;
    color: var(--text);
    background: var(--panel);
    border-radius: 12px;
    width: 42px;
    height: 42px;
}

.hero {
    min-height: 680px;
    position: relative;
    overflow: hidden;
    background: var(--bg);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68) 48%, rgba(2, 6, 23, 0.24)), linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.06) 45%, rgba(2, 6, 23, 0.72) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 680px;
    display: flex;
    align-items: center;
    padding-top: 78px;
}

.hero-copy {
    width: min(680px, 100%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid rgba(52, 211, 153, 0.34);
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.14);
    color: #a7f3d0;
    font-size: 14px;
    margin-bottom: 20px;
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(40px, 6vw, 74px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero-title-small {
    display: block;
    margin-top: 12px;
    font-size: clamp(26px, 3.6vw, 44px);
    color: var(--green-bright);
}

.hero p {
    margin: 0;
    width: min(620px, 100%);
    color: var(--subtext);
    font-size: clamp(17px, 2vw, 20px);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 30px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 999px;
    color: #d1fae5;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(52, 211, 153, 0.24);
    font-size: 13px;
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    padding: 12px 20px;
    min-height: 46px;
    border: 1px solid transparent;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
    background: var(--green);
    color: white;
    box-shadow: 0 18px 36px rgba(16, 185, 129, 0.24);
}

.btn-primary:hover {
    background: #059669;
}

.btn-ghost {
    color: var(--text);
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.72);
}

.btn-ghost:hover {
    border-color: rgba(52, 211, 153, 0.36);
}

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

.hero-dot {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    padding: 0;
}

.hero-dot.is-active {
    background: var(--green-bright);
}

.page-main {
    padding-top: 92px;
}

.section {
    padding: 46px 0;
}

.section-tight {
    padding: 28px 0;
}

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

.section-kicker {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--green-bright);
    font-weight: 700;
    margin-bottom: 8px;
}

.section-kicker::before {
    content: "";
    width: 5px;
    height: 28px;
    border-radius: 99px;
    background: var(--green);
}

.section h2,
.page-title {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    letter-spacing: -0.03em;
}

.section-desc,
.page-desc {
    margin: 8px 0 0;
    color: var(--muted);
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    border: 1px solid rgba(148, 163, 184, 0.08);
    isolation: isolate;
}

.movie-card.small {
    min-height: 286px;
}

.movie-card img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card.small img {
    min-height: 286px;
}

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

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.35) 58%, rgba(0, 0, 0, 0.03));
}

.play-badge {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.play-badge span {
    width: 60px;
    height: 60px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(16, 185, 129, 0.9);
    transform: scale(0.84);
    transition: transform 0.25s ease;
}

.movie-card:hover .play-badge {
    opacity: 1;
}

.movie-card:hover .play-badge span {
    transform: scale(1);
}

.card-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 18px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.32;
}

.movie-card.small h3 {
    font-size: 15px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--subtext);
    font-size: 13px;
}

.card-line {
    margin: 10px 0 0;
    color: #dbeafe;
    font-size: 14px;
}

.line-clamp-1,
.line-clamp-2,
.line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-1 {
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    -webkit-line-clamp: 3;
}

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

.category-card {
    display: block;
    padding: 24px;
    min-height: 176px;
    border-radius: var(--radius);
    border: 1px solid rgba(52, 211, 153, 0.18);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(15, 23, 42, 0.92));
    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.44);
}

.category-card h3 {
    margin: 0 0 10px;
    font-size: 22px;
}

.category-card p {
    margin: 0;
    color: var(--subtext);
}

.category-card span {
    display: inline-flex;
    margin-top: 22px;
    color: var(--green-bright);
    font-weight: 700;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 128px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: rgba(30, 41, 59, 0.72);
    transform: translateY(-2px);
}

.rank-num {
    font-size: 28px;
    font-weight: 900;
    color: var(--green-bright);
    text-align: center;
}

.rank-thumb {
    width: 128px;
    height: 78px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-info h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.rank-info p {
    margin: 0;
    color: var(--muted);
}

.page-hero {
    padding: 126px 0 42px;
    background: radial-gradient(circle at 20% 0%, rgba(16, 185, 129, 0.18), transparent 34rem), linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0));
}

.search-panel {
    display: grid;
    gap: 16px;
    margin: 18px 0 28px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.search-input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.18);
    outline: 0;
    border-radius: 16px;
    padding: 13px 16px;
    background: rgba(2, 6, 23, 0.72);
    color: var(--text);
}

.search-input:focus {
    border-color: rgba(52, 211, 153, 0.55);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    padding: 8px 13px;
    color: var(--subtext);
    background: rgba(15, 23, 42, 0.72);
}

.filter-chip.is-active,
.filter-chip:hover {
    color: #d1fae5;
    border-color: rgba(52, 211, 153, 0.46);
    background: rgba(16, 185, 129, 0.16);
}

.empty-state {
    display: none;
    color: var(--muted);
    padding: 32px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.75);
    text-align: center;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 0.9fr);
    gap: 30px;
    align-items: start;
}

.player-card,
.content-card,
.side-card {
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.player-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    background: black;
}

.player-stage video {
    width: 100%;
    height: 100%;
    background: black;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    cursor: pointer;
    background-size: cover;
    background-position: center;
}

.player-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.28));
}

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

.player-start {
    position: relative;
    z-index: 2;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    border: 0;
    display: grid;
    place-items: center;
    color: white;
    background: rgba(16, 185, 129, 0.94);
    box-shadow: 0 22px 60px rgba(16, 185, 129, 0.34);
}

.player-start svg {
    width: 38px;
    height: 38px;
    margin-left: 4px;
    fill: currentColor;
}

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

.content-card h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.12;
}

.info-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 22px;
}

.summary-block {
    margin-top: 26px;
}

.summary-block h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.summary-block p {
    color: var(--subtext);
    margin: 0;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.tag {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.9);
    color: var(--subtext);
    font-size: 13px;
}

.side-card {
    position: sticky;
    top: 92px;
    padding: 18px;
}

.side-card h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

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

.recommend-item {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.recommend-item:hover {
    background: rgba(30, 41, 59, 0.78);
}

.recommend-item img {
    width: 112px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
}

.recommend-item h3 {
    margin: 0 0 5px;
    font-size: 15px;
    line-height: 1.35;
}

.recommend-item p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.breadcrumb {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 18px;
}

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

.site-footer {
    margin-top: 72px;
    border-top: 1px solid rgba(30, 41, 59, 0.95);
    background: rgba(15, 23, 42, 0.68);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 24px;
    padding: 42px 0;
}

.footer-inner p,
.footer-inner a {
    color: var(--muted);
}

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

.footer-title {
    color: var(--text);
    font-weight: 800;
    margin-bottom: 12px;
}

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid rgba(30, 41, 59, 0.88);
    color: #64748b;
    font-size: 14px;
    text-align: center;
}

@media (max-width: 1024px) {
    .movie-grid,
    .movie-grid.compact,
    .category-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .side-card {
        position: static;
    }
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 12px 16px;
        background: rgba(15, 23, 42, 0.98);
        border-bottom: 1px solid var(--line);
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links a {
        width: 100%;
        padding: 12px 0;
    }

    .hero,
    .hero-content {
        min-height: 620px;
    }

    .hero-shade {
        background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.3) 48%, rgba(2, 6, 23, 0.82) 100%);
    }

    .section-head {
        display: block;
    }

    .section-actions {
        margin-top: 14px;
    }

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

    .movie-card,
    .movie-card.small {
        min-height: 260px;
    }

    .movie-card img,
    .movie-card.small img {
        min-height: 260px;
    }

    .card-body {
        padding: 14px;
    }

    .card-line {
        display: none;
    }

    .rank-item {
        grid-template-columns: 42px 92px 1fr;
    }

    .rank-thumb {
        width: 92px;
        height: 62px;
    }

    .rank-go {
        display: none;
    }

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

    .recommend-item {
        grid-template-columns: 96px 1fr;
    }

    .recommend-item img {
        width: 96px;
        height: 64px;
    }
}

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

    .hero-actions,
    .section-actions {
        display: grid;
    }

    .btn {
        width: 100%;
    }
}
