:root {
    --bg: #f8fafc;
    --paper: #ffffff;
    --ink: #1f2937;
    --muted: #64748b;
    --soft: #e2e8f0;
    --line: #e5e7eb;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --accent: #06b6d4;
    --accent-deep: #0891b2;
    --gold: #eab308;
    --danger: #ef4444;
    --radius: 18px;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 46%, #f1f5f9 100%);
    line-height: 1.65;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.96);
    color: #fff;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(14px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #2563eb);
    box-shadow: 0 12px 25px rgba(6, 182, 212, 0.32);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: 1;
}

.nav-link {
    color: #dbeafe;
    font-size: 15px;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
    color: #67e8f9;
}

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

.nav-search input,
.mobile-search input,
.filter-search {
    width: 220px;
    border: 1px solid rgba(148, 163, 184, 0.38);
    border-radius: 12px;
    padding: 10px 13px;
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.88);
    outline: none;
}

.nav-search input:focus,
.mobile-search input:focus,
.filter-search:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.16);
}

.nav-search button,
.mobile-search button,
.filter-reset,
.primary-btn,
.ghost-btn,
.play-cover button {
    border: 0;
    border-radius: 12px;
    padding: 10px 16px;
    color: #fff;
    background: var(--accent);
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.mobile-search button:hover,
.filter-reset:hover,
.primary-btn:hover,
.play-cover button:hover {
    background: var(--accent-deep);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    background: transparent;
    padding: 8px 11px;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 14px 18px 18px;
    background: rgba(15, 23, 42, 0.98);
}

.mobile-menu.is-open {
    display: block;
}

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

.mobile-search {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.mobile-search input {
    width: 100%;
}

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

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

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

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

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.68) 50%, rgba(15, 23, 42, 0.18) 100%);
}

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

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

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.92);
    color: #ecfeff;
    font-size: 14px;
    font-weight: 800;
}

.hero h1,
.hero h2 {
    margin: 22px 0 14px;
    font-size: clamp(38px, 7vw, 74px);
    line-height: 1.02;
    letter-spacing: -0.04em;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.hero p {
    max-width: 680px;
    color: #e2e8f0;
    font-size: clamp(16px, 2vw, 20px);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 22px 0;
    color: #cbd5e1;
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
}

.ghost-btn {
    color: #e0f2fe;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(15, 23, 42, 0.54);
}

.ghost-btn:hover {
    background: rgba(15, 23, 42, 0.78);
}

.hero-control {
    position: absolute;
    z-index: 4;
    top: 50%;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(15, 23, 42, 0.54);
    transform: translateY(-50%);
    cursor: pointer;
}

.hero-control:hover {
    background: rgba(6, 182, 212, 0.9);
}

.hero-control.prev {
    left: 22px;
}

.hero-control.next {
    right: 22px;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.54);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.main-space {
    padding: 54px 0 70px;
}

.section {
    margin-bottom: 62px;
}

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

.section-head h2,
.page-title h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
}

.section-head p,
.page-title p {
    margin: 8px 0 0;
    max-width: 760px;
    color: var(--muted);
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 18px;
    background: var(--paper);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    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.38);
    box-shadow: var(--shadow);
}

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

.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(180deg, transparent 40%, rgba(0, 0, 0, 0.78) 100%);
    opacity: 0.86;
}

.play-dot {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: #fff;
    background: rgba(6, 182, 212, 0.9);
    transform: translate(-50%, -50%) scale(0.88);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
    position: absolute;
    z-index: 3;
    top: 10px;
    left: 10px;
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    font-weight: 900;
}

.movie-info {
    padding: 15px;
}

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

.movie-info h3 a:hover {
    color: var(--accent-deep);
}

.movie-meta {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.movie-desc {
    min-height: 45px;
    margin: 9px 0 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.55;
}

.movie-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 13px;
    font-size: 13px;
}

.rating {
    color: #b45309;
    font-weight: 900;
}

.movie-foot a {
    color: var(--accent-deep);
    font-weight: 700;
}

.panel {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(236, 254, 255, 0.74));
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.09);
    padding: 28px;
}

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

.category-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 8px;
    background: #0f172a;
}

.category-covers img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 10px;
}

.category-body {
    padding: 18px;
}

.category-body h2 {
    margin: 0 0 8px;
    font-size: 21px;
}

.category-body p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.category-body span {
    display: inline-flex;
    margin-top: 14px;
    color: var(--accent-deep);
    font-weight: 800;
}

.filter-panel {
    margin-bottom: 26px;
    padding: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

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

.filter-search {
    flex: 1;
    width: auto;
    color: var(--ink);
    background: #fff;
}

.filter-reset {
    background: var(--dark-2);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.filter-chip {
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 8px 13px;
    color: #334155;
    background: #fff;
    cursor: pointer;
    transition: all 0.18s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
    color: #fff;
    border-color: var(--accent);
    background: var(--accent);
}

.no-results {
    display: none;
    padding: 30px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
}

.no-results.is-visible {
    display: block;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background-size: cover;
    background-position: center;
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.93), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.18));
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 34px;
    align-items: end;
    padding: 70px 0 46px;
}

.detail-cover {
    overflow: hidden;
    border: 5px solid rgba(255, 255, 255, 0.24);
    border-radius: 24px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #67e8f9;
}

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.08;
}

.detail-copy p {
    max-width: 820px;
    color: #e2e8f0;
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.detail-meta span,
.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    color: #cffafe;
    background: rgba(6, 182, 212, 0.18);
    border: 1px solid rgba(103, 232, 249, 0.28);
    font-size: 14px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 330px;
    gap: 28px;
    padding: 40px 0 72px;
}

.player-shell,
.detail-card,
.side-card {
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.player-shell {
    overflow: hidden;
    margin-bottom: 28px;
}

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

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

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at center, rgba(6, 182, 212, 0.18), rgba(2, 6, 23, 0.74));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-cover button {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    font-size: 30px;
    box-shadow: 0 14px 36px rgba(6, 182, 212, 0.35);
}

.player-title {
    padding: 18px 22px;
}

.player-title h2 {
    margin: 0;
    font-size: 22px;
}

.player-title p {
    margin: 6px 0 0;
    color: var(--muted);
}

.detail-card {
    padding: 28px;
}

.detail-card h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-card p {
    margin: 0 0 20px;
    color: #334155;
    white-space: pre-wrap;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.side-card {
    padding: 22px;
    margin-bottom: 24px;
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 12px;
}

.info-list dt {
    color: var(--muted);
}

.info-list dd {
    margin: 0;
    font-weight: 700;
}

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

.related-item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
}

.related-item img {
    width: 72px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
}

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

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

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

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
    margin-top: 34px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 28px;
    padding: 44px 0;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 19px;
}

.site-footer p,
.site-footer li {
    color: #94a3b8;
    font-size: 14px;
}

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

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

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

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding: 18px;
    text-align: center;
    color: #94a3b8;
}

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

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

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

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

@media (max-width: 860px) {
    .nav-links,
    .nav-search {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .hero-control {
        display: none;
    }

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

    .detail-hero-inner {
        grid-template-columns: 150px 1fr;
        gap: 20px;
    }

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

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

    .brand {
        font-size: 18px;
    }

    .hero,
    .hero-content {
        min-height: 76vh;
    }

    .hero-content {
        padding: 54px 0 86px;
    }

    .hero h1,
    .hero h2 {
        font-size: 38px;
    }

    .section-head,
    .page-title {
        display: block;
    }

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

    .movie-info {
        padding: 12px;
    }

    .movie-desc {
        min-height: auto;
    }

    .filter-row {
        flex-direction: column;
    }

    .detail-hero-inner {
        display: block;
        padding: 38px 0 34px;
    }

    .detail-cover {
        width: 150px;
        margin-bottom: 20px;
    }

    .detail-copy p {
        font-size: 16px;
    }

    .detail-layout {
        padding-top: 24px;
    }

    .detail-card,
    .side-card,
    .panel {
        padding: 18px;
        border-radius: 18px;
    }

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