:root {
    --bg: #f7f9ff;
    --text: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --indigo: #4f46e5;
    --card: #ffffff;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.brand-icon,
.footer-brand span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--indigo));
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

.brand-text {
    font-size: 22px;
    background: linear-gradient(90deg, var(--blue), var(--indigo));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex: 1;
}

.nav-link {
    color: #374151;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--blue);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    border: 1px solid #dbe4f0;
    background: #ffffff;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.header-search input,
.mobile-search input {
    width: 220px;
    border: 0;
    outline: 0;
    padding: 10px 0 10px 16px;
    color: var(--text);
}

.header-search button,
.mobile-search button {
    border: 0;
    color: #ffffff;
    background: var(--blue);
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover {
    background: var(--blue-dark);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    color: var(--text);
    background: #eef4ff;
    border-radius: 12px;
    cursor: pointer;
}

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

.mobile-panel nav {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.hero-section {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 52%, #faf5ff 100%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image: radial-gradient(circle at 20px 20px, rgba(37, 99, 235, 0.12) 0, rgba(37, 99, 235, 0.12) 6px, transparent 7px);
    background-size: 58px 58px;
}

.hero-shell {
    position: relative;
    min-height: 620px;
    display: flex;
    align-items: center;
}

.hero-carousel {
    position: relative;
    width: 100%;
    min-height: 510px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.85fr);
    align-items: center;
    gap: 54px;
    opacity: 0;
    transform: translateY(18px);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.eyebrow {
    color: var(--blue);
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 12px 0 0;
    max-width: 700px;
    font-size: clamp(38px, 5vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-copy h2 {
    margin: 20px 0 12px;
    color: var(--blue);
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.15;
}

.hero-copy p {
    max-width: 680px;
    margin: 0;
    color: #334155;
    font-size: 18px;
}

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

.hero-tags span,
.tag-row span {
    color: #1d4ed8;
    background: #dbeafe;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 10px 22px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #ffffff;
    background: var(--blue);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.25);
}

.primary-btn:hover,
.section-more:hover {
    transform: translateY(-2px);
    background: var(--blue-dark);
}

.ghost-btn {
    color: var(--blue);
    border: 2px solid var(--blue);
    background: #ffffff;
}

.ghost-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.25);
    transform: perspective(900px) rotateY(-4deg);
    transition: transform 0.35s ease;
}

.hero-poster:hover {
    transform: perspective(900px) rotateY(0) translateY(-4px);
}

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

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent 58%);
}

.hero-poster strong {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 22px;
    z-index: 2;
    color: #ffffff;
    font-size: 26px;
}

.hero-play,
.play-dot {
    position: absolute;
    z-index: 3;
    display: grid;
    place-items: center;
    color: var(--blue);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
}

.hero-play {
    top: 50%;
    left: 50%;
    width: 76px;
    height: 76px;
    transform: translate(-50%, -50%);
    font-size: 30px;
}

.hero-dots {
    position: absolute;
    left: 0;
    bottom: 40px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 36px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: #c7d2fe;
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 58px;
    background: var(--blue);
}

.content-section {
    padding: 64px 0;
    background: #ffffff;
}

.content-section:nth-of-type(2n) {
    background: #f8fafc;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

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

.section-more {
    color: #ffffff;
    background: var(--blue);
}

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

.category-tile,
.category-card-large a {
    display: block;
    height: 100%;
    padding: 24px;
    border: 1px solid #dbeafe;
    background: linear-gradient(135deg, #eff6ff, #eef2ff);
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-tile strong,
.category-card-large h2 {
    display: block;
    margin: 0 0 8px;
    font-size: 22px;
}

.category-tile span,
.category-card-large p {
    color: var(--muted);
}

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

.movie-card {
    overflow: hidden;
    background: var(--card);
    border: 1px solid #eef2f7;
    border-radius: 22px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: #bfdbfe;
    box-shadow: var(--shadow);
}

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

.poster-wrap img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.play-dot {
    top: 50%;
    left: 50%;
    width: 52px;
    height: 52px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 4;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    border-radius: 12px;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(239, 68, 68, 0.3);
}

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

.movie-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 750;
}

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

.movie-card h3 a:hover {
    color: var(--blue);
}

.movie-card p {
    min-height: 48px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card.compact p {
    display: none;
}

.page-main {
    background: #ffffff;
}

.page-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 55%, #f8fafc 100%);
}

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

.small-hero h1 {
    margin: 8px 0 12px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.small-hero p {
    max-width: 820px;
    margin: 0;
    color: #334155;
    font-size: 18px;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    margin-bottom: 28px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 46px;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    background: #ffffff;
    outline: 0;
    padding: 0 14px;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.category-poster-stack {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.category-poster-stack img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

.category-card-large span {
    display: inline-flex;
    margin-top: 16px;
    color: var(--blue);
    font-weight: 800;
}

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

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

.ranking-row {
    display: grid;
    grid-template-columns: 48px 68px minmax(0, 1fr) auto 56px;
    gap: 14px;
    align-items: center;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.ranking-index {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: #ffffff;
    background: var(--blue);
    border-radius: 12px;
    font-weight: 900;
}

.ranking-row img {
    width: 68px;
    height: 88px;
    object-fit: cover;
    border-radius: 12px;
}

.ranking-title {
    min-width: 0;
    font-weight: 800;
}

.ranking-info {
    color: var(--muted);
    font-size: 14px;
}

.ranking-row strong {
    color: #f59e0b;
    font-size: 20px;
}

.ranking-note {
    position: sticky;
    top: 96px;
    padding: 24px;
    background: linear-gradient(135deg, #eff6ff, #eef2ff);
    border: 1px solid #dbeafe;
    border-radius: 22px;
}

.ranking-note h2 {
    margin-top: 0;
}

.ranking-note p {
    color: var(--muted);
}

.detail-main {
    background: #ffffff;
}

.detail-hero {
    padding: 56px 0;
    background: linear-gradient(135deg, #eff6ff, #eef2ff, #ffffff);
}

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

.detail-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--blue);
}

.detail-info h1 {
    margin: 14px 0 12px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-one-line {
    margin: 0 0 18px;
    color: #334155;
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.detail-meta span {
    color: var(--text);
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    padding: 7px 12px;
    font-weight: 750;
}

.large-tags {
    margin-bottom: 24px;
}

.player-section {
    padding: 48px 0;
    background: #0f172a;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000000;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

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

.player-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    color: #ffffff;
    border: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.player-layer span {
    display: grid;
    width: 84px;
    height: 84px;
    place-items: center;
    color: var(--blue);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    font-size: 34px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
}

.player-layer strong {
    display: block;
    font-size: clamp(22px, 3vw, 34px);
}

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

.detail-content {
    padding: 58px 0;
}

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

.detail-block,
.detail-side,
.prose-card {
    padding: 26px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.detail-block + .detail-block {
    margin-top: 20px;
}

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

.detail-block p,
.prose-card p {
    margin: 0;
    color: #334155;
    text-align: justify;
}

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

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

.detail-side dd {
    margin: 0 0 8px;
    font-weight: 700;
}

.prose-section {
    background: #f8fafc;
}

.prose-card {
    max-width: 900px;
}

.prose-card p + h2 {
    margin-top: 26px;
}

.inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.inline-links a {
    color: var(--blue);
    background: #dbeafe;
    border-radius: 999px;
    padding: 7px 13px;
    font-weight: 800;
}

.site-footer {
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #1f2937 52%, #111827);
}

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

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

.site-footer p {
    max-width: 520px;
    margin: 12px 0 0;
    color: #9ca3af;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
    color: #d1d5db;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    padding: 18px 16px;
    color: #9ca3af;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
    }

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

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

    .hero-section,
    .hero-shell {
        min-height: 820px;
    }

    .hero-carousel {
        min-height: 730px;
    }

    .hero-poster {
        transform: none;
    }

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

    .ranking-note {
        position: static;
    }
}

@media (max-width: 760px) {
    .shell {
        width: min(100% - 24px, 1180px);
    }

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

    .hero-section,
    .hero-shell {
        min-height: 820px;
    }

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

    .hero-slide {
        gap: 26px;
    }

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

    .hero-poster img {
        height: 360px;
    }

    .hero-dots {
        bottom: 22px;
    }

    .content-section {
        padding: 42px 0;
    }

    .section-head {
        display: block;
    }

    .section-more {
        margin-top: 16px;
    }

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

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

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

    .ranking-row {
        grid-template-columns: 36px 54px minmax(0, 1fr) 48px;
    }

    .ranking-info {
        display: none;
    }

    .ranking-row img {
        width: 54px;
        height: 72px;
    }

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

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

    .player-layer span {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}

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

    .hero-poster img {
        height: 300px;
    }
}
