:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --cyan: #06b6d4;
    --cyan-dark: #0891b2;
    --blue: #2563eb;
    --rose: #f43f5e;
    --amber: #f59e0b;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
    color: #ffffff;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.25);
    backdrop-filter: blur(18px);
}

.site-nav {
    width: min(1280px, calc(100% - 32px));
    min-height: 70px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 30px rgba(6, 182, 212, 0.32);
}

.brand-text {
    white-space: nowrap;
    font-size: 19px;
}

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

.nav-link,
.mobile-link {
    padding: 9px 14px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.78);
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #ffffff;
    background: rgba(148, 163, 184, 0.16);
}

.nav-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.45);
}

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

.nav-search input::placeholder,
.mobile-search input::placeholder {
    color: rgba(255, 255, 255, 0.58);
}

.nav-search button,
.mobile-search button {
    border: 0;
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 12px;
    background: var(--cyan);
    cursor: pointer;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    padding: 8px;
    background: transparent;
}

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

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-nav.open {
    display: grid;
    gap: 10px;
}

.mobile-search {
    display: flex;
    gap: 8px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
}

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

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 20%, rgba(6, 182, 212, 0.28), transparent 36%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.12)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.76), transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    height: 72vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1280px;
}

.hero-content h1 {
    max-width: 760px;
    margin: 16px 0;
    color: #ffffff;
    font-size: clamp(38px, 6vw, 74px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.hero-kicker {
    display: flex;
    gap: 10px;
    color: #ffffff;
}

.hero-kicker span,
.detail-category {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(6, 182, 212, 0.92);
    box-shadow: 0 12px 24px rgba(6, 182, 212, 0.25);
}

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

.primary-btn,
.ghost-btn,
.rank-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 14px;
    padding: 13px 22px;
    font-weight: 800;
    transition: 0.2s ease;
}

.primary-btn {
    color: #ffffff;
    background: var(--cyan);
    box-shadow: 0 16px 32px rgba(6, 182, 212, 0.32);
}

.primary-btn:hover,
.rank-action:hover {
    transform: translateY(-2px);
    background: var(--cyan-dark);
}

.primary-btn.small {
    padding: 10px 16px;
}

.ghost-btn {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(12px);
}

.ghost-btn.light {
    background: rgba(255, 255, 255, 0.16);
}

.hero-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    font-size: 38px;
    line-height: 1;
    background: rgba(2, 6, 23, 0.42);
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
}

.hero-arrow.prev {
    left: 24px;
}

.hero-arrow.next {
    right: 24px;
}

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

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

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

.hero-search {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 74px;
    width: min(620px, calc(100% - 32px));
    display: flex;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.55);
    transform: translateX(-50%);
    backdrop-filter: blur(18px);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.62);
}

.hero-search button {
    border: 0;
    border-radius: 15px;
    padding: 10px 18px;
    color: #ffffff;
    background: var(--cyan);
    cursor: pointer;
}

.section-wrap,
.page-main,
.detail-main {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.section-wrap {
    padding: 62px 0 0;
}

.section-title {
    display: flex;
    align-items: end;
    gap: 14px;
    margin-bottom: 24px;
}

.section-title span {
    color: var(--cyan-dark);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.section-title h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.12;
}

.section-title a {
    margin-left: auto;
    color: var(--cyan-dark);
    font-weight: 700;
}

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

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

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

.library-grid {
    padding-bottom: 70px;
}

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 14px 45px rgba(15, 23, 42, 0.08);
    transition: 0.22s ease;
}

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

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

.poster img,
.mini-poster img,
.rank-poster img,
.poster-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 42%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent);
}

.poster-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
}

.card-body {
    padding: 16px;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

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

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

.tag-row,
.tag-cloud div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-row span,
.tag-cloud span {
    border: 1px solid rgba(6, 182, 212, 0.24);
    border-radius: 999px;
    padding: 4px 9px;
    color: var(--cyan-dark);
    background: #ecfeff;
    font-size: 12px;
}

.hot-section,
.newest-section {
    padding: 46px;
    border-radius: 34px;
    background: linear-gradient(135deg, #ecfeff, #eff6ff);
}

.newest-section {
    margin-bottom: 70px;
    background: linear-gradient(135deg, #f5f3ff, #fdf2f8);
}

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

.category-preview-card,
.category-box,
.filter-panel,
.detail-info-card,
.side-card {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--surface);
    box-shadow: 0 14px 42px rgba(15, 23, 42, 0.07);
}

.category-preview-card {
    padding: 22px;
}

.category-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.category-preview-head h3 {
    margin: 0;
    font-size: 22px;
}

.category-preview-head a,
.category-box-body a {
    color: var(--cyan-dark);
    font-weight: 800;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 13px;
    align-items: center;
}

.mini-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

.mini-card h3 {
    margin: 0 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-card p,
.mini-card span {
    display: block;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-main {
    padding-bottom: 72px;
}

.page-hero {
    margin: 36px 0 28px;
    padding: 56px;
    overflow: hidden;
    border-radius: 34px;
    color: #ffffff;
    background:
        radial-gradient(circle at 80% 0%, rgba(6, 182, 212, 0.36), transparent 34%),
        linear-gradient(135deg, #0f172a, #1e293b 48%, #075985);
    box-shadow: var(--shadow);
}

.page-hero span {
    color: #67e8f9;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.page-hero h1 {
    margin: 12px 0 12px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.category-box-grid {
    padding-bottom: 40px;
}

.category-box {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    overflow: hidden;
}

.category-cover-stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    min-height: 230px;
    background: #0f172a;
}

.category-cover-stack img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-box-body {
    padding: 28px;
}

.category-box-body h2 {
    margin: 0 0 10px;
    font-size: 26px;
}

.category-box-body p {
    color: var(--muted);
}

.category-box-body span {
    display: inline-flex;
    margin-top: 10px;
    border-radius: 999px;
    padding: 7px 13px;
    color: var(--cyan-dark);
    background: #ecfeff;
    font-weight: 800;
}

.filter-panel {
    margin: 0 0 28px;
    padding: 22px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 14px;
}

.filter-grid label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-weight: 700;
}

.filter-grid input,
.filter-grid select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: 0;
    padding: 12px 14px;
    background: #ffffff;
}

.filter-grid input:focus,
.filter-grid select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.filter-result {
    margin-top: 12px;
    color: var(--muted);
}

.rank-list {
    display: grid;
    gap: 16px;
    padding-bottom: 70px;
}

.rank-item {
    display: grid;
    grid-template-columns: 72px 96px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.06);
}

.rank-num {
    color: var(--cyan-dark);
    font-size: 32px;
    font-weight: 900;
}

.rank-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 16px;
    background: #0f172a;
}

.rank-body h2 {
    margin: 0 0 6px;
}

.rank-body p {
    margin: 0 0 8px;
    color: var(--muted);
}

.rank-body div {
    color: var(--muted);
    font-size: 14px;
}

.rank-action {
    color: #ffffff;
    background: var(--cyan);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0;
    color: var(--muted);
}

.breadcrumb a {
    color: var(--cyan-dark);
    font-weight: 700;
}

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

.player-card {
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

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

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

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.28));
    cursor: pointer;
}

.play-layer.hidden {
    display: none;
}

.play-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.94);
    box-shadow: 0 18px 42px rgba(6, 182, 212, 0.34);
    position: relative;
}

.play-icon::after {
    content: "";
    position: absolute;
    left: 31px;
    top: 23px;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 22px solid #ffffff;
}

.detail-info-card {
    margin-top: 22px;
    padding: 28px;
}

.detail-head {
    display: flex;
    gap: 18px;
    align-items: start;
    justify-content: space-between;
}

.detail-head h1 {
    margin: 12px 0 0;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.12;
}

.detail-meta {
    margin: 20px 0;
}

.detail-meta span {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 11px;
    background: #f8fafc;
}

.one-line {
    margin: 0 0 22px;
    border-left: 4px solid var(--cyan);
    border-radius: 12px;
    padding: 16px 18px;
    color: #334155;
    background: #ecfeff;
    font-size: 17px;
}

.copy-block {
    margin-top: 28px;
}

.copy-block h2,
.tag-cloud h2,
.side-card h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.copy-block p,
.review-box {
    color: #334155;
    font-size: 16px;
}

.review-box {
    border-left: 4px solid var(--cyan);
    border-radius: 14px;
    padding: 18px;
    background: #f8fafc;
}

.tag-cloud {
    margin-top: 28px;
}

.detail-side {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 20px;
}

.side-card {
    padding: 20px;
}

.poster-side img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 20px;
    object-fit: cover;
}

.poster-side h2 {
    margin: 16px 0 4px;
}

.poster-side p {
    margin: 0;
    color: var(--muted);
}

.site-footer {
    color: rgba(255, 255, 255, 0.78);
    background: #0f172a;
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0;
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 24px;
}

.footer-brand {
    color: #ffffff;
    font-size: 20px;
}

.footer-inner p {
    margin: 10px 0 0;
    max-width: 520px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: end;
}

.footer-links a {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 7px 12px;
}

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

@media (max-width: 1180px) {
    .featured-grid,
    .compact-grid,
    .library-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .detail-side {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero-content {
        height: 76vh;
        padding-bottom: 90px;
    }

    .hero-search {
        bottom: 76px;
    }

    .hero-arrow {
        display: none;
    }

    .featured-grid,
    .compact-grid,
    .library-grid,
    .category-preview-grid,
    .category-box-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-box {
        grid-template-columns: 1fr;
    }

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

    .rank-item {
        grid-template-columns: 52px 82px minmax(0, 1fr);
    }

    .rank-action {
        grid-column: 2 / -1;
    }

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

    .footer-links {
        justify-content: start;
    }
}

@media (max-width: 640px) {
    .site-nav,
    .mobile-nav,
    .section-wrap,
    .page-main,
    .detail-main {
        width: min(100% - 22px, 1280px);
    }

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

    .hero {
        min-height: 78vh;
    }

    .hero-content {
        height: 78vh;
    }

    .hero-content p {
        font-size: 16px;
    }

    .hero-search {
        flex-direction: column;
        bottom: 62px;
    }

    .section-wrap {
        padding-top: 42px;
    }

    .section-title {
        align-items: start;
        flex-direction: column;
        gap: 6px;
    }

    .section-title a {
        margin-left: 0;
    }

    .featured-grid,
    .compact-grid,
    .library-grid,
    .category-preview-grid,
    .category-box-grid {
        grid-template-columns: 1fr;
    }

    .hot-section,
    .newest-section,
    .page-hero {
        padding: 26px;
        border-radius: 26px;
    }

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

    .rank-item {
        grid-template-columns: 48px 76px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-body p {
        display: none;
    }

    .detail-info-card {
        padding: 20px;
    }

    .detail-head {
        display: block;
    }

    .detail-head .primary-btn {
        margin-top: 16px;
    }
}
