:root {
    --sky: #0284c7;
    --sky-dark: #0369a1;
    --pink: #db2777;
    --pink-soft: #fce7f3;
    --amber: #f59e0b;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f8fafc;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 48%, #ffffff 100%);
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.nav-shell {
    max-width: 1220px;
    margin: 0 auto;
    min-height: 76px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 24px;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--sky), var(--pink));
    -webkit-background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky), var(--pink));
    box-shadow: 0 12px 24px rgba(2, 132, 199, 0.24);
    font-size: 13px;
}

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

.desktop-nav a,
.mobile-panel a {
    font-weight: 700;
    color: #374151;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-panel a:hover,
.mobile-panel a.is-active {
    color: var(--sky);
}

.top-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.mobile-search input,
.category-filter input,
.search-board input {
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #ffffff;
    padding: 11px 16px;
    outline: none;
    min-width: 230px;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.category-filter input:focus,
.search-board input:focus {
    border-color: var(--sky);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.top-search button,
.mobile-search button,
.search-board button {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky), var(--pink));
    cursor: pointer;
    font-weight: 800;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #eff6ff;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: var(--sky-dark);
}

.mobile-panel {
    display: none;
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 22px 18px;
}

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

.mobile-panel nav,
.quick-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 16px;
}

.quick-cats a {
    color: #475569;
    background: #f1f5f9;
    padding: 8px 12px;
    border-radius: 999px;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    max-width: 1220px;
    margin: 28px auto 0;
    padding: 22px;
}

.hero-glow {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 999px;
    filter: blur(42px);
    opacity: 0.45;
    pointer-events: none;
}

.hero-glow-one {
    left: -80px;
    top: 20px;
    background: #bae6fd;
}

.hero-glow-two {
    right: -80px;
    bottom: 90px;
    background: #fbcfe8;
}

.hero-stage {
    position: relative;
    min-height: 560px;
    border-radius: 36px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    align-items: stretch;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.hero-media {
    position: relative;
    min-height: 560px;
}

.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.96));
}

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

.hero-content {
    position: relative;
    z-index: 2;
    padding: 76px 58px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--sky);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content .eyebrow,
.page-hero .eyebrow,
.detail-info .eyebrow,
.rank-copy .eyebrow {
    color: #fbbf24;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 66px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.hero-summary {
    max-width: 650px;
    margin: 22px 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

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

.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    background: #eff6ff;
    color: var(--sky-dark);
    font-size: 12px;
    font-weight: 800;
}

.hero-tags .tag,
.detail-tags .tag {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky), var(--pink));
    box-shadow: 0 15px 30px rgba(219, 39, 119, 0.24);
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.hero-controls {
    position: absolute;
    left: 44px;
    right: 44px;
    bottom: 178px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.hero-arrow {
    pointer-events: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    font-size: 28px;
}

.hero-dots {
    display: flex;
    gap: 8px;
    pointer-events: auto;
}

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

.hero-dot.is-active {
    width: 32px;
    background: #ffffff;
}

.hero-rail {
    position: relative;
    z-index: 4;
    margin: -126px 34px 0;
    border-radius: 28px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(18px);
}

.rail-heading {
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
    font-weight: 900;
}

.rail-heading a,
.section-link,
.text-link {
    color: var(--sky);
    font-weight: 900;
}

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

.section-shell,
.gradient-band {
    max-width: 1220px;
    margin: 0 auto;
    padding: 72px 22px;
}

.gradient-band {
    max-width: none;
    margin-top: 20px;
    background: linear-gradient(135deg, #f0f9ff, #fdf2f8);
}

.gradient-band > * {
    max-width: 1220px;
    margin-left: auto;
    margin-right: auto;
}

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

.section-heading h2,
.rank-copy h2,
.content-card h2,
.content-side h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

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

.category-card {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: var(--radius);
    color: #ffffff;
    box-shadow: var(--shadow);
    background: #0f172a;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.2));
}

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

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

.category-card span,
.category-card p {
    position: absolute;
    z-index: 2;
    left: 18px;
    right: 18px;
}

.category-card span {
    bottom: 58px;
    font-size: 22px;
    font-weight: 900;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid rgba(226, 232, 240, 0.88);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #e0f2fe, #fce7f3);
}

.card-compact .poster-link {
    aspect-ratio: 4 / 3;
}

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

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

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    background: rgba(2, 132, 199, 0.92);
}

.rank-badge {
    left: 12px;
    top: 12px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--amber), var(--pink));
}

.movie-card-body {
    padding: 18px;
}

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

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

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

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

.rank-split {
    display: grid;
    grid-template-columns: 0.9fr 1.3fr;
    gap: 28px;
    align-items: center;
}

.rank-copy {
    border-radius: 32px;
    padding: 36px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #164e63 52%, #831843);
    box-shadow: var(--shadow);
}

.rank-copy p {
    color: rgba(255, 255, 255, 0.82);
}

.rank-panel {
    border-radius: 28px;
    padding: 16px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.rank-row {
    display: grid;
    grid-template-columns: 36px 72px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 20px;
    transition: background 0.2s ease;
}

.rank-row:hover,
.wide-rank-row:hover {
    background: #f8fafc;
}

.rank-row span {
    font-weight: 900;
    color: var(--pink);
}

.rank-row img,
.wide-rank-row img {
    width: 72px;
    height: 54px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-row em,
.wide-rank-row em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.page-hero,
.detail-hero {
    max-width: 1220px;
    margin: 28px auto 0;
    padding: 58px 42px;
    border-radius: 36px;
    color: #ffffff;
    background: radial-gradient(circle at 20% 10%, rgba(14, 165, 233, 0.42), transparent 35%), linear-gradient(135deg, #0f172a, #164e63 52%, #831843);
    box-shadow: var(--shadow);
}

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

.slim-hero,
.search-hero {
    text-align: center;
}

.slim-hero p,
.search-hero p {
    margin-left: auto;
    margin-right: auto;
}

.category-filter {
    margin-top: 26px;
}

.category-filter input {
    width: min(100%, 520px);
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
    border-radius: 28px;
    padding: 18px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.category-cover-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    overflow: hidden;
    border-radius: 22px;
    background: #f1f5f9;
}

.category-cover-strip img {
    height: 100%;
    min-height: 168px;
    object-fit: cover;
}

.wide-rank-list {
    display: grid;
    gap: 12px;
}

.wide-rank-row {
    display: grid;
    grid-template-columns: 52px 92px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    border-radius: 22px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.82);
}

.wide-rank-index {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky), var(--pink));
    font-weight: 900;
}

.wide-rank-row p {
    margin: 4px 0 0;
    color: var(--muted);
}

.search-board {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 26px;
}

.search-board input {
    min-width: min(620px, 70vw);
}

.search-results {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    min-height: 180px;
}

.empty-state {
    grid-column: 1 / -1;
    border-radius: 28px;
    padding: 42px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.detail-hero {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.28);
    background: #0f172a;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

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

.detail-lead {
    max-width: 780px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 19px;
}

.player-section {
    max-width: 1220px;
    margin: 34px auto 0;
    padding: 0 22px;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.video-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    border: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #ffffff;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.18), rgba(2, 6, 23, 0.56));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.big-play {
    width: 82px;
    height: 82px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--sky), var(--pink));
    box-shadow: 0 18px 40px rgba(219, 39, 119, 0.28);
    font-size: 28px;
    padding-left: 5px;
}

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

.content-card,
.content-side {
    border-radius: 30px;
    padding: 30px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.content-card p {
    color: #374151;
    font-size: 17px;
}

.content-side dl {
    margin: 0;
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
}

.content-side dt {
    color: var(--muted);
    font-weight: 800;
}

.content-side dd {
    margin: 0;
    font-weight: 800;
}

.site-footer {
    margin-top: 48px;
    padding: 54px 22px 24px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    max-width: 1220px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 36px;
}

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

.site-footer p {
    max-width: 430px;
    color: #94a3b8;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 9px;
}

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

.footer-bottom {
    max-width: 1220px;
    margin: 34px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.24);
    display: flex;
    justify-content: space-between;
    gap: 18px;
    color: #94a3b8;
}

@media (max-width: 1100px) {
    .top-search {
        display: none;
    }

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

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

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

    .hero-controls {
        bottom: 280px;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .nav-shell {
        min-height: 68px;
    }

    .hero-slide,
    .detail-hero,
    .detail-content,
    .rank-split,
    .footer-grid,
    .category-overview-card,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .hero-stage {
        min-height: 740px;
    }

    .hero-slide {
        grid-template-rows: 340px 1fr;
    }

    .hero-media {
        min-height: 340px;
    }

    .hero-media::after {
        background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.92));
    }

    .hero-content {
        padding: 34px 28px 44px;
    }

    .hero-controls {
        left: 34px;
        right: 34px;
        bottom: 310px;
    }

    .hero-rail {
        margin: 22px 0 0;
    }

    .movie-grid,
    .search-results,
    .compact-grid,
    .top-rank-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wide-rank-row {
        grid-template-columns: 44px 78px minmax(0, 1fr);
    }

    .wide-rank-row em {
        grid-column: 3;
    }
}

@media (max-width: 560px) {
    .brand,
    .footer-brand {
        font-size: 20px;
    }

    .hero-slider,
    .section-shell,
    .gradient-band,
    .player-section {
        padding-left: 14px;
        padding-right: 14px;
    }

    .page-hero,
    .detail-hero {
        margin-left: 14px;
        margin-right: 14px;
        padding: 38px 24px;
        border-radius: 28px;
    }

    .movie-grid,
    .search-results,
    .compact-grid,
    .category-grid,
    .rail-grid {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .search-board {
        flex-direction: column;
    }

    .search-board input {
        min-width: 0;
        width: 100%;
    }
}
