:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --cyan: #06b6d4;
    --cyan-dark: #0891b2;
    --blue: #2563eb;
    --slate: #0f172a;
    --slate-soft: #1e293b;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

img {
    display: block;
    width: 100%;
    height: auto;
}

button,
input {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

.container {
    width: min(1240px, 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);
}

.header-inner {
    width: min(1240px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border-radius: 14px;
    box-shadow: 0 14px 30px rgba(8, 145, 178, 0.28);
}

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

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

.nav-link,
.mobile-link {
    color: #334155;
    font-weight: 700;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 9px 15px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--cyan-dark);
    background: #ecfeff;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 10px;
    background: #f1f5f9;
    border-radius: 12px;
}

.menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #0f172a;
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 10px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.mobile-nav.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mobile-link {
    padding: 11px 14px;
}

.hero {
    position: relative;
    min-height: 660px;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.45), transparent 35%), linear-gradient(135deg, #020617 0%, #0f172a 38%, #0c4a6e 100%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    background-image: linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.18;
    filter: blur(4px);
    transform: scale(1.08);
}

.hero-bg img,
.detail-backdrop img {
    height: 100%;
    object-fit: cover;
}

.hero-bg::after,
.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.62), rgba(8, 145, 178, 0.28));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    min-height: 660px;
    margin: 0 auto;
    padding: 96px 0 82px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) 360px;
    align-items: center;
    gap: 56px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-weight: 950;
    letter-spacing: -0.06em;
    line-height: 1.05;
}

.hero h1 {
    max-width: 850px;
    font-size: clamp(42px, 8vw, 86px);
}

.hero-lead {
    max-width: 760px;
    margin: 24px 0 0;
    color: #cffafe;
    font-size: clamp(18px, 2.4vw, 25px);
}

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

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span,
.detail-tags span {
    color: #ecfeff;
    background: rgba(8, 145, 178, 0.35);
    border: 1px solid rgba(103, 232, 249, 0.42);
}

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

.primary-button,
.secondary-button,
.home-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.home-search button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 38px rgba(6, 182, 212, 0.26);
}

.secondary-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.primary-button:hover,
.secondary-button:hover,
.home-search button:hover,
.movie-card:hover,
.category-card:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 30px;
    box-shadow: 0 32px 85px rgba(0, 0, 0, 0.36);
}

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

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

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    background: rgba(255, 255, 255, 0.42);
    border-radius: 999px;
}

.hero-dot.active {
    width: 36px;
    background: #67e8f9;
}

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

.section-soft {
    background: linear-gradient(180deg, #eff6ff, #ffffff);
}

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

.section-heading h2,
.search-panel h2,
.content-card h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.05em;
}

.section-more,
.text-link {
    color: var(--cyan-dark);
    font-weight: 900;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    align-items: center;
    gap: 28px;
    padding: 28px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.home-search,
.inline-search {
    display: flex;
    gap: 10px;
}

.home-search input,
.inline-search input {
    width: 100%;
    min-height: 50px;
    padding: 0 18px;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: 0;
}

.home-search input:focus,
.inline-search input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.16);
}

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

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

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

.large-ranking {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    box-shadow: var(--shadow);
}

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

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

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.78));
}

.play-dot {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(6, 182, 212, 0.94);
    border-radius: 999px;
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(239, 68, 68, 0.24);
}

.card-body {
    padding: 15px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.movie-card h3 {
    margin: 8px 0 7px;
    font-size: 17px;
    line-height: 1.25;
}

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

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

.tag-row span {
    color: var(--cyan-dark);
    background: #ecfeff;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 230px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #ffffff;
    border-radius: 24px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.category-card img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.88));
}

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

.category-card strong {
    font-size: 24px;
    font-style: normal;
    font-weight: 950;
}

.category-card em {
    margin-top: 8px;
    color: #dbeafe;
    font-size: 13px;
    font-style: normal;
}

.page-main {
    background: #ffffff;
}

.page-hero,
.detail-hero {
    position: relative;
    color: #ffffff;
    background: linear-gradient(135deg, #020617, #0f172a 52%, #0e7490);
}

.compact-hero {
    padding: 86px 0;
}

.page-hero h1 {
    max-width: 900px;
    font-size: clamp(38px, 6vw, 70px);
}

.page-hero p:not(.eyebrow) {
    max-width: 820px;
    color: #cffafe;
    font-size: 18px;
}

.inline-search {
    max-width: 680px;
    margin-top: 26px;
}

.search-wide {
    max-width: 860px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 22px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-overview-card:hover {
    box-shadow: var(--shadow);
}

.category-cover {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 18px;
}

.category-cover img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

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

.detail-hero {
    overflow: hidden;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    filter: blur(2px);
    transform: scale(1.04);
}

.detail-head {
    position: relative;
    z-index: 2;
    padding: 54px 0 64px;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
    height: 100%;
    object-fit: cover;
}

.detail-info h1 {
    font-size: clamp(36px, 6vw, 72px);
}

.detail-lead {
    max-width: 850px;
    margin: 20px 0 0;
    color: #cffafe;
    font-size: 21px;
}

.detail-tags {
    margin-top: 24px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 28px 0;
}

.detail-meta-grid span {
    padding: 14px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
}

.detail-meta-grid b {
    display: block;
    margin-bottom: 4px;
    color: #ffffff;
}

.player-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #020617;
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.24);
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #020617;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.7));
}

.play-cover.is-hidden {
    display: none;
}

.play-icon-large {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border-radius: 999px;
    box-shadow: 0 20px 45px rgba(6, 182, 212, 0.32);
    font-size: 32px;
}

.play-cover strong {
    font-size: 22px;
}

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

.content-card {
    padding: 28px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
    margin-bottom: 16px;
    font-size: 30px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 112px 1fr;
}

.compact-card .poster-wrap {
    aspect-ratio: 2 / 3;
}

.compact-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-footer {
    color: #cbd5e1;
    background: #020617;
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-logo {
    color: #ffffff;
    font-size: 22px;
}

.footer-inner p {
    margin: 8px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-weight: 800;
}

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

[hidden] {
    display: none !important;
}

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

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

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

    .menu-button {
        display: block;
    }

    .hero,
    .hero-content {
        min-height: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding: 74px 0 92px;
    }

    .hero-poster {
        max-width: 320px;
    }

    .search-panel,
    .category-overview-card,
    .detail-layout,
    .detail-content-grid {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 280px;
    }

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

    .movie-grid,
    .wide-grid,
    .ranking-grid,
    .large-ranking,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .container,
    .header-inner,
    .footer-inner,
    .hero-content,
    .mobile-nav {
        width: min(100% - 24px, 1240px);
    }

    .header-inner {
        height: 64px;
    }

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

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        letter-spacing: -0.04em;
    }

    .hero-actions,
    .home-search,
    .section-heading,
    .footer-inner {
        align-items: stretch;
        flex-direction: column;
    }

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

    .compact-hero {
        padding: 58px 0;
    }

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

    .ranking-grid,
    .large-ranking,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .card-body {
        padding: 12px;
    }

    .movie-card h3 {
        font-size: 15px;
    }

    .movie-card p {
        font-size: 12px;
    }

    .compact-card {
        grid-template-columns: 104px 1fr;
    }

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

    .play-icon-large {
        width: 72px;
        height: 72px;
    }
}
