:root {
    color-scheme: light;
    --bg: #f6f9ff;
    --panel: #ffffff;
    --text: #172033;
    --muted: #667085;
    --line: rgba(23, 32, 51, 0.10);
    --primary: #2563eb;
    --primary-2: #06b6d4;
    --deep: #0f172a;
    --shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(135deg, #f8fbff 0%, #eef7ff 48%, #f5fbff 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(229, 236, 247, 0.9);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.brand-name {
    font-size: 22px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link,
.mobile-nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #4b5563;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: rgba(37, 99, 235, 0.10);
    color: var(--primary);
}

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

.header-search input,
.mobile-search input,
.wide-search input,
.filter-search input,
.search-tools select {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 230px;
    padding: 10px 14px;
}

.header-search button,
.mobile-search button,
.wide-search button {
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    cursor: pointer;
    font-weight: 800;
    padding: 10px 18px;
}

.header-search input:focus,
.mobile-search input:focus,
.wide-search input:focus,
.filter-search input:focus,
.search-tools select:focus {
    border-color: rgba(37, 99, 235, 0.5);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px auto;
    background: #111827;
}

.mobile-menu {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--line);
}

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

.mobile-search input {
    min-width: 0;
    flex: 1;
    padding: 11px 14px;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: linear-gradient(135deg, #0b1f47, #0d7490);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.2s ease;
    pointer-events: none;
}

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

.hero-cover,
.detail-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade,
.detail-shade {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 30%, rgba(6, 182, 212, 0.24), transparent 34%), linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.16));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: 620px;
}

.hero-copy {
    max-width: 680px;
    color: #fff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.92);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.eyebrow.dark {
    background: rgba(15, 23, 42, 0.08);
    color: var(--primary);
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-copy p {
    max-width: 760px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 20px;
}

.hero-meta,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    backdrop-filter: blur(10px);
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 900;
}

.primary-button {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.32);
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.38);
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.30);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.24);
    color: #fff;
    cursor: pointer;
    font-size: 34px;
    transform: translateY(-50%);
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    right: 0;
    bottom: 34px;
    left: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.hero-dots button.active {
    width: 38px;
    background: #fff;
}

.quick-panel,
.split-section {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 24px;
    margin-top: 34px;
}

.quick-search-card,
.section-block,
.category-tile,
.text-panel,
.side-panel,
.filter-bar,
.search-app {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.quick-search-card {
    padding: 30px;
}

.quick-search-card h2 {
    margin: 0 0 20px;
    font-size: 32px;
    line-height: 1.2;
}

.wide-search input {
    min-width: 0;
    flex: 1;
    padding: 14px 18px;
}

.wide-search button {
    padding: 14px 22px;
}

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

.category-mini-grid a {
    display: flex;
    min-height: 82px;
    flex-direction: column;
    justify-content: center;
    padding: 18px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-mini-grid a:hover,
.movie-card:hover,
.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 50px rgba(37, 99, 235, 0.14);
}

.category-mini-grid strong {
    font-size: 19px;
}

.category-mini-grid span,
.movie-line,
.section-heading p,
.site-footer p,
.category-tile p,
.player-note,
.search-count {
    color: var(--muted);
}

.section-block {
    margin-top: 34px;
    padding: 28px;
}

.section-block.no-margin {
    margin-top: 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: 30px;
    line-height: 1.2;
}

.section-heading p {
    margin: 8px 0 0;
}

.section-more {
    color: var(--primary);
    font-weight: 900;
    white-space: nowrap;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 250px;
    background: linear-gradient(135deg, #1d4ed8, #06b6d4 42%, #111827);
}

.poster img {
    width: 100%;
    height: 100%;
    min-height: 250px;
    object-fit: cover;
}

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

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

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 52px;
    color: #111827;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.42;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-line {
    display: -webkit-box;
    overflow: hidden;
    min-height: 48px;
    margin: 10px 0 12px;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    color: #475569;
    font-size: 13px;
    font-weight: 750;
}

.movie-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag-row span {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.09);
    color: #2454c6;
    font-size: 12px;
    font-weight: 800;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #f8fafc;
}

.rank-item span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    font-weight: 950;
}

.rank-item em {
    color: var(--primary);
    font-style: normal;
    font-weight: 900;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #0f5f87 56%, #0f172a);
    color: #fff;
}

.small-hero {
    padding: 72px 0;
}

.page-hero .container,
.detail-hero-inner {
    position: relative;
    z-index: 2;
}

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

.category-tile {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 20px;
    padding: 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-cover {
    overflow: hidden;
    min-height: 210px;
    border-radius: 20px;
    background: linear-gradient(135deg, #1d4ed8, #06b6d4);
}

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

.category-tile h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.filter-bar {
    display: grid;
    gap: 14px;
    margin-top: 24px;
    padding: 18px;
}

.filter-search input {
    width: 100%;
    padding: 13px 18px;
}

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

.chip-row button {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    padding: 9px 12px;
    font-weight: 800;
}

.chip-row button.active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
}

.detail-hero {
    min-height: 560px;
}

.detail-hero-inner {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 38px;
    align-items: center;
    min-height: 560px;
    padding: 56px 0;
}

.detail-poster {
    min-height: 430px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.detail-poster img {
    min-height: 430px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    margin-top: 34px;
}

.main-detail,
.side-panel {
    min-width: 0;
}

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

.player-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.play-trigger {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.30), rgba(2, 6, 23, 0.72));
    color: #fff;
    cursor: pointer;
}

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

.play-icon {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    margin-bottom: 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.42);
}

.player-note {
    margin: 0;
    padding: 12px 18px;
    background: #0f172a;
    color: #cbd5e1;
}

.text-panel,
.side-panel {
    margin-top: 22px;
    padding: 24px;
}

.text-panel h2,
.side-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

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

.side-panel dl,
.side-panel dd {
    margin: 0;
}

.side-panel div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.side-panel dt {
    color: var(--muted);
    font-weight: 900;
}

.side-panel dd {
    color: #111827;
    font-weight: 750;
}

.table-wrap {
    overflow-x: auto;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
}

.ranking-table th,
.ranking-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.ranking-table th {
    background: #eff6ff;
    color: #1e3a8a;
}

.rank-num {
    color: var(--primary);
    font-weight: 950;
}

.search-app {
    margin-top: 34px;
    margin-bottom: 34px;
    padding: 24px;
}

.search-page-form {
    margin-bottom: 16px;
}

.search-tools {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.search-tools select {
    padding: 12px 16px;
}

.site-footer {
    margin-top: 52px;
    background: linear-gradient(135deg, #0f172a, #111827);
    color: #cbd5e1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
    padding: 42px 0;
}

.footer-brand {
    color: #fff;
    font-size: 24px;
    font-weight: 950;
}

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

.site-footer a {
    display: block;
    margin: 6px 0;
    color: #e0f2fe;
}

.hidden-card {
    display: none !important;
}

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

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

    .quick-panel,
    .split-section,
    .detail-layout {
        grid-template-columns: 1fr;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero,
    .hero-content {
        min-height: 560px;
    }

    .hero-arrow {
        display: none;
    }

    .quick-panel,
    .category-overview,
    .footer-grid,
    .detail-hero-inner {
        grid-template-columns: 1fr;
    }

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

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

    .category-tile {
        grid-template-columns: 130px 1fr;
    }

    .search-tools {
        grid-template-columns: 1fr;
    }
}

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

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

    .hero h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 34px;
    }

    .hero p,
    .page-hero p,
    .detail-copy p {
        font-size: 16px;
    }

    .wide-search {
        flex-direction: column;
        align-items: stretch;
    }

    .category-mini-grid,
    .movie-grid,
    .compact-grid {
        grid-template-columns: 1fr;
    }

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

    .section-block,
    .quick-search-card,
    .search-app {
        padding: 18px;
    }
}
