:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-strong: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --primary-soft: #e0f2fe;
    --gold: #d97706;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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


img.is-missing {
    opacity: 0;
}

.poster-link,
.hero-poster,
.hero-bg,
.category-card,
.category-cover-row,
.ranking-poster,
.detail-poster,
.detail-bg,
.category-hero-bg,
.player-cover {
    background: linear-gradient(135deg, #e0f2fe, #f8fafc 45%, #fef3c7);
}

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #e0f2fe, #f8fafc 45%, #fef3c7);
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #22c55e);
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.28);
}

.brand-text {
    font-size: 20px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #334155;
    font-size: 15px;
    font-weight: 600;
}

.main-nav a:hover {
    color: var(--primary);
}

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

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
}

.hero-section {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

.hero-stage {
    position: relative;
    min-height: 640px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 48px;
    align-items: center;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 76px 0 96px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.65s ease, transform 0.65s ease;
    pointer-events: none;
}

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

.hero-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0.42;
    filter: blur(1px) saturate(1.08);
}

.hero-bg::after,
.detail-bg::after,
.category-hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 28%, rgba(14, 165, 233, 0.34), transparent 34%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.62) 50%, rgba(2, 6, 23, 0.92));
}

.hero-copy,
.hero-poster,
.hero-dots {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #bae6fd;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.category-hero h1,
.detail-info h1 {
    margin: 14px 0 18px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.category-hero p,
.detail-one-line {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.hero-tags,
.tag-row,
.inline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.hero-tags span,
.tag-row span,
.inline-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 700;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

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

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #22c55e);
    box-shadow: 0 12px 26px rgba(2, 132, 199, 0.28);
}

.btn.ghost {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.12);
}

.btn.light {
    color: var(--text);
    background: #ffffff;
}

.btn.full {
    width: 100%;
    margin-top: 18px;
}

.hero-poster {
    display: block;
    height: 500px;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.14);
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
}

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

.hero-dots button {
    width: 42px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
}

.hero-dots button.is-active {
    background: #ffffff;
}

.search-panel {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
    align-items: end;
    margin-top: -38px;
    padding: 24px;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.home-search label {
    display: block;
    margin-bottom: 10px;
    font-weight: 800;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    color: var(--text);
    font-size: 15px;
}

.search-box button,
.filter-bar button {
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    background: var(--primary);
    font-weight: 800;
    cursor: pointer;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-links a {
    padding: 11px 14px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 800;
}

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

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

.section-head h2,
.rank-panel h2,
.text-panel h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
}

.section-head p,
.rank-panel p,
.text-panel p,
.category-overview-body p,
.card-body p {
    color: var(--muted);
}

.section-more {
    color: var(--primary);
    font-weight: 800;
}

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

.category-card {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    padding: 18px;
    border-radius: var(--radius);
    background: #020617;
    color: #ffffff;
    box-shadow: var(--shadow);
}

.category-card img {
    position: absolute;
    inset: 0;
    opacity: 0.42;
    transition: transform 0.3s ease;
}

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.category-card strong,
.category-card em,
.category-count {
    position: relative;
    z-index: 2;
}

.category-card strong {
    display: block;
    margin-top: 96px;
    font-size: 20px;
    font-style: normal;
}

.category-card em {
    display: block;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    font-style: normal;
}

.category-count {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 12px;
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #e0f2fe, #f8fafc);
}

.poster-link img {
    transition: transform 0.35s ease;
}

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

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

.poster-badge {
    top: 12px;
    left: 12px;
    padding: 4px 9px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.68);
    font-size: 12px;
}

.poster-play {
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    color: #ffffff;
    background: var(--primary);
    font-size: 13px;
}

.card-body {
    padding: 14px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.card-body h3 {
    margin: 8px 0 6px;
    font-size: 17px;
    line-height: 1.35;
}

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

.card-body p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 14px;
}

.card-body .tag-row span {
    background: var(--surface-strong);
    color: #475569;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 26px;
    align-items: start;
}

.rank-panel {
    position: sticky;
    top: 88px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.rank-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.rank-no {
    color: var(--primary);
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 800;
}

.rank-score {
    color: var(--muted);
    font-size: 12px;
}

.page-main {
    min-height: 70vh;
}

.page-hero,
.category-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

.small-hero {
    margin-top: 28px;
    padding: 64px 36px;
    border-radius: 30px;
    background:
        radial-gradient(circle at 12% 18%, rgba(14, 165, 233, 0.35), transparent 30%),
        linear-gradient(135deg, #020617, #0f172a 48%, #075985);
}

.category-hero,
.detail-hero {
    min-height: 420px;
}

.category-hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.58;
}

.category-hero-inner,
.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 68px 0;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px auto;
    gap: 12px;
    margin-bottom: 22px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
}

.filter-bar.wide {
    grid-template-columns: minmax(0, 1fr) 170px auto;
}

.result-count {
    margin: 0 0 18px;
    color: var(--muted);
    font-weight: 800;
}

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

.category-overview-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.category-cover-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 160px;
    background: var(--surface-strong);
}

.category-overview-body {
    padding: 20px;
}

.category-overview-body h2 {
    margin: 0;
}

.category-overview-body span {
    color: var(--primary);
    font-weight: 900;
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 124px minmax(0, 1fr);
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
}

.ranking-poster {
    position: relative;
    height: 160px;
    overflow: hidden;
    border-radius: 18px;
}

.ranking-poster span {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--primary);
    font-weight: 900;
}

.ranking-card h2 {
    margin: 4px 0 8px;
}

.ranking-card p {
    color: var(--muted);
}

.inline-meta span {
    background: var(--surface-strong);
    color: #475569;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 32px;
    align-items: center;
}

.detail-poster {
    height: 360px;
    overflow: hidden;
    border: 7px solid rgba(255, 255, 255, 0.16);
    border-radius: 26px;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.38);
}

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

.player-section {
    margin-top: -34px;
    position: relative;
    z-index: 4;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.18);
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-video,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-video {
    background: #000000;
}

.player-cover {
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: #020617;
    cursor: pointer;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.88));
}

.player-cover img {
    position: absolute;
    inset: 0;
    opacity: 0.62;
}

.play-circle,
.player-cover strong {
    position: relative;
    z-index: 3;
}

.play-circle {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 50%;
    background: rgba(2, 132, 199, 0.92);
    box-shadow: 0 18px 36px rgba(2, 132, 199, 0.32);
    font-size: 34px;
}

.player-cover strong {
    align-self: start;
    margin-top: -110px;
    font-size: 24px;
}

.player-shell.is-started .player-cover {
    display: none;
}

.player-message {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 3;
    margin: 0;
    color: #ffffff;
    font-weight: 800;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 48px 0 0;
}

.text-panel {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.sitemap-list {
    columns: 4;
    padding: 0;
    list-style: none;
}

.sitemap-list li {
    break-inside: avoid;
    margin-bottom: 8px;
}

.sitemap-list a {
    color: var(--primary-dark);
}

.site-footer {
    margin-top: 40px;
    padding: 34px 0;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-grid p {
    max-width: 620px;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--primary-dark);
    font-weight: 800;
}

@media (max-width: 980px) {
    .main-nav {
        position: absolute;
        top: 66px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: #ffffff;
        box-shadow: var(--shadow);
    }

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

    .nav-toggle {
        display: block;
    }

    .hero-slide,
    .split-layout,
    .detail-layout,
    .detail-content,
    .search-panel {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

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

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

    .rank-panel {
        position: static;
    }
}

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

    .hero-section,
    .hero-stage {
        min-height: 590px;
    }

    .hero-slide {
        padding-top: 48px;
    }

    .hero-copy h1,
    .page-hero h1,
    .category-hero h1,
    .detail-info h1 {
        font-size: 34px;
    }

    .hero-copy p,
    .page-hero p,
    .category-hero p,
    .detail-one-line {
        font-size: 16px;
    }

    .search-panel,
    .small-hero {
        border-radius: 22px;
    }

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

    .filter-bar,
    .filter-bar.wide,
    .ranking-card {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        height: 320px;
    }

    .sitemap-list {
        columns: 1;
    }

    .footer-grid {
        align-items: flex-start;
        flex-direction: column;
    }
}
