:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --muted-2: #94a3b8;
    --cyan: #0891b2;
    --cyan-dark: #0e7490;
    --cyan-soft: #ecfeff;
    --blue-soft: #eff6ff;
    --line: #e2e8f0;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

button,
input,
select {
    font: inherit;
}

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

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

.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 72px;
}

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

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 12px 24px rgba(8, 145, 178, 0.24);
}

.brand-text {
    font-size: 20px;
    letter-spacing: 0.02em;
}

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

.nav-link {
    padding: 9px 12px;
    border-radius: 999px;
    color: #475569;
    font-size: 14px;
    transition: color 0.2s ease, background 0.2s ease;
}

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

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    min-width: 280px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
}

.header-search input {
    width: 100%;
    border: 0;
    outline: none;
    padding: 10px 14px;
    color: var(--text);
    background: transparent;
}

.header-search button {
    border: 0;
    padding: 10px 16px;
    color: #fff;
    background: var(--cyan);
    cursor: pointer;
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--text);
}

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

.page-space {
    padding: 34px 0 60px;
}

.hero-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
    align-items: stretch;
}

.hero-stage {
    position: relative;
    min-height: 560px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #020617;
}

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

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

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

.hero-bg {
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
    transition: transform 5s ease;
}

.hero-slide.active .hero-bg {
    transform: scale(1.08);
}

.hero-overlay {
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.55) 45%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    max-width: 760px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 54px;
    color: #fff;
}

.hero-pill,
.page-hero span {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    color: #fff;
    background: var(--cyan);
    font-size: 13px;
    font-weight: 700;
}

.hero-content h1 {
    margin: 18px 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    line-height: 1.75;
}

.hero-meta,
.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
}

.hero-meta span,
.card-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
}

.card-meta span,
.detail-meta span {
    background: #f1f5f9;
    color: #64748b;
}

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

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

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

.btn-primary {
    color: #fff;
    background: var(--cyan);
    box-shadow: 0 12px 26px rgba(8, 145, 178, 0.28);
}

.btn-primary:hover {
    background: var(--cyan-dark);
}

.btn-glass {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

.hero-arrow {
    position: absolute;
    z-index: 5;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(2, 6, 23, 0.58);
    font-size: 34px;
    line-height: 1;
    transform: translateY(-50%);
    cursor: pointer;
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dot {
    width: 8px;
    height: 8px;
    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.active {
    width: 34px;
    background: #fff;
}

.hero-side {
    padding: 26px;
    border-radius: 28px;
    background: linear-gradient(135deg, #ecfeff, #eff6ff);
    box-shadow: var(--shadow-soft);
}

.hero-side h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.hero-side p {
    margin: 0 0 20px;
    color: var(--muted);
    line-height: 1.7;
}

.hero-search {
    display: flex;
    overflow: hidden;
    border: 1px solid #bae6fd;
    border-radius: 14px;
    background: #fff;
}

.hero-search input {
    min-width: 0;
    flex: 1;
    padding: 13px 14px;
    border: 0;
    outline: none;
}

.hero-search button {
    border: 0;
    padding: 0 16px;
    color: #fff;
    background: var(--cyan);
    cursor: pointer;
}

.hero-thumbs {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.hero-thumb {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.68);
    transition: transform 0.2s ease, background 0.2s ease;
}

.hero-thumb:hover {
    transform: translateX(4px);
    background: #fff;
}

.hero-thumb img {
    height: 58px;
    border-radius: 12px;
}

.hero-thumb span {
    font-weight: 700;
    color: var(--text);
}

.content-section {
    margin-top: 48px;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    color: var(--text);
}

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

.section-more {
    flex-shrink: 0;
    color: var(--cyan-dark);
    font-weight: 800;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.card-cover {
    position: relative;
    display: block;
    height: 250px;
    overflow: hidden;
    background: #0f172a;
}

.movie-card-large .card-cover {
    height: 310px;
}

.card-cover img {
    transition: transform 0.5s ease;
}

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

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.65), transparent 55%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .card-cover::after {
    opacity: 1;
}

.card-play {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(8, 145, 178, 0.88);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.card-badge {
    position: absolute;
    z-index: 3;
    right: 12px;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #fff;
    background: var(--cyan);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 17px;
}

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

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

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

.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.card-tags span,
.detail-tags span {
    padding: 5px 9px;
    border-radius: 8px;
    color: var(--cyan-dark);
    background: var(--cyan-soft);
    font-size: 12px;
    font-weight: 700;
}

.gradient-panel {
    padding: 30px;
    border-radius: 28px;
    background: linear-gradient(135deg, #ecfeff, #eff6ff);
}

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

.category-card,
.category-overview-card {
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card {
    position: relative;
    min-height: 178px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #fff;
}

.category-card img {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.12));
}

.category-card span,
.category-card em {
    position: relative;
    z-index: 2;
    margin: 0 16px;
    font-style: normal;
}

.category-card span {
    font-size: 20px;
    font-weight: 900;
}

.category-card em {
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
}

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

.compact-grid {
    gap: 18px;
}

.ranking-box {
    position: sticky;
    top: 96px;
    padding: 22px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

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

.rank-row {
    display: grid;
    grid-template-columns: auto 96px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.mini-rank-list .rank-row {
    grid-template-columns: auto 76px minmax(0, 1fr);
}

.mini-rank-list .rank-action {
    display: none;
}

.rank-index {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    font-size: 13px;
    font-weight: 900;
}

.rank-cover {
    height: 74px;
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
}

.rank-info h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.rank-info p {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rank-action {
    display: inline-flex;
    padding: 9px 12px;
    border-radius: 10px;
    color: #fff;
    background: var(--cyan);
    font-size: 13px;
    font-weight: 800;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 46px;
    border-radius: 28px;
    color: #fff;
    background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.35), transparent 38%), linear-gradient(135deg, #0f172a, #0e7490);
    box-shadow: var(--shadow);
}

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

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.8;
}

.small-hero {
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 160px 170px 180px;
    gap: 12px;
    margin-top: 24px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 12px;
    outline: none;
    color: var(--text);
    background: #fff;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--cyan-dark);
}

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

.player-section {
    position: relative;
    overflow: hidden;
    background: #000;
}

.movie-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.52), rgba(2, 6, 23, 0.1));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(8, 145, 178, 0.9);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
    font-size: 32px;
}

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

.detail-body {
    padding: clamp(22px, 4vw, 40px);
}

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

.detail-head h1 {
    margin: 0 0 10px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.15;
}

.detail-head p {
    margin: 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.7;
}

.detail-category {
    flex-shrink: 0;
    padding: 8px 13px;
    border-radius: 999px;
    color: #fff;
    background: var(--cyan);
    font-weight: 800;
}

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

.story-block {
    margin-top: 30px;
}

.story-block h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.story-block p {
    margin: 0;
    color: #334155;
    line-height: 1.95;
    white-space: pre-line;
}

.review-block {
    padding: 22px;
    border-radius: 18px;
    background: #f8fafc;
}

.category-collage {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    height: 230px;
}

.category-collage img {
    min-width: 0;
}

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

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

.category-overview-body p {
    min-height: 44px;
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.55;
}

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

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

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 1fr 1fr;
    gap: 34px;
    padding: 48px 0;
}

.footer-brand {
    color: #fff;
}

.site-footer p {
    max-width: 520px;
    margin: 16px 0 0;
    color: #94a3b8;
    line-height: 1.8;
}

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

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

.site-footer a:hover {
    color: #22d3ee;
}

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1080px) {
    .hero-wrap,
    .split-layout {
        grid-template-columns: 1fr;
    }

    .hero-side,
    .ranking-box {
        position: static;
    }

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

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

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

    .header-inner {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 0;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        order: 4;
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 8px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: #fff;
    }

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

    .header-search {
        order: 5;
        width: 100%;
        min-width: 0;
        margin-left: 0;
    }

    .hero-stage {
        min-height: 520px;
        border-radius: 22px;
    }

    .hero-content {
        padding: 34px 22px 58px;
    }

    .hero-arrow {
        width: 40px;
        height: 40px;
        font-size: 26px;
    }

    .hero-side,
    .gradient-panel,
    .page-hero,
    .detail-body {
        padding: 22px;
        border-radius: 22px;
    }

    .movie-grid-4,
    .movie-grid-3,
    .category-grid,
    .overview-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-head {
        flex-direction: column;
    }

    .rank-row,
    .mini-rank-list .rank-row {
        grid-template-columns: auto 82px minmax(0, 1fr);
    }

    .rank-action {
        display: none;
    }

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