:root {
    color-scheme: light;
    --primary: #0f766e;
    --primary-light: #14b8a6;
    --accent: #06b6d4;
    --blue: #2563eb;
    --ink: #111827;
    --muted: #64748b;
    --soft: #f1f5f9;
    --line: #e2e8f0;
    --dark: #0f172a;
    --radius: 22px;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #f8fafc;
    color: var(--ink);
}

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

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

.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(18px);
}

.nav-wrap {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 10px 28px rgba(20, 184, 166, 0.35);
    font-size: 14px;
}

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

.nav-links a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #334155;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary);
    background: #ecfeff;
}

.menu-button {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 10px 12px;
    background: #e0f2fe;
    color: #0f172a;
    font-size: 20px;
}

.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 42%, #06b6d4 100%);
}

.hero-pattern,
.page-hero::before {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    content: "";
    background-image: radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.35), transparent 28%), radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.22), transparent 26%), linear-gradient(45deg, rgba(255, 255, 255, 0.12) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.12) 75%, transparent 75%, transparent);
    background-size: auto, auto, 60px 60px;
}

.hero-inner {
    position: relative;
    width: min(1200px, calc(100% - 32px));
    min-height: 680px;
    margin: 0 auto;
    padding: 70px 0 52px;
}

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

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

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

.eyebrow {
    margin: 0 0 12px;
    color: #ccfbf1;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 13px;
}

.eyebrow.dark {
    color: var(--primary);
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-subtitle,
.page-hero p,
.detail-one-line {
    margin: 22px 0;
    max-width: 720px;
    color: #ecfeff;
    font-size: clamp(18px, 2.4vw, 23px);
    line-height: 1.8;
}

.hero-tags span,
.tag-list span,
.detail-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.1);
    color: #0f766e;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.tag-list,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    background: #fff;
    color: #0f766e;
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.18);
}

.btn.primary.invert {
    color: var(--blue);
}

.btn.ghost {
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.78);
}

.hero-poster {
    display: block;
    transform: rotate(2deg);
}

.image-frame {
    position: relative;
    overflow: hidden;
    display: block;
    background: linear-gradient(135deg, #0f172a, #0f766e, #06b6d4);
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.2s ease;
}

.image-frame.no-image img {
    opacity: 0;
}

.image-frame.no-image::after {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    color: #fff;
    text-align: center;
    font-weight: 800;
    line-height: 1.5;
    content: attr(data-title);
}

.hero-image {
    height: 480px;
    border-radius: 32px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.34);
}

.hero-dots {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 8px;
    margin-top: 18px;
}

.hero-dots button {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

.hero-dots button.active {
    width: 54px;
    background: #fff;
}

.hero-panel {
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.hero-panel a {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    font-weight: 800;
}

.section {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0;
}

.section.white {
    background: transparent;
}

.section.soft {
    width: 100%;
    padding-left: max(16px, calc((100% - 1200px) / 2));
    padding-right: max(16px, calc((100% - 1200px) / 2));
    background: #f1f5f9;
}

.section.dark {
    width: 100%;
    padding-left: max(16px, calc((100% - 1200px) / 2));
    padding-right: max(16px, calc((100% - 1200px) / 2));
    background: linear-gradient(135deg, #111827, #0f172a);
    color: #fff;
}

.section.dark.flat {
    background: #0f172a;
}

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

.section-head h2,
.detail-section h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(26px, 3.2vw, 42px);
    line-height: 1.12;
}

.section-head.light h2,
.section.dark .section-head h2,
.section.dark .section-head p {
    color: #fff;
}

.text-link {
    color: var(--primary);
    font-weight: 800;
}

.text-link.light {
    color: #a5f3fc;
}

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

.movie-grid.dense {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

.poster-link .image-frame {
    aspect-ratio: 3 / 4;
}

.card-body {
    padding: 18px;
}

.meta-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.meta-line a {
    color: var(--primary);
}

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

.movie-card p {
    min-height: 64px;
    margin: 0 0 14px;
    color: #475569;
    line-height: 1.65;
    font-size: 14px;
}

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

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

.category-pill,
.category-card {
    display: block;
    padding: 22px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-pill span,
.category-card-title {
    display: block;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 19px;
    font-weight: 900;
}

.category-pill small,
.category-card p {
    color: #64748b;
    line-height: 1.7;
}

.mini-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.mini-links a {
    padding: 9px 12px;
    border-radius: 12px;
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 118px 1fr;
    gap: 16px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.rank-poster {
    position: relative;
}

.rank-poster .image-frame {
    aspect-ratio: 3 / 4;
    border-radius: 16px;
}

.rank-poster strong {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #fff;
    color: #0f766e;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.rank-card p,
.rank-card span {
    color: #cbd5e1;
    line-height: 1.6;
}

.rank-card h3 {
    margin: 8px 0;
    color: #fff;
    font-size: 18px;
}

.cta-band,
.page-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.cta-band {
    margin: 0 auto 72px;
    width: min(1200px, calc(100% - 32px));
    padding: 58px 32px;
    border-radius: 34px;
    text-align: center;
}

.cta-band h2 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 46px);
}

.cta-band p {
    margin: 0 0 24px;
    color: #e0f2fe;
    font-size: 18px;
}

.page-hero.compact {
    min-height: 290px;
    display: flex;
    align-items: center;
    padding: 68px max(16px, calc((100% - 1200px) / 2));
}

.page-hero > div {
    position: relative;
    z-index: 1;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 14px;
    margin-bottom: 28px;
}

.filter-bar.wide {
    grid-template-columns: minmax(0, 1fr) 220px 190px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.search-box input,
.filter-bar select {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #0f172a;
    font-size: 15px;
}

.filter-bar select {
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.empty-state {
    margin-top: 28px;
    padding: 32px;
    border-radius: 22px;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
    font-weight: 700;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 62px minmax(180px, 1fr) 80px 120px minmax(260px, 1.3fr);
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #dbeafe;
}

.rank-number {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #fff;
    color: var(--primary);
    font-weight: 900;
}

.rank-row-title {
    color: #fff;
    font-weight: 900;
}

.rank-row p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.5;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: #0f172a;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.1);
}

.detail-layout {
    position: relative;
    z-index: 1;
    width: min(1200px, calc(100% - 32px));
    min-height: 610px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 44px;
    align-items: center;
    padding: 72px 0;
}

.detail-poster {
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

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

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

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #e0f2fe;
    font-weight: 700;
}

.detail-section {
    padding-top: 52px;
    padding-bottom: 52px;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
}

.detail-section article,
.detail-section aside,
.review-box {
    padding: 28px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.detail-section article p,
.review-box p {
    color: #334155;
    font-size: 17px;
    line-height: 2;
}

.lead-text {
    color: #0f766e !important;
    font-weight: 800;
}

.info-list {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px 16px;
    margin: 22px 0;
}

.info-list dt {
    color: #64748b;
    font-weight: 800;
}

.info-list dd {
    margin: 0;
    color: #0f172a;
}

.player {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 22px 56px rgba(15, 23, 42, 0.22);
    aspect-ratio: 16 / 9;
}

.player video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
}

.play-mask {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.24), rgba(2, 6, 23, 0.68));
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.play-mask span {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: var(--primary);
    font-size: 32px;
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.32);
}

.player.playing .play-mask {
    opacity: 0;
    pointer-events: none;
}

.player-message {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.88);
    color: #fff;
    text-align: center;
}

.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 56px max(16px, calc((100% - 1200px) / 2)) 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
}

.footer-brand {
    color: #fff;
}

.site-footer p {
    color: #94a3b8;
    line-height: 1.8;
}

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

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 9px 0;
    color: #cbd5e1;
}

.site-footer a:hover {
    color: #67e8f9;
}

.copyright {
    margin-top: 36px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #64748b;
}

[hidden] {
    display: none !important;
}

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

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

    .hero-slide,
    .detail-layout,
    .two-column {
        grid-template-columns: 1fr;
    }

    .hero-slider {
        min-height: 820px;
    }

    .hero-image {
        height: 360px;
    }

    .detail-layout {
        padding-top: 42px;
    }

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

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

    .rank-row {
        grid-template-columns: 56px 1fr 80px;
    }

    .rank-row span:nth-of-type(2),
    .rank-row p {
        grid-column: 2 / -1;
    }
}

@media (max-width: 760px) {
    .nav-wrap {
        height: 64px;
    }

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

    .nav-links {
        position: absolute;
        top: 64px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 18px;
        background: #fff;
        box-shadow: var(--shadow);
    }

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

    .hero-inner {
        min-height: 760px;
        padding-top: 42px;
    }

    .hero-slider {
        min-height: 640px;
    }

    .hero-slide {
        gap: 24px;
    }

    .hero-image {
        height: 300px;
        border-radius: 24px;
    }

    .hero-panel,
    .category-grid,
    .category-grid.large,
    .movie-grid,
    .movie-grid.dense,
    .footer-grid,
    .filter-bar,
    .filter-bar.wide {
        grid-template-columns: 1fr;
    }

    .section,
    .section.soft,
    .section.dark {
        padding-top: 48px;
        padding-bottom: 48px;
    }

    .section-head {
        display: block;
    }

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

    .rank-card {
        grid-template-columns: 92px 1fr;
    }

    .detail-layout {
        min-height: auto;
    }

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

    .play-mask span {
        width: 66px;
        height: 66px;
        font-size: 24px;
    }
}
