:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #eff6ff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --cyan: #0891b2;
    --orange: #f97316;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.header-inner {
    max-width: 1240px;
    min-height: 68px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.logo-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
    font-size: 14px;
}

.logo-text {
    font-size: 22px;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

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

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

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--brand);
    background: #eff6ff;
}

.nav-link:hover {
    transform: translateY(-1px);
}

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

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

.header-search input {
    width: 220px;
    padding: 10px 13px;
}

.header-search button,
.mobile-search button,
.big-search button,
.primary-btn,
.ghost-btn,
.filter-bar button {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.big-search button,
.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.header-search button,
.mobile-search button {
    padding: 10px 16px;
}

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

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: #eff6ff;
    color: var(--brand);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 20px;
}

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

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

.mobile-search input {
    flex: 1;
    padding: 12px 14px;
}

.mobile-nav {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: linear-gradient(135deg, #1d4ed8, #0891b2);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 0.65s ease;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: center;
    gap: 60px;
    padding: 72px max(24px, calc((100vw - 1240px) / 2 + 24px)) 112px;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.16), transparent 28%), radial-gradient(circle at 78% 30%, rgba(255, 255, 255, 0.12), transparent 26%);
    pointer-events: none;
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 3;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--cyan);
    background: #ecfeff;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-kicker {
    color: #cffafe;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
}

.hero h1 {
    max-width: 760px;
    margin: 20px 0 18px;
    color: #ffffff;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 20px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.channel-links a {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    padding: 7px 12px;
}

.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: 50px;
    padding: 0 24px;
}

.ghost-btn {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.primary-btn:hover,
.ghost-btn:hover,
.header-search button:hover,
.big-search button:hover {
    transform: translateY(-2px) scale(1.01);
}

.hero-poster {
    display: block;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.32);
    background: rgba(255, 255, 255, 0.10);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-poster span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 68px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--brand);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 5;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 26px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    padding: 0;
}

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

.section-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.featured-strip {
    position: relative;
    z-index: 8;
    margin-top: -72px;
}

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

.section-block {
    padding-top: 70px;
    padding-bottom: 20px;
}

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

.section-heading.compact {
    margin-bottom: 18px;
}

.section-heading h2,
.search-panel h2,
.detail-article h2,
.detail-side h2 {
    margin: 8px 0 0;
    color: var(--text);
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-heading a {
    color: var(--brand);
    font-weight: 900;
}

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.84);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: rgba(37, 99, 235, 0.22);
}

.movie-poster {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.movie-poster img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-badge,
.poster-play {
    position: absolute;
    z-index: 2;
}

.poster-badge {
    right: 12px;
    bottom: 12px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 900;
}

.poster-play {
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    transform: translate(-50%, -50%) scale(0.82);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--brand);
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.movie-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    flex: 1;
}

.movie-card h3,
.rank-card h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    line-height: 1.35;
}

.movie-card p,
.rank-card p,
.category-tile p,
.category-card p,
.search-panel p,
.page-hero p,
.detail-intro p,
.footer-brand p,
.footer-col p {
    margin: 0;
    color: var(--muted);
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

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

.tag-row span {
    color: var(--brand);
    background: #eff6ff;
    padding: 5px 9px;
}

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

.category-tile,
.category-card {
    display: block;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #ffffff, #eff6ff);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile {
    padding: 22px;
}

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

.category-tile span,
.category-card h2 {
    color: var(--text);
    font-size: 20px;
    font-weight: 900;
}

.category-tile p {
    margin-top: 10px;
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
    min-height: 120px;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
}

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

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

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

.category-card-body span {
    display: inline-flex;
    margin-top: 14px;
    color: var(--brand);
    font-weight: 900;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: 28px;
    align-items: start;
}

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

.rank-card {
    display: grid;
    grid-template-columns: auto 112px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 14px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

.rank-card img {
    width: 112px;
    height: 70px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-card span:not(.rank-num) {
    color: var(--brand);
    font-size: 13px;
    font-weight: 800;
}

.search-panel {
    position: sticky;
    top: 92px;
    border-radius: 26px;
    padding: 28px;
    color: #ffffff;
    background: linear-gradient(135deg, #1d4ed8, #0891b2);
    box-shadow: var(--shadow);
}

.search-panel h2,
.search-panel p {
    color: #ffffff;
}

.big-search {
    margin-top: 22px;
    align-items: stretch;
}

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

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

.page-hero,
.detail-hero {
    color: #ffffff;
    background: linear-gradient(135deg, #1d4ed8, #0891b2);
}

.page-hero .section-inner {
    padding-top: 72px;
    padding-bottom: 70px;
}

.page-hero h1 {
    max-width: 880px;
    margin: 18px 0 12px;
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

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

.soft-hero,
.category-hero {
    background: linear-gradient(135deg, #1e3a8a, #0891b2);
}

.rank-hero {
    background: linear-gradient(135deg, #7c2d12, #1d4ed8, #0891b2);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 14px;
    margin-bottom: 26px;
    padding: 16px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    padding: 12px 14px;
}

.empty-state {
    display: none;
    padding: 40px;
    text-align: center;
    color: var(--muted);
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.empty-state.show {
    display: block;
}

.movie-card.is-hidden {
    display: none;
}

.detail-hero {
    background-size: cover;
    background-position: center;
}

.detail-hero .section-inner {
    padding-top: 36px;
    padding-bottom: 56px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 34px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 800;
}

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

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

.detail-cover {
    width: 260px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
    background: rgba(255, 255, 255, 0.12);
}

.detail-intro h1 {
    margin: 16px 0;
    font-size: clamp(36px, 6vw, 66px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.detail-intro p {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 19px;
}

.detail-meta {
    margin: 22px 0 14px;
}

.detail-meta span,
.detail-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    padding: 7px 12px;
}

.player-section {
    margin-top: -24px;
    position: relative;
    z-index: 5;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.64));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-button {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--brand);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    font-size: 26px;
    padding-left: 4px;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    padding-top: 44px;
}

.detail-article,
.detail-side {
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.detail-article {
    padding: 30px;
}

.detail-article h2,
.detail-side h2 {
    font-size: 26px;
}

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

.detail-side {
    padding: 24px;
    align-self: start;
}

.detail-side dl {
    display: grid;
    gap: 14px;
    margin: 18px 0 0;
}

.detail-side dl div {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

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

.detail-side dd {
    margin: 0;
    color: var(--text);
    font-weight: 800;
}

.next-prev {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.next-prev a {
    display: block;
    color: var(--brand);
    font-weight: 900;
}

.channel-links {
    margin-top: 24px;
}

.channel-links a {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    padding: 8px 12px;
}

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

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 48px 24px;
    display: grid;
    grid-template-columns: minmax(260px, 1.3fr) repeat(3, minmax(0, 1fr));
    gap: 30px;
}

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

.footer-brand p,
.footer-col p {
    margin-top: 14px;
    color: #94a3b8;
}

.footer-col h3 {
    margin: 0 0 12px;
    color: #ffffff;
}

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

.footer-col a:hover {
    color: #60a5fa;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding: 18px 24px;
    text-align: center;
    color: #94a3b8;
}

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

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

@media (max-width: 1100px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 260px;
    }

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

    .split-section,
    .detail-content-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .search-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .header-inner {
        padding: 0 16px;
    }

    .logo-text {
        font-size: 19px;
    }

    .hero,
    .hero-slider {
        min-height: 680px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 42px 20px 110px;
    }

    .hero-poster {
        max-width: 210px;
        margin: 0 auto;
        transform: none;
    }

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

    .overlap-grid,
    .movie-grid,
    .category-grid,
    .category-card-grid,
    .top-rank-grid,
    .rank-page-list {
        grid-template-columns: 1fr;
    }

    .section-inner {
        padding-left: 18px;
        padding-right: 18px;
    }

    .section-block {
        padding-top: 46px;
    }

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

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

    .rank-card {
        grid-template-columns: auto 92px minmax(0, 1fr);
        gap: 10px;
    }

    .rank-card img {
        width: 92px;
        height: 62px;
    }

    .detail-hero-grid {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        width: min(240px, 75vw);
    }

    .detail-side dl div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

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