:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --dark: #020617;
    --dark-panel: #0f172a;
    --cyan: #06b6d4;
    --blue: #2563eb;
    --red: #ef4444;
    --gold: #f59e0b;
    --shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

[hidden] {
    display: none !important;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(15, 23, 42, 0.96);
    color: #ffffff;
    box-shadow: 0 15px 40px rgba(2, 6, 23, 0.24);
    backdrop-filter: blur(16px);
}

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

.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 10px 26px rgba(6, 182, 212, 0.35);
}

.brand-text {
    font-size: 22px;
    background: linear-gradient(90deg, #22d3ee, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

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

.nav-link {
    color: #cbd5e1;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #22d3ee;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(51, 65, 85, 0.84);
}

.header-search input,
.mobile-search input,
.hero-search input,
.filter-panel input,
.filter-panel select {
    border: 0;
    outline: 0;
}

.header-search input {
    width: 210px;
    padding: 9px 12px;
    color: #ffffff;
    background: transparent;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
    color: #94a3b8;
}

.header-search button,
.mobile-search button,
.hero-search button,
.filter-panel button {
    border: 0;
    cursor: pointer;
    color: #ffffff;
    font-weight: 750;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

.header-search button {
    padding: 9px 16px;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    border-radius: 14px;
    background: #1e293b;
    cursor: pointer;
}

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

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding: 18px 16px 22px;
    background: #0f172a;
}

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

.mobile-links,
.mobile-categories,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mobile-link,
.mobile-categories a,
.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
}

.mobile-link.active,
.mobile-link:hover,
.mobile-categories a:hover,
.footer-links a:hover {
    color: #22d3ee;
    background: rgba(6, 182, 212, 0.14);
}

.mobile-search {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}

.mobile-search input {
    flex: 1;
    min-width: 0;
    color: #ffffff;
    padding: 12px 14px;
    border-radius: 999px;
    background: #1e293b;
}

.mobile-search button {
    padding: 0 18px;
}

.hero-carousel {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    visibility: hidden;
    background-position: center;
    background-size: cover;
    transition: opacity 0.75s ease, visibility 0.75s ease;
}

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

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1180px;
}

.hero-content h1,
.hero-content h2 {
    max-width: 720px;
    margin: 14px 0;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.hero-content p {
    max-width: 650px;
    margin: 0 0 24px;
    color: #dbeafe;
    font-size: 18px;
}

.hero-kicker,
.section-heading span,
.sub-hero span,
.detail-info .breadcrumb,
.spotlight-panel span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: #ecfeff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 7px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.92), rgba(37, 99, 235, 0.85));
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta span,
.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    color: #e2e8f0;
    font-weight: 650;
}

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

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

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 35px rgba(37, 99, 235, 0.35);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-tile:hover,
.mini-card:hover,
.rank-row:hover {
    transform: translateY(-3px);
}

.hero-dots {
    position: relative;
    z-index: 4;
    min-height: 560px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding-bottom: 42px;
    pointer-events: none;
}

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

.hero-dots button.is-active {
    width: 72px;
    background: #22d3ee;
}

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

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

.section-heading.centered {
    max-width: 760px;
    margin: 0 auto 24px;
    text-align: center;
    display: block;
}

.section-heading.compact-heading {
    align-items: center;
}

.section-heading h2,
.sub-hero h1,
.detail-content h2,
.category-panel-body h2 {
    margin: 8px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-heading p,
.sub-hero p,
.category-panel-body p,
.spotlight-panel p {
    color: var(--muted);
}

.section-heading a {
    color: var(--blue);
    font-weight: 800;
}

.quick-search-block {
    margin-top: -42px;
    position: relative;
    z-index: 7;
}

.quick-search-block .section-heading {
    padding: 30px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.hero-search {
    display: flex;
    max-width: 760px;
    margin: 0 auto;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    padding: 14px 18px;
    border: 0;
    outline: 0;
    border-radius: 999px;
}

.hero-search button {
    padding: 0 26px;
}

.category-grid,
.movie-grid,
.top-rank-grid {
    display: grid;
    gap: 22px;
}

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

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

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

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

.category-tile {
    min-height: 178px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    padding: 22px;
    color: #ffffff;
    border-radius: var(--radius);
    background-position: center;
    background-size: cover;
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile span {
    font-size: 23px;
    font-weight: 900;
}

.category-tile strong {
    color: #dbeafe;
    font-size: 14px;
    font-weight: 600;
}

.movie-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-cover {
    position: relative;
    margin: 0;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
}

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

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

.card-score,
.rank-badge {
    position: absolute;
    top: 12px;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 850;
    box-shadow: 0 10px 20px rgba(2, 6, 23, 0.28);
}

.card-score {
    right: 12px;
    padding: 6px 10px;
    background: rgba(15, 23, 42, 0.76);
}

.rank-badge {
    left: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--red), var(--gold));
}

.card-body {
    padding: 18px;
}

.card-meta {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.card-body h2 {
    margin: 10px 0 8px;
    font-size: 19px;
    line-height: 1.25;
}

.card-body p {
    margin: 0;
    min-height: 46px;
    color: var(--muted);
    font-size: 14px;
}

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

.card-tags span,
.detail-tags a {
    padding: 5px 9px;
    border-radius: 999px;
    color: #0369a1;
    font-size: 12px;
    font-weight: 800;
    background: #e0f2fe;
}

.split-layout {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 28px;
    align-items: stretch;
}

.ranking-list,
.rank-table {
    display: grid;
    gap: 12px;
}

.mini-card,
.rank-row {
    display: grid;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mini-card {
    grid-template-columns: auto 82px 1fr;
}

.mini-card img,
.rank-row img {
    height: 54px;
    border-radius: 12px;
    object-fit: cover;
}

.mini-card strong,
.rank-row strong {
    display: block;
    line-height: 1.35;
}

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

.mini-rank,
.rank-index {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.spotlight-panel {
    min-height: 100%;
    padding: 34px;
    border-radius: var(--radius);
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.42), transparent 36%), linear-gradient(135deg, #0f172a, #1e3a8a);
    box-shadow: var(--shadow);
}

.spotlight-panel p {
    color: #dbeafe;
}

.sub-hero {
    padding: 82px 0 74px;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.28), transparent 36%), linear-gradient(135deg, #020617, #0f172a 48%, #164e63);
}

.sub-hero h1 {
    max-width: 840px;
    margin-top: 14px;
}

.sub-hero p {
    max-width: 760px;
    color: #cbd5e1;
    font-size: 18px;
}

.category-panels {
    display: grid;
    gap: 22px;
}

.category-panel {
    display: grid;
    grid-template-columns: 280px 1fr;
    overflow: hidden;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.category-panel-cover {
    min-height: 210px;
    display: flex;
    align-items: flex-end;
    padding: 24px;
    background-position: center;
    background-size: cover;
}

.category-panel-cover span {
    color: #ffffff;
    font-size: 30px;
    font-weight: 900;
}

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

.category-panel-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.category-panel-links a {
    padding: 7px 11px;
    border-radius: 999px;
    color: #0e7490;
    background: #ecfeff;
    font-weight: 700;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 14px;
    padding: 18px;
    margin-bottom: 26px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    background: #f8fafc;
}

.empty-state {
    padding: 28px;
    text-align: center;
    color: var(--muted);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.rank-row {
    grid-template-columns: 42px 92px 1fr minmax(180px, 0.8fr) 68px;
}

.rank-row img {
    width: 92px;
    height: 58px;
}

.rank-row b {
    color: var(--red);
    font-size: 20px;
    text-align: right;
}

.detail-hero {
    padding: 76px 0;
    color: #ffffff;
    background-position: center;
    background-size: cover;
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 42px;
    align-items: center;
}

.detail-poster {
    margin: 0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.46);
}

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

.detail-info h1 {
    margin: 16px 0;
    font-size: clamp(38px, 5vw, 66px);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.detail-info p {
    max-width: 760px;
    color: #dbeafe;
    font-size: 18px;
}

.breadcrumb {
    gap: 8px;
}

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

.movie-video,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-video {
    object-fit: contain;
    background: #020617;
}

.player-cover {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background-position: center;
    background-size: cover;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.42);
    font-size: 36px;
}

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

.detail-content {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
}

.detail-content article,
.detail-content aside {
    padding: 30px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.detail-content article p {
    color: #334155;
    font-size: 17px;
}

.detail-content dl {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 10px 14px;
    margin: 0;
}

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

.detail-content dd {
    margin: 0;
}

.site-footer {
    margin-top: 42px;
    color: #cbd5e1;
    background: #020617;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.7fr;
    gap: 34px;
    padding: 46px 0;
}

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

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

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

.footer-links.compact {
    display: grid;
}

.footer-bottom {
    padding: 20px 16px;
    text-align: center;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

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

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

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

    .detail-hero-grid,
    .detail-content,
    .split-layout {
        grid-template-columns: 1fr;
    }

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

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .hero-carousel,
    .hero-content,
    .hero-dots {
        min-height: 620px;
    }

    .hero-content {
        justify-content: flex-end;
        padding-bottom: 110px;
    }

    .category-grid,
    .movie-grid,
    .large-grid,
    .top-rank-grid,
    .footer-grid,
    .category-panel,
    .filter-panel {
        grid-template-columns: 1fr 1fr;
    }

    .filter-keyword {
        grid-column: 1 / -1;
    }

    .rank-row {
        grid-template-columns: 34px 72px 1fr 54px;
    }

    .rank-row em {
        display: none;
    }

    .rank-row img {
        width: 72px;
        height: 48px;
    }
}

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

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

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

    .hero-actions,
    .hero-meta {
        gap: 10px;
    }

    .primary-btn,
    .ghost-btn {
        width: 100%;
    }

    .hero-search,
    .mobile-search {
        border-radius: 22px;
        flex-direction: column;
    }

    .hero-search button,
    .mobile-search button {
        min-height: 46px;
    }

    .category-grid,
    .movie-grid,
    .large-grid,
    .top-rank-grid,
    .footer-grid,
    .filter-panel,
    .category-panel {
        grid-template-columns: 1fr;
    }

    .section-heading {
        display: block;
    }

    .detail-hero {
        padding: 42px 0;
    }

    .detail-info h1 {
        font-size: 38px;
    }

    .detail-content article,
    .detail-content aside {
        padding: 22px;
    }
}
