:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --cyan: #0891b2;
    --cyan-strong: #06b6d4;
    --blue: #2563eb;
    --dark: #020617;
    --dark-soft: #0f172a;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(2, 6, 23, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.nav-bar {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.brand-symbol {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: #fff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
    box-shadow: 0 12px 28px rgba(8, 145, 178, 0.35);
}

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

.site-nav a {
    color: #cbd5e1;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 280px;
}

.top-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 11px 16px;
    color: var(--ink);
    background: #fff;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

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

.top-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--cyan-strong);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

.top-search button,
.primary-btn,
.ghost-btn {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    white-space: nowrap;
}

.top-search button,
.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 34px rgba(8, 145, 178, 0.26);
}

.top-search button {
    padding: 11px 16px;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.primary-btn.small {
    min-height: 40px;
    padding: 10px 18px;
    font-size: 14px;
}

.ghost-btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.30);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    padding: 9px 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.hero-slider {
    position: relative;
    min-height: 76vh;
    overflow: hidden;
    background: var(--dark);
}

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

.hero-slide {
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.6s ease, transform 1s ease;
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.62) 46%, rgba(15, 23, 42, 0.18)), linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 52%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 76vh;
    max-width: 760px;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    padding-top: 42px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.section-kicker {
    margin-bottom: 8px;
    color: var(--cyan);
    background: #cffafe;
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-head h1 {
    margin: 0 0 16px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content h2 {
    font-size: clamp(26px, 4vw, 48px);
}

.hero-content p,
.page-hero p,
.detail-title-row p {
    margin: 0 0 24px;
    color: #dbeafe;
    font-size: 18px;
    max-width: 720px;
}

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

.hero-tags {
    margin-bottom: 28px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
    font-size: 36px;
    line-height: 1;
    backdrop-filter: blur(14px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-2px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: #fff;
}

.section-block {
    padding: 72px 0;
}

.no-top {
    padding-top: 56px;
    padding-bottom: 56px;
}

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

.section-head h2,
.rank-panel h2,
.content-card h2,
.side-card h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.section-head a {
    color: var(--cyan);
    font-weight: 800;
}

.section-head.inverse h2,
.section-head.inverse a {
    color: #fff;
}

.compact-head {
    margin-bottom: 22px;
}

.movie-grid {
    display: grid;
    gap: 24px;
}

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

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(6, 182, 212, 0.35);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e2e8f0;
}

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

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.54), transparent 55%);
    opacity: 0.86;
}

.quality-badge,
.rank-mark,
.poster-play {
    position: absolute;
    z-index: 2;
}

.quality-badge {
    top: 12px;
    left: 12px;
    border-radius: 999px;
    padding: 5px 9px;
    color: #fff;
    background: rgba(8, 145, 178, 0.92);
    font-size: 12px;
    font-weight: 800;
}

.rank-mark {
    top: 12px;
    right: 12px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: rgba(2, 6, 23, 0.76);
    font-style: normal;
    font-weight: 900;
}

.poster-play {
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85);
    backdrop-filter: blur(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
    padding: 18px;
}

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

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

.card-meta,
.card-line {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 14px;
}

.card-line {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-row span {
    color: #0e7490;
    background: #ecfeff;
}

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

.compact-card .card-body h3 {
    font-size: 16px;
}

.wide-band {
    background: linear-gradient(135deg, #ecfeff, #eff6ff);
    border-block: 1px solid #dbeafe;
}

.dark-band {
    background: var(--dark-soft);
}

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

.category-tile,
.category-overview-card {
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 22px;
    color: #fff;
    transition: transform 0.2s ease, background 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.14);
}

.category-tile span {
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong {
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 500;
}

.home-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 32px;
    align-items: start;
}

.rank-panel,
.side-card,
.content-card,
.player-card,
.category-overview-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 24px;
}

.rank-panel p {
    margin: 10px 0 20px;
    color: var(--muted);
}

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

.rank-num {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #fff;
    border-radius: 12px;
    background: var(--dark-soft);
    font-weight: 900;
}

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

.rank-score {
    color: var(--cyan);
    font-weight: 900;
}

.page-hero,
.detail-head {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.34), transparent 35%), linear-gradient(135deg, #020617, #0f172a 55%, #164e63);
    padding: 88px 0 72px;
}

.slim-hero,
.search-hero,
.ranking-hero,
.category-hero {
    min-height: 320px;
    display: flex;
    align-items: center;
}

.page-hero h1,
.detail-head h1 {
    color: #fff;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 12px;
    margin-bottom: 28px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #fff;
    padding: 14px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.large-filter {
    grid-template-columns: minmax(280px, 1fr) 190px 190px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.65fr) auto;
    gap: 20px;
    align-items: center;
    color: var(--ink);
}

.category-overview-card h2 {
    margin: 0 0 8px;
    font-size: 26px;
}

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

.sample-links {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.sample-links a {
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sample-links a:hover {
    color: var(--cyan);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 24px;
    color: #cbd5e1;
    font-weight: 700;
}

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

.detail-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 36px;
    align-items: end;
}

.detail-cover {
    width: 280px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.40);
}

.detail-tags {
    margin-bottom: 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
    padding: 44px 0 0;
}

.detail-main {
    display: grid;
    gap: 24px;
}

.video-wrap {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: #000;
    aspect-ratio: 16 / 9;
}

.video-wrap video {
    width: 100%;
    height: 100%;
    background: #000;
    display: block;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #fff;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.35));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-overlay button {
    width: 76px;
    height: 76px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 45px rgba(8, 145, 178, 0.36);
    cursor: pointer;
    font-size: 28px;
}

.player-overlay strong {
    max-width: 80%;
    font-size: clamp(22px, 3vw, 34px);
}

.content-card,
.side-card {
    padding: 24px;
}

.content-card p {
    margin: 14px 0 0;
    color: #334155;
    font-size: 16px;
}

.accent-card {
    background: linear-gradient(135deg, #ecfeff, #eff6ff);
}

.large-tags {
    margin-top: 18px;
}

.detail-side {
    position: sticky;
    top: 96px;
}

.side-related-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.side-related {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.side-related img {
    width: 120px;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    object-fit: cover;
}

.side-related strong,
.side-related small {
    display: block;
}

.side-related strong {
    margin-bottom: 6px;
    line-height: 1.3;
}

.side-related small {
    color: var(--muted);
}

.site-footer {
    margin-top: 72px;
    color: #94a3b8;
    background: var(--dark);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
    padding: 48px 0;
}

.site-footer h3 {
    margin: 0 0 12px;
    color: #fff;
}

.site-footer p {
    max-width: 520px;
}

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

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

.footer-copy {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding: 18px 16px;
    text-align: center;
    font-size: 14px;
}

.is-filter-hidden {
    display: none !important;
}

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

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

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

    .rank-panel,
    .detail-side {
        position: static;
    }
}

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

    .site-nav,
    .top-search {
        display: none;
    }

    .nav-bar.is-open {
        flex-wrap: wrap;
        padding: 14px 0;
    }

    .nav-bar.is-open .site-nav,
    .nav-bar.is-open .top-search {
        display: flex;
        width: 100%;
    }

    .nav-bar.is-open .site-nav {
        flex-wrap: wrap;
        order: 3;
    }

    .nav-bar.is-open .top-search {
        order: 4;
        min-width: 0;
    }

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

    .hero-control {
        display: none;
    }

    .three-cols,
    .four-cols,
    .two-cols,
    .category-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-overview-card,
    .detail-title-row {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        width: min(100%, 360px);
    }

    .filter-panel,
    .large-filter {
        grid-template-columns: 1fr;
        border-radius: 22px;
    }

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

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

    .brand {
        font-size: 18px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-head h1 {
        font-size: 34px;
    }

    .hero-content h2 {
        font-size: 28px;
    }

    .hero-content p,
    .page-hero p,
    .detail-title-row p {
        font-size: 16px;
    }

    .section-block {
        padding: 48px 0;
    }

    .three-cols,
    .four-cols,
    .two-cols,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .movie-grid {
        gap: 18px;
    }

    .side-related {
        grid-template-columns: 100px minmax(0, 1fr);
    }

    .side-related img {
        width: 100px;
    }
}
