:root {
    --bg: #f5f7fb;
    --text: #111827;
    --muted: #64748b;
    --panel: #ffffff;
    --line: #e5e7eb;
    --dark: #0f172a;
    --dark-soft: #1e293b;
    --cyan: #06b6d4;
    --blue: #2563eb;
    --pink: #ec4899;
    --green: #10b981;
    --shadow: 0 22px 60px rgba(15, 23, 42, 0.14);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #0f172a, #1e293b 52%, #0f172a);
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.24);
}

.nav-wrap {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 68px;
}

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

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 10px 24px rgba(6, 182, 212, 0.3);
}

.brand-name {
    font-size: 1.25rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.nav-link {
    padding: 10px 13px;
    border-radius: 12px;
    color: #dbeafe;
    font-size: 0.95rem;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.nav-search input {
    width: 220px;
    border: 0;
    outline: 0;
    color: #ffffff;
    padding: 9px 12px;
    background: transparent;
}

.nav-search input::placeholder {
    color: #94a3b8;
}

.nav-search button,
.btn-primary,
.btn-secondary,
.filter-btn,
.search-panel button {
    border: 0;
    cursor: pointer;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 10px 26px rgba(37, 99, 235, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button:hover,
.btn-primary:hover,
.btn-secondary:hover,
.filter-btn:hover,
.search-panel button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.32);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(12px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
}

.mobile-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #ffffff;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    padding: 12px 24px 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    background: #111827;
}

.mobile-panel a {
    display: block;
    padding: 10px 0;
    color: #dbeafe;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.35), transparent 28%), linear-gradient(135deg, #020617, #0f172a 48%, #1e3a8a);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.72) 46%, rgba(15, 23, 42, 0.36));
    z-index: 1;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: flex;
    align-items: center;
    padding: 76px 0;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border: 1px solid rgba(125, 211, 252, 0.48);
    border-radius: 999px;
    color: #cffafe;
    background: rgba(8, 47, 73, 0.44);
    backdrop-filter: blur(12px);
    font-weight: 700;
    font-size: 0.92rem;
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(2.6rem, 6vw, 5.6rem);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 660px;
    margin: 0 0 28px;
    color: #e2e8f0;
    font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.hero-meta,
.detail-meta,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hero-meta span,
.detail-meta span,
.movie-meta span {
    padding: 5px 10px;
    border-radius: 999px;
    color: #475569;
    background: #eef2ff;
    font-size: 0.82rem;
    font-weight: 700;
}

.hero .hero-meta span {
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.14);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

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

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

.hero-dot.is-active {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.section {
    padding: 64px 0;
}

.section-dark {
    color: #ffffff;
    background: linear-gradient(180deg, #0f172a, #1e293b);
}

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

.section-head h1,
.section-head h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.section-head p,
.lead {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-dark .section-head p,
.section-dark .lead {
    color: #cbd5e1;
}

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

.stat-card {
    padding: 28px;
    border-radius: var(--radius);
    text-align: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card strong {
    display: block;
    font-size: 2.2rem;
}

.stat-card span {
    color: #cbd5e1;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 168px;
    padding: 24px;
    border-radius: var(--radius);
    color: #ffffff;
    background: linear-gradient(135deg, #0891b2, #2563eb);
    box-shadow: var(--shadow);
    transition: 0.22s ease;
}

.category-tile:nth-child(2n) {
    background: linear-gradient(135deg, #db2777, #7c3aed);
}

.category-tile:nth-child(3n) {
    background: linear-gradient(135deg, #059669, #0891b2);
}

.category-tile:hover {
    transform: translateY(-5px);
}

.category-tile::after {
    content: "";
    position: absolute;
    right: -50px;
    bottom: -50px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.category-tile strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.35rem;
}

.category-tile span {
    display: block;
    color: rgba(255, 255, 255, 0.84);
}

.category-tile em {
    display: inline-block;
    margin-top: 20px;
    font-style: normal;
    font-weight: 800;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: #e2e8f0;
}

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

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

.poster-tag {
    position: absolute;
    left: 12px;
    top: 12px;
    max-width: calc(100% - 24px);
    padding: 5px 9px;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
    font-size: 0.78rem;
}

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

.movie-title {
    display: -webkit-box;
    min-height: 3.05em;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 1.05rem;
    line-height: 1.45;
    font-weight: 800;
    transition: color 0.2s ease;
}

.movie-title:hover {
    color: var(--cyan);
}

.movie-card-body p {
    display: -webkit-box;
    min-height: 3.1em;
    margin: 8px 0 12px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--muted);
    font-size: 0.92rem;
}

.movie-meta span {
    color: #64748b;
    background: #f1f5f9;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-row span {
    padding: 4px 8px;
    color: #0369a1;
    background: #e0f2fe;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
}

.rank-badge {
    position: absolute;
    z-index: 2;
    right: 14px;
    top: 14px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    border-radius: 14px;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.32);
}

.rank-layout {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 24px;
    align-items: start;
}

.rank-panel,
.info-panel,
.search-panel,
.copy-panel {
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}

.rank-panel {
    padding: 18px;
}

.rank-panel h2,
.info-panel h2,
.copy-panel h2 {
    margin: 0 0 16px;
    font-size: 1.35rem;
}

.rank-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-row {
    display: grid;
    grid-template-columns: 42px 68px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    transition: background 0.2s ease;
}

.rank-row:hover {
    background: #f1f5f9;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-weight: 900;
}

.rank-row img {
    width: 68px;
    height: 92px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-info strong,
.rank-info em {
    display: block;
}

.rank-info strong {
    font-size: 1rem;
}

.rank-info em {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.86rem;
    font-style: normal;
}

.filter-bar,
.search-panel {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
}

.filter-bar input,
.search-panel input {
    flex: 1;
    min-width: 0;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: 0;
    background: #ffffff;
}

.search-panel {
    padding: 18px;
}

.detail-hero {
    color: #ffffff;
    background: linear-gradient(135deg, #020617, #0f172a 48%, #1e3a8a);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.6fr 0.9fr;
    gap: 34px;
    align-items: center;
    padding: 44px 0;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

.player-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.78));
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 44px rgba(6, 182, 212, 0.35);
    font-size: 2rem;
    transform: translateX(2px);
}

.player-cover strong {
    font-size: 1.2rem;
}

.player-message {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 4;
    display: none;
    padding: 12px 16px;
    color: #ffffff;
    text-align: center;
    border-radius: 14px;
    background: rgba(127, 29, 29, 0.78);
}

.player-message.show {
    display: block;
}

.detail-copy h1 {
    margin: 18px 0 16px;
    font-size: clamp(2rem, 4vw, 3.8rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-copy p {
    color: #e2e8f0;
    font-size: 1.08rem;
}

.detail-meta span {
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.14);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: #bfdbfe;
    font-size: 0.92rem;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 26px;
}

.copy-panel {
    padding: 28px;
}

.copy-panel p {
    margin: 0 0 18px;
    color: #334155;
}

.copy-panel .tag-row {
    margin-bottom: 22px;
}

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

.aside-card {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 12px;
    padding: 12px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease;
}

.aside-card:hover {
    transform: translateY(-3px);
}

.aside-card img {
    width: 82px;
    height: 112px;
    object-fit: cover;
    border-radius: 14px;
}

.aside-card strong,
.aside-card span {
    display: block;
}

.aside-card strong {
    line-height: 1.35;
}

.aside-card span {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.85rem;
}

.empty-state {
    display: none;
    padding: 30px;
    text-align: center;
    color: var(--muted);
    border-radius: var(--radius);
    background: #ffffff;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #111827);
    padding: 52px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 1.08rem;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li + li {
    margin-top: 8px;
}

.site-footer a:hover {
    color: #67e8f9;
}

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

    .mobile-toggle {
        display: block;
    }

    .nav-search input {
        width: 180px;
    }

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

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

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

    .nav-wrap {
        min-height: 62px;
    }

    .nav-search {
        display: none;
    }

    .brand-name {
        font-size: 1.1rem;
    }

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

    .stats-grid,
    .movie-grid,
    .category-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .section {
        padding: 44px 0;
    }

    .section-head {
        display: block;
    }

    .filter-bar,
    .search-panel {
        display: block;
    }

    .filter-bar input,
    .search-panel input {
        width: 100%;
        margin-bottom: 12px;
    }

    .detail-grid {
        padding: 28px 0;
    }
}

@media (max-width: 520px) {
    .stats-grid,
    .movie-grid,
    .category-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .movie-card {
        display: grid;
        grid-template-columns: 116px 1fr;
    }

    .movie-card .poster {
        aspect-ratio: 2 / 3;
        height: 100%;
    }

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

    .movie-title {
        min-height: 0;
    }

    .movie-card-body p {
        min-height: 0;
    }

    .player-wrap {
        border-radius: 18px;
    }

    .play-circle {
        width: 68px;
        height: 68px;
    }
}
