:root {
    --bg: #f8fbff;
    --surface: #ffffff;
    --surface-soft: #eff8ff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --accent: #2563eb;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
    --radius: 24px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: radial-gradient(circle at 8% 0%, rgba(14, 165, 233, 0.16), transparent 28%), var(--bg);
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.header-inner {
    width: min(1280px, calc(100% - 32px));
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.32);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-text strong,
.footer-brand {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text small {
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link,
.mobile-link {
    color: #334155;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
    padding: 10px 15px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover {
    color: var(--primary-dark);
    background: #e0f2fe;
}

.header-search {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background: #ffffff;
}

.header-search input {
    width: 210px;
    border: 0;
    outline: 0;
    padding: 10px 14px;
    color: var(--text);
}

.header-search button,
.large-search button {
    border: 0;
    color: #ffffff;
    background: var(--primary);
    padding: 10px 16px;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--text);
}

.mobile-panel {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

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

.mobile-link {
    padding: 10px 12px;
}

.mobile-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.mobile-search input,
.mobile-search button,
.large-search input,
.catalog-controls input,
.catalog-controls select {
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: 0;
    background: #ffffff;
}

.mobile-search input,
.large-search input,
.catalog-controls input,
.catalog-controls select {
    padding: 12px 14px;
    color: var(--text);
}

.mobile-search button {
    padding: 12px 15px;
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
}

main {
    min-height: 60vh;
}

.hero-carousel {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    margin: 28px auto 40px;
    padding: 20px;
    overflow: hidden;
    border-radius: 32px;
    background: linear-gradient(135deg, #e0f2fe 0%, #ffffff 46%, #dbeafe 100%);
    box-shadow: var(--shadow);
}

.hero-glow {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    filter: blur(52px);
    opacity: 0.58;
    pointer-events: none;
}

.hero-glow.one {
    top: -80px;
    left: -80px;
    background: rgba(14, 165, 233, 0.35);
}

.hero-glow.two {
    right: -90px;
    bottom: -110px;
    background: rgba(37, 99, 235, 0.25);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
    align-items: center;
    gap: 42px;
    padding: 44px;
    opacity: 0;
    transform: translateX(20px);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.hero-image-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 30px;
    border: 8px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.26);
}

.hero-image-wrap img,
.poster-link img,
.detail-poster img,
.overview-images img,
.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-copy {
    position: relative;
    z-index: 2;
}

.hero-kicker,
.section-heading span,
.page-hero span,
.feature-panel span,
.category-overview-card span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--primary-dark);
    background: rgba(14, 165, 233, 0.1);
    font-weight: 700;
    font-size: 13px;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
    margin: 16px 0 12px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-copy h2 {
    font-size: clamp(28px, 4vw, 48px);
}

.hero-copy p,
.page-hero p,
.detail-copy p,
.feature-panel p {
    color: #475569;
    font-size: 18px;
}

.hero-tags,
.tag-list,
.detail-meta,
.detail-actions,
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-tags,
.detail-tags {
    margin: 20px 0;
}

.hero-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    color: #0369a1;
    background: #e0f2fe;
    font-size: 12px;
    font-weight: 700;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    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: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 14px 28px rgba(14, 165, 233, 0.28);
}

.btn.soft {
    color: var(--primary-dark);
    background: #e0f2fe;
}

.btn.ghost {
    color: #334155;
    background: rgba(255, 255, 255, 0.72);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transform: translateX(-50%);
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(12px);
}

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-arrow {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #0f172a;
    background: #ffffff;
    font-size: 24px;
    line-height: 1;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #bae6fd;
}

.hero-dot.active {
    width: 28px;
    background: var(--primary);
}

.home-search-panel,
.section-block,
.page-hero,
.detail-inner,
.site-footer .footer-inner,
.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.home-search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 0.72fr);
    gap: 28px;
    align-items: center;
    margin-bottom: 42px;
    padding: 28px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.home-search-panel h2,
.section-heading h2,
.story-card h2,
.ranking-aside h2,
.category-overview-card h2 {
    margin: 8px 0 4px;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.home-search-panel p,
.story-card p,
.category-overview-card p,
.movie-card-body p {
    color: var(--muted);
}

.large-search {
    display: grid;
    grid-template-columns: 1fr auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
}

.large-search input {
    border: 0;
    border-radius: 0;
}

.section-block {
    margin-bottom: 58px;
}

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

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

.section-heading a,
.text-link {
    color: var(--primary-dark);
    font-weight: 800;
}

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

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

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

.category-card img {
    position: absolute;
    inset: 0;
    transition: transform 0.3s ease;
}

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

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

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

.category-card strong {
    bottom: 18px;
    font-size: 13px;
    line-height: 1.45;
}

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

.ranking-panel,
.feature-panel,
.ranking-aside,
.story-card,
.category-overview-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.ranking-panel,
.feature-panel,
.ranking-aside,
.story-card {
    padding: 24px;
}

.feature-panel {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    background: linear-gradient(135deg, #ffffff, #e0f2fe);
}

.feature-panel h2 {
    margin: 18px 0 14px;
    font-size: 30px;
    line-height: 1.2;
}

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

.rank-row {
    display: grid;
    grid-template-columns: auto 58px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: #f8fafc;
    transition: transform 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
    transform: translateX(3px);
    background: #e0f2fe;
}

.rank-row img {
    width: 58px;
    height: 76px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-row-text {
    min-width: 0;
}

.rank-row-text strong,
.rank-row-text small {
    display: block;
}

.rank-row-text strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-row-text small {
    color: var(--muted);
    font-size: 12px;
}

.mini-rank {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: var(--primary);
    font-weight: 900;
    font-size: 12px;
}

.catalog-controls {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto;
    gap: 16px;
    align-items: end;
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
}

.catalog-controls label {
    display: grid;
    gap: 7px;
    color: #334155;
    font-weight: 800;
}

.select-row {
    display: flex;
    gap: 12px;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: #7dd3fc;
    box-shadow: 0 22px 45px rgba(14, 165, 233, 0.18);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #dbeafe;
}

.poster-link img {
    transition: transform 0.3s ease;
}

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

.poster-badge,
.poster-type,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(8px);
}

.poster-badge {
    left: 10px;
    top: 10px;
    background: rgba(2, 132, 199, 0.9);
}

.poster-type {
    right: 10px;
    bottom: 10px;
    background: rgba(15, 23, 42, 0.76);
}

.rank-badge {
    left: 10px;
    bottom: 10px;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

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

.movie-meta-line {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 800;
}

.movie-meta-line span + span::before {
    content: "·";
    margin-right: 8px;
    color: #94a3b8;
}

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

.movie-card-body h3 a:hover {
    color: var(--primary-dark);
}

.movie-card-body p {
    min-height: 50px;
    margin: 0 0 12px;
    font-size: 14px;
}

.hidden-by-filter {
    display: none !important;
}

.page-hero {
    margin-top: 28px;
    margin-bottom: 34px;
    padding: 46px;
    border-radius: 30px;
    background: linear-gradient(135deg, #ffffff, #dbeafe);
    box-shadow: var(--shadow);
}

.page-hero.slim h1 {
    font-size: clamp(34px, 5vw, 54px);
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    padding: 18px;
}

.overview-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    overflow: hidden;
    border-radius: 18px;
}

.overview-images img {
    aspect-ratio: 2 / 3;
}

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

.ranking-aside {
    position: sticky;
    top: 100px;
}

.scrollable {
    max-height: 1200px;
    overflow: auto;
    padding-right: 4px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 36px;
    background: #0f172a;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.28;
    filter: blur(4px);
}

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

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.92));
}

.detail-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 38px;
    align-items: center;
    padding: 54px 0;
    color: #ffffff;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 8px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #bae6fd;
    font-weight: 700;
}

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

.detail-meta span {
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.detail-copy p {
    color: #dbeafe;
    max-width: 850px;
}

.player-section {
    margin-top: -10px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.62));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 20px 45px rgba(14, 165, 233, 0.38);
    font-size: 32px;
}

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

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

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

.site-footer {
    margin-top: 70px;
    padding: 42px 0 24px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
}

.footer-inner p {
    max-width: 520px;
    color: #94a3b8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 18px;
}

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

.footer-bottom {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    color: #94a3b8;
}

@media (max-width: 1180px) {
    .movie-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

    .header-search {
        display: none;
    }
}

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

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

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

    .hero-slide,
    .home-search-panel,
    .split-layout,
    .ranking-layout,
    .detail-inner,
    .detail-content,
    .footer-inner,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .hero-slide {
        padding: 24px;
        gap: 24px;
    }

    .hero-image-wrap {
        max-width: 360px;
        margin: 0 auto;
        width: 100%;
    }

    .detail-inner {
        padding: 34px 0;
    }

    .detail-poster {
        width: min(310px, 80vw);
    }

    .ranking-aside {
        position: static;
    }

    .catalog-controls {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .header-inner {
        min-height: 66px;
    }

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

    .brand-text small {
        display: none;
    }

    .hero-carousel,
    .page-hero,
    .home-search-panel,
    .ranking-panel,
    .feature-panel,
    .ranking-aside,
    .story-card {
        border-radius: 20px;
    }

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

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

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

    .movie-grid,
    .ranking-grid,
    .related-grid,
    .category-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

    .select-row {
        flex-direction: column;
    }

    .large-search {
        grid-template-columns: 1fr;
        border-radius: 18px;
    }

    .large-search button {
        border-radius: 0;
    }

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

    .movie-card-body h3 {
        font-size: 16px;
    }

    .detail-meta span {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .ranking-grid,
    .related-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

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

    .hero-slide {
        padding: 18px;
    }

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