:root {
    --bg: #f0f9ff;
    --surface: #ffffff;
    --surface-soft: #e0f2fe;
    --text: #0f172a;
    --muted: #64748b;
    --line: rgba(14, 116, 144, 0.16);
    --brand: #0284c7;
    --brand-strong: #0369a1;
    --cyan: #06b6d4;
    --shadow: 0 22px 60px rgba(2, 132, 199, 0.14);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 42%, #eef7ff 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

img,
video {
    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: 60;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(2, 132, 199, 0.08);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: #075985;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #38bdf8, #06b6d4 52%, #2563eb);
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.35);
}

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

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

.nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: #334155;
    font-weight: 650;
    transition: 180ms ease;
}

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

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

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

.mobile-nav {
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.mobile-nav-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 12px 0 18px;
    display: grid;
    gap: 8px;
}

.mobile-category-title {
    padding: 8px 14px 2px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.mobile-category-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.mobile-category-links a,
.mobile-nav .nav-link {
    display: block;
    padding: 10px 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.hero-section {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: linear-gradient(135deg, #075985, #0ea5e9, #67e8f9);
}

.hero-track {
    min-height: 620px;
    position: relative;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-position: center;
    background-size: cover;
    transition: opacity 600ms ease, transform 900ms ease;
    transform: scale(1.02);
}

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

.hero-slide::after,
.detail-hero::after,
.inner-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.28), transparent 30%),
        radial-gradient(circle at 78% 22%, rgba(34, 211, 238, 0.35), transparent 28%),
        linear-gradient(180deg, transparent 72%, rgba(240, 249, 255, 0.95) 100%);
    pointer-events: none;
}

.hero-grid {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
    gap: 56px;
    align-items: center;
    padding: 72px 0 96px;
    color: #ffffff;
}

.eyebrow {
    margin: 0 0 12px;
    color: #bae6fd;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.detail-copy h1,
.inner-hero h1 {
    margin: 0;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-summary,
.detail-one-line,
.inner-hero p {
    max-width: 760px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

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

.tag-row span {
    padding: 5px 9px;
    color: #0369a1;
    background: #e0f2fe;
}

.hero-actions,
.detail-actions,
.inner-hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.primary-button,
.ghost-button,
.home-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: 180ms ease;
}

.primary-button,
.home-search button {
    color: #075985;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(255, 255, 255, 0.2);
}

.primary-button:hover,
.home-search button:hover {
    transform: translateY(-2px) scale(1.01);
    background: #e0f2fe;
}

.ghost-button,
.inner-hero-links a {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.ghost-button:hover,
.inner-hero-links a:hover {
    background: rgba(255, 255, 255, 0.22);
}

.hero-poster,
.detail-poster {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    box-shadow: 0 34px 80px rgba(3, 105, 161, 0.36);
    transform: rotate(2deg);
}

.hero-poster::before,
.detail-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: inherit;
    z-index: 2;
    pointer-events: none;
}

.hero-poster img,
.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4.15;
    object-fit: cover;
    background: linear-gradient(135deg, #bae6fd, #e0f2fe);
}

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

.hero-arrow,
.hero-dot {
    border: 0;
    color: #075985;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 12px 28px rgba(2, 132, 199, 0.16);
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    font-size: 32px;
    line-height: 1;
}

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

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

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

.home-search-card {
    position: relative;
    z-index: 5;
    margin-top: -44px;
    padding: 26px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
    gap: 24px;
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.home-search-card h2 {
    margin: 0 0 6px;
    font-size: 28px;
}

.home-search-card p {
    margin: 0;
    color: var(--muted);
}

.home-search {
    display: flex;
    gap: 10px;
    padding: 8px;
    background: #f0f9ff;
    border-radius: 999px;
    border: 1px solid var(--line);
}

.home-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 0 12px;
}

.home-search button {
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
}

.page-section {
    padding: 64px 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 3vw, 38px);
    letter-spacing: -0.04em;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more,
.text-link {
    color: var(--brand-strong);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--surface);
    border: 1px solid rgba(14, 116, 144, 0.12);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    transition: 190ms ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(2, 132, 199, 0.16);
}

.card-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #e0f2fe;
}

.card-poster img {
    width: 100%;
    aspect-ratio: 3 / 4.1;
    object-fit: cover;
    transition: 240ms ease;
}

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

.poster-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 132, 199, 0.88);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 16px;
}

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

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

.small-card .card-body h2 {
    font-size: 17px;
}

.card-body h2 a:hover,
.rank-content h2 a:hover,
.category-overview-card h2 a:hover {
    color: var(--brand-strong);
}

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

.small-card .card-body p {
    min-height: 58px;
    font-size: 13px;
}

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

.category-tile {
    position: relative;
    min-height: 178px;
    padding: 20px;
    overflow: hidden;
    border-radius: 24px;
    color: #075985;
    background:
        radial-gradient(circle at 100% 0%, rgba(14, 165, 233, 0.28), transparent 38%),
        linear-gradient(135deg, #ffffff, #e0f2fe);
    border: 1px solid var(--line);
    box-shadow: 0 16px 42px rgba(2, 132, 199, 0.1);
    transition: 180ms ease;
}

.category-tile:hover {
    transform: translateY(-5px);
}

.category-tile span,
.category-tile strong {
    display: block;
}

.category-tile span {
    font-size: 22px;
    font-weight: 850;
}

.category-tile strong {
    margin-top: 8px;
    color: var(--brand);
}

.category-tile p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 14px;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 56px 92px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.rank-index {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #075985;
    background: #e0f2fe;
    font-size: 18px;
    font-weight: 900;
}

.rank-item.top .rank-index {
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #facc15);
}

.rank-thumb {
    overflow: hidden;
    border-radius: 14px;
    background: #e0f2fe;
}

.rank-thumb img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.rank-content h2 {
    margin: 0 0 6px;
    font-size: 18px;
}

.rank-content p {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 14px;
}

.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #0369a1;
    font-size: 12px;
    font-weight: 800;
}

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

.inner-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #075985, #0ea5e9, #67e8f9);
}

.inner-hero .container {
    position: relative;
    z-index: 2;
    padding: 88px 0 72px;
}

.inner-hero h1 {
    max-width: 900px;
}

.inner-hero p {
    max-width: 860px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 160px 160px 180px auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--line);
    box-shadow: 0 12px 34px rgba(2, 132, 199, 0.08);
}

.search-box {
    position: relative;
}

.search-box input,
.filter-select {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: 0;
    background: #ffffff;
    color: var(--text);
}

.search-box input {
    padding: 0 44px 0 18px;
}

.search-box span {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--brand);
    font-weight: 900;
}

.filter-select {
    padding: 0 16px;
}

.result-count {
    color: var(--brand-strong);
    white-space: nowrap;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.category-cover-stack {
    position: relative;
    min-height: 172px;
}

.category-cover-stack img {
    position: absolute;
    width: 92px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 16px;
    border: 4px solid #ffffff;
    background: #e0f2fe;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
}

.category-cover-stack img:nth-child(1) {
    left: 0;
    top: 4px;
    z-index: 3;
}

.category-cover-stack img:nth-child(2) {
    left: 34px;
    top: 20px;
    z-index: 2;
}

.category-cover-stack img:nth-child(3) {
    left: 66px;
    top: 36px;
    z-index: 1;
}

.category-overview-card h2 {
    margin: 0 0 8px;
    font-size: 26px;
}

.category-overview-card p {
    margin: 0 0 14px;
    color: var(--muted);
}

.category-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.category-stats span {
    padding: 5px 10px;
    border-radius: 999px;
    color: #0369a1;
    background: #e0f2fe;
    font-size: 12px;
    font-weight: 800;
}

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

.detail-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 48px;
    align-items: center;
    padding: 76px 0;
}

.detail-poster {
    transform: none;
}

.breadcrumb {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 800;
}

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

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: #ffffff;
    border: 0;
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.3), rgba(2, 6, 23, 0.62));
    cursor: pointer;
    transition: 180ms ease;
}

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

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    border-radius: 999px;
    color: #075985;
    background: #ffffff;
    box-shadow: 0 16px 42px rgba(255, 255, 255, 0.2);
    font-size: 36px;
}

.play-copy {
    font-size: 22px;
    font-weight: 900;
}

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

.detail-article,
.detail-side-card {
    padding: 26px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.07);
}

.detail-article h2,
.detail-side-card h2 {
    margin: 0 0 14px;
    font-size: 25px;
}

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

.detail-side-card dl {
    margin: 0;
    display: grid;
    gap: 12px;
}

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

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

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

.site-footer {
    margin-top: 56px;
    color: #dbeafe;
    background: linear-gradient(180deg, #1e293b, #0f172a);
}

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

.footer-brand {
    color: #ffffff;
    margin-bottom: 14px;
}

.site-footer p {
    max-width: 520px;
    color: #bfdbfe;
}

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

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links.two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer-links a {
    color: #dbeafe;
}

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

.is-filtered-out {
    display: none !important;
}

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

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

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

    .result-count {
        grid-column: 1 / -1;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .brand-text {
        font-size: 15px;
        white-space: normal;
    }

    .hero-grid,
    .detail-hero-grid,
    .home-search-card,
    .detail-content-grid,
    .footer-grid,
    .category-overview-grid,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .hero-grid {
        gap: 28px;
        padding: 54px 0 92px;
    }

    .hero-poster {
        max-width: 280px;
        justify-self: center;
    }

    .home-rank {
        grid-template-columns: 1fr;
    }

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

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

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

    .rank-item {
        grid-template-columns: 44px 72px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-index {
        width: 38px;
        height: 38px;
    }

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

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

    .header-inner {
        min-height: 64px;
    }

    .hero-section,
    .hero-track {
        min-height: 650px;
    }

    .hero-copy h1,
    .detail-copy h1,
    .inner-hero h1 {
        font-size: 38px;
    }

    .hero-summary,
    .detail-one-line,
    .inner-hero p {
        font-size: 16px;
    }

    .home-search {
        border-radius: 22px;
        flex-direction: column;
    }

    .home-search input {
        min-height: 42px;
    }

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

    .category-overview-card {
        gap: 8px;
    }

    .category-cover-stack {
        min-height: 154px;
    }

    .card-body p {
        min-height: auto;
    }

    .detail-hero-grid {
        padding: 52px 0;
    }

    .player-shell {
        border-radius: 18px;
    }

    .play-icon {
        width: 66px;
        height: 66px;
        font-size: 28px;
    }

    .footer-links.two-column {
        grid-template-columns: 1fr;
    }
}
