:root {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --accent: #2563eb;
    --ink: #0f172a;
    --text: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --soft: #f8fafc;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.96), rgba(37, 99, 235, 0.96));
    box-shadow: 0 12px 30px rgba(14, 116, 144, 0.22);
    backdrop-filter: blur(16px);
}

.nav-shell {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 68px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: #ffffff;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    color: var(--primary);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(14, 165, 233, 0.28);
}

.brand-text {
    font-size: 22px;
    letter-spacing: 0.04em;
}

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

.nav-link {
    padding: 8px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.88);
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.nav-search {
    display: flex;
    width: 280px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.nav-search input,
.quick-search-panel input,
.inline-filter input,
.large-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: #ffffff;
}

.nav-search input {
    padding: 10px 14px;
    border-radius: 999px 0 0 999px;
}

.nav-search button,
.quick-search-panel button,
.inline-filter button,
.large-search button {
    border: 0;
    color: #ffffff;
    background: var(--primary-dark);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-search button {
    padding: 0 16px;
}

.nav-search button:hover,
.quick-search-panel button:hover,
.inline-filter button:hover,
.large-search button:hover {
    background: #0369a1;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
}

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

.hero {
    position: relative;
    height: clamp(520px, 66vw, 650px);
    overflow: hidden;
    background: #082f49;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
    transform: scale(1.04);
}

.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(15, 23, 42, 0.68) 42%, rgba(14, 165, 233, 0.34) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    gap: 58px;
    align-items: center;
    height: 100%;
    color: #ffffff;
}

.hero-copy {
    max-width: 760px;
}

.hero-kicker,
.detail-meta,
.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hero-kicker span {
    padding: 6px 12px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 660px;
    margin: 0 0 28px;
    color: #dbeafe;
    font-size: 19px;
}

.hero-actions,
.detail-title-line,
.section-heading,
.prev-next-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 700;
    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 16px 34px rgba(37, 99, 235, 0.32);
}

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

.hero-poster {
    display: block;
    overflow: hidden;
    border-radius: 32px;
    transform: rotate(2deg);
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.48);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 4;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.quick-search-panel {
    position: relative;
    z-index: 8;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    margin-top: -34px;
    padding: 22px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.quick-search-panel form,
.inline-filter,
.large-search {
    display: flex;
    overflow: hidden;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #ffffff;
}

.quick-search-panel input,
.inline-filter input,
.large-search input {
    padding: 14px 18px;
}

.quick-search-panel button,
.inline-filter button,
.large-search button {
    padding: 0 22px;
}

.quick-links,
.footer-links,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-links a,
.tag-cloud a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--primary-dark);
    background: #e0f2fe;
    font-weight: 700;
}

.section-block,
.page-shell {
    padding: 58px 0;
}

.section-heading {
    margin-bottom: 24px;
}

.section-heading p,
.eyebrow {
    margin: 0 0 4px;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-heading h2,
.page-hero h1,
.highlight-band h2,
.detail-content h1 {
    margin: 0;
    color: var(--ink);
    line-height: 1.16;
}

.section-heading h2 {
    font-size: clamp(28px, 4vw, 40px);
}

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

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

.movie-card,
.category-overview-card,
.ranking-hero-card,
.side-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover,
.category-overview-card:hover,
.ranking-hero-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #dbeafe;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4.2;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.poster-badge,
.poster-type,
.poster-play {
    position: absolute;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.66);
    backdrop-filter: blur(8px);
}

.poster-badge,
.poster-type {
    top: 12px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
}

.poster-badge {
    left: 12px;
}

.poster-type {
    right: 12px;
}

.poster-play {
    left: 50%;
    top: 50%;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.movie-meta-line {
    color: var(--muted);
    font-size: 13px;
}

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

.movie-card h2,
.compact-card h2,
.side-card h2,
.ranking-hero-card h2,
.category-overview-card h2 {
    margin: 10px 0 8px;
    color: var(--ink);
    font-size: 18px;
    line-height: 1.3;
}

.movie-card p,
.compact-card p,
.side-card p,
.category-overview-card p,
.ranking-hero-card p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.card-tags span,
.detail-tags span {
    padding: 4px 8px;
    border-radius: 999px;
    color: #0369a1;
    background: #e0f2fe;
    font-size: 12px;
    font-weight: 700;
}

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

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

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
    transition: transform 0.4s ease;
}

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

.category-tile span,
.category-tile p {
    position: relative;
    z-index: 2;
    display: block;
    margin: 0 18px;
}

.category-tile span {
    margin-top: 92px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile p {
    color: #e0f2fe;
}

.highlight-band {
    padding: 64px 0;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #075985 48%, #0284c7);
}

.highlight-band h2 {
    color: #ffffff;
    font-size: clamp(32px, 5vw, 52px);
}

.highlight-band p {
    color: #dbeafe;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 36px;
    align-items: center;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
}

.highlight-band .compact-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
}

.highlight-band .compact-card h2,
.highlight-band .compact-card p {
    color: #ffffff;
}

.compact-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 14px;
}

.compact-poster img {
    width: 88px;
    height: 118px;
    object-fit: cover;
}

.rank-num {
    position: absolute;
    left: 6px;
    top: 6px;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 10px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-weight: 900;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 34px;
    padding: 46px;
    border-radius: 32px;
    background: linear-gradient(135deg, #e0f2fe, #ffffff 55%, #dbeafe);
    box-shadow: 0 20px 50px rgba(14, 165, 233, 0.12);
}

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

.page-hero p {
    max-width: 720px;
    color: var(--muted);
    font-size: 18px;
}

.inline-filter,
.large-search {
    max-width: 680px;
    margin-top: 20px;
}

.filter-panel {
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chips button {
    border: 0;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--text);
    background: #f1f5f9;
    cursor: pointer;
}

.filter-chips button.active,
.filter-chips button:hover {
    color: #ffffff;
    background: var(--primary-dark);
}

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

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

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

.category-covers img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    object-fit: cover;
}

.ranking-top-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-bottom: 28px;
}

.ranking-hero-card a {
    position: relative;
    display: block;
}

.ranking-hero-card img {
    width: 100%;
    aspect-ratio: 16 / 11;
    object-fit: cover;
}

.ranking-hero-card span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-size: 28px;
    font-weight: 900;
}

.ranking-hero-card h2,
.ranking-hero-card p {
    padding: 0 18px;
}

.ranking-hero-card p {
    padding-bottom: 18px;
}

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

.detail-shell {
    padding-top: 28px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 12px 0 22px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--primary-dark);
    font-weight: 700;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
}

.player-card,
.detail-content {
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.player-card {
    overflow: hidden;
}

.video-frame {
    position: relative;
    background: #020617;
}

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

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.55));
    cursor: pointer;
}

.play-layer.is-hidden {
    display: none;
}

.play-layer span {
    display: grid;
    width: 84px;
    height: 84px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 24px 60px rgba(14, 165, 233, 0.38);
    font-size: 34px;
}

.detail-content {
    margin-top: 22px;
    padding: 30px;
}

.detail-content h1 {
    font-size: clamp(32px, 5vw, 54px);
}

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

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #0369a1;
    background: #e0f2fe;
    font-weight: 700;
}

.lead-text {
    padding: 18px;
    border-left: 4px solid var(--primary);
    border-radius: 16px;
    background: #f0f9ff;
    color: var(--ink);
    font-size: 18px;
}

.detail-content h2 {
    margin: 28px 0 10px;
    color: var(--ink);
}

.prev-next-links {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.prev-next-links a {
    color: var(--primary-dark);
    font-weight: 800;
}

.detail-side {
    display: grid;
    align-content: start;
    gap: 20px;
}

.side-card {
    padding: 18px;
}

.side-card > img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 18px;
    object-fit: cover;
}

.related-side .compact-card {
    grid-template-columns: 74px minmax(0, 1fr);
    padding: 8px 0;
    box-shadow: none;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
}

.related-side .compact-poster img {
    width: 74px;
    height: 98px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
    gap: 34px;
}

.footer-brand {
    margin-bottom: 12px;
    font-size: 24px;
}

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

.footer-links a {
    width: 100%;
    color: #e0f2fe;
}

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

@media (max-width: 980px) {
    .nav-shell {
        flex-wrap: wrap;
        padding: 10px 0;
    }

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

    .nav-links,
    .nav-search {
        display: none;
        width: 100%;
    }

    .nav-links.open,
    .nav-search.open {
        display: flex;
    }

    .nav-links.open {
        flex-direction: column;
        align-items: stretch;
    }

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

    .hero-content {
        gap: 24px;
        padding: 72px 0;
    }

    .hero-poster {
        display: none;
    }

    .movie-grid,
    .category-grid,
    .ranking-top-grid,
    .ranking-list,
    .category-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .hero {
        height: 560px;
    }

    .hero p {
        font-size: 16px;
    }

    .quick-search-panel,
    .category-overview-card,
    .detail-title-line,
    .prev-next-links {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .quick-search-panel {
        display: grid;
    }

    .movie-grid,
    .category-grid,
    .ranking-top-grid,
    .ranking-list,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .page-hero,
    .detail-content {
        padding: 24px;
        border-radius: 24px;
    }

    .hero-arrow {
        display: none;
    }
}
