:root {
    --bg: #0f172a;
    --panel: rgba(30, 41, 59, 0.62);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --border: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #10b981;
    --accent-2: #14b8a6;
    --gold: #facc15;
    --danger: #ef4444;
    --shadow: 0 20px 60px rgba(2, 6, 23, 0.45);
}

* {
    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.12), transparent 34rem),
        linear-gradient(135deg, #0f172a 0%, #1e293b 45%, #0f172a 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.nav-wrap {
    max-width: 1280px;
    height: 4rem;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, #34d399, #0d9488);
    color: white;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.28);
}

.brand-text strong,
.footer-brand span:last-child {
    display: block;
    font-size: 1.18rem;
    line-height: 1.1;
    font-weight: 800;
    background: linear-gradient(90deg, #34d399, #2dd4bf);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text small {
    display: block;
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.75rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    color: var(--soft);
    font-weight: 600;
}

.main-nav a:hover {
    color: #34d399;
}

.mobile-toggle {
    display: none;
    border: 0;
    color: white;
    background: transparent;
    font-size: 1.4rem;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 800ms ease;
}

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

.hero-slide img.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.05)),
        linear-gradient(0deg, rgba(15, 23, 42, 0.88), transparent 45%);
}

.hero-content {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
}

.hero-inner {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.55fr);
    gap: 3rem;
    align-items: center;
}

.hero-copy {
    max-width: 720px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(16, 185, 129, 0.28);
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    font-size: 0.85rem;
    font-weight: 700;
}

.hero h1,
.hero h2 {
    margin: 1rem 0 1rem;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.hero-copy p {
    color: #dbeafe;
    font-size: clamp(1rem, 1.7vw, 1.25rem);
    line-height: 1.8;
    max-width: 650px;
}

.hero-meta,
.detail-meta,
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.25rem 0;
}

.hero-meta span,
.detail-meta span,
.chip-row span,
.mini-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.35rem 0.72rem;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--border);
    color: var(--soft);
    font-size: 0.86rem;
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.8rem;
}

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    padding: 0.8rem 1.35rem;
    border-radius: 0.85rem;
    font-weight: 800;
    transition: transform 160ms ease, background 160ms ease, border 160ms ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    box-shadow: 0 16px 38px rgba(16, 185, 129, 0.22);
}

.btn-ghost {
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.54);
    color: white;
}

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

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 1.3rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.12);
    aspect-ratio: 2 / 3;
    max-height: 520px;
}

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

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 2rem;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-dot {
    width: 0.62rem;
    height: 0.62rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: width 180ms ease, background 180ms ease;
}

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

.hero-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    transform: translateY(-50%);
    width: 2.8rem;
    height: 2.8rem;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    cursor: pointer;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
    left: 1rem;
}

.hero-next {
    right: 1rem;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.page-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 1rem 1.25rem;
}

.page-hero h1 {
    margin: 1rem 0 0.75rem;
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 1.08;
}

.page-hero p {
    max-width: 780px;
    color: var(--soft);
    line-height: 1.8;
}

.section-block {
    margin: 0 0 5rem;
}

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

.section-head h2 {
    margin: 0.7rem 0 0;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.section-head p {
    max-width: 720px;
    color: var(--muted);
    line-height: 1.7;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

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

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

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

.movie-card {
    min-width: 0;
}

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 1rem;
    background: rgba(30, 41, 59, 0.8);
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.poster img,
.rank-poster img,
.detail-cover img,
.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 450ms ease;
}

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

.poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), transparent 45%);
    opacity: 0;
    transition: opacity 180ms ease;
}

.poster:hover::after {
    opacity: 1;
}

.play-mark {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.2rem;
    opacity: 0;
    transition: opacity 180ms ease;
}

.poster:hover .play-mark {
    opacity: 1;
}

.score {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 3;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    color: white;
    background: rgba(0, 0, 0, 0.72);
    font-size: 0.78rem;
    backdrop-filter: blur(6px);
}

.movie-info {
    padding-top: 0.78rem;
}

.movie-info h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.35;
}

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

.meta,
.movie-info .desc,
.rank-card p {
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.6;
}

.movie-info .desc {
    margin: 0.45rem 0 0.65rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.mini-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.mini-tags span {
    padding: 0.24rem 0.5rem;
    font-size: 0.72rem;
}

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    border-radius: 1.25rem;
    padding: 1.4rem;
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: 0 10px 35px rgba(2, 6, 23, 0.18);
}

.category-card::before {
    content: "";
    position: absolute;
    inset: auto -20% -45% 20%;
    height: 180px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.25), transparent 70%);
}

.category-card h2,
.category-card h3 {
    position: relative;
    margin: 0 0 0.75rem;
    font-size: 1.35rem;
}

.category-card p {
    position: relative;
    color: var(--soft);
    line-height: 1.75;
}

.category-card .category-link {
    position: relative;
    display: inline-flex;
    margin-top: 1.25rem;
    color: #6ee7b7;
    font-weight: 800;
}

.feature-panel {
    border-radius: 1.5rem;
    padding: 2rem;
    background: rgba(30, 41, 59, 0.36);
    border: 1px solid var(--border);
}

.rank-card {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 1rem;
    border-radius: 1rem;
    padding: 0.75rem;
    background: rgba(30, 41, 59, 0.46);
    border: 1px solid var(--border);
    transition: background 160ms ease, transform 160ms ease;
}

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

.rank-poster {
    display: block;
    overflow: hidden;
    border-radius: 0.75rem;
    aspect-ratio: 16 / 10;
    background: #111827;
}

.rank-card h3 {
    margin: 0.2rem 0 0.35rem;
    font-size: 1rem;
}

.rank-card span {
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: 800;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr 12rem 12rem;
    gap: 0.85rem;
    margin: 1.5rem 0 2rem;
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid var(--border);
}

.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 2.8rem;
    border: 1px solid var(--border);
    border-radius: 0.8rem;
    padding: 0 0.9rem;
    background: rgba(30, 41, 59, 0.8);
    color: white;
    outline: none;
}

.search-panel input:focus,
.search-panel select:focus {
    border-color: rgba(16, 185, 129, 0.65);
}

.breadcrumb {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

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

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

.detail-cover {
    overflow: hidden;
    border-radius: 1.25rem;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow);
}

.detail-content h1 {
    margin: 0 0 0.9rem;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.08;
}

.detail-content .lead {
    color: #dbeafe;
    font-size: 1.13rem;
    line-height: 1.8;
}

.player-section {
    margin-top: 3rem;
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--border);
    background: rgba(2, 6, 23, 0.8);
    box-shadow: var(--shadow);
}

.player-head {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.9);
}

.player-head h2 {
    margin: 0;
    font-size: 1.08rem;
}

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

.player-box video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: black;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.25));
    cursor: pointer;
}

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

.play-button {
    width: 5.6rem;
    height: 5.6rem;
    border: 0;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-size: 2rem;
    box-shadow: 0 16px 42px rgba(16, 185, 129, 0.34);
    cursor: pointer;
}

.article-panel {
    margin-top: 2rem;
    padding: 2rem;
    border-radius: 1.35rem;
    background: rgba(30, 41, 59, 0.38);
    border: 1px solid var(--border);
}

.article-panel h2 {
    margin: 0 0 1rem;
    font-size: 1.55rem;
}

.article-panel p {
    color: var(--soft);
    line-height: 1.9;
    margin: 0 0 1rem;
}

.site-footer {
    margin-top: 4rem;
    border-top: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.92);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 1rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
}

.site-footer p,
.site-footer a {
    display: block;
    color: var(--muted);
    line-height: 1.8;
    font-size: 0.92rem;
}

.site-footer a:hover {
    color: #34d399;
}

.site-footer h3 {
    margin: 0 0 0.8rem;
    font-size: 1rem;
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.2rem 1rem;
    border-top: 1px solid var(--border);
    color: #64748b;
    font-size: 0.88rem;
}

.hide-card {
    display: none !important;
}

.empty-state {
    display: none;
    margin: 2rem 0;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.58);
    color: var(--soft);
    text-align: center;
}

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

@media (max-width: 1100px) {
    .movie-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

@media (max-width: 820px) {
    .mobile-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        left: 0;
        right: 0;
        top: 4rem;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.8rem 1rem;
        background: rgba(15, 23, 42, 0.98);
        border-bottom: 1px solid var(--border);
    }

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

    .main-nav a {
        padding: 0.85rem 0;
    }

    .hero {
        min-height: 680px;
        height: auto;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        padding-top: 5rem;
        padding-bottom: 5rem;
    }

    .hero-poster {
        max-width: 260px;
    }

    .hero-arrow {
        display: none;
    }

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

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

    .search-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .brand-text small {
        display: none;
    }

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

    .feature-panel,
    .article-panel {
        padding: 1.2rem;
    }

    .rank-card {
        grid-template-columns: 6rem 1fr;
    }
}
