:root {
    color-scheme: light;
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-strong: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #14b8a6;
    --brand-dark: #0f766e;
    --brand-soft: rgba(20, 184, 166, 0.14);
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

button,
input {
    font: inherit;
}

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

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

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

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

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(20, 184, 166, 0.3);
}

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

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #334155;
    font-weight: 700;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

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

.header-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 10px 14px;
    background: transparent;
}

.header-search button {
    border: 0;
    padding: 10px 16px;
    background: var(--brand);
    color: #ffffff;
    font-weight: 800;
}

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

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: #0f172a;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.mobile-nav.open {
    display: grid;
}

.hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: linear-gradient(120deg, #0f172a, #0f766e);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.2s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.hero-image {
    position: absolute;
    inset: 0;
    filter: saturate(1.1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 10%, rgba(20, 184, 166, 0.35), transparent 32%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.78) 42%, rgba(15, 23, 42, 0.18) 100%);
}

.hero-content {
    position: relative;
    z-index: 3;
    width: min(1180px, calc(100% - 32px));
    min-height: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 1180px;
    color: #ffffff;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border-radius: 999px;
    background: var(--brand);
    color: #ffffff;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.section-kicker {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.hero h1 {
    max-width: 780px;
    margin: 20px 0 16px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero-one-line {
    max-width: 700px;
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 800;
}

.hero-summary {
    max-width: 680px;
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 16px;
    line-height: 1.8;
}

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

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

.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.07);
    color: #334155;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags .tag,
.large-tags .tag {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.button.primary {
    background: var(--brand);
    color: #ffffff;
    box-shadow: 0 16px 32px rgba(20, 184, 166, 0.32);
}

.button.ghost {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.button.ghost.dark {
    background: #ffffff;
    color: #0f172a;
    border-color: var(--line);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.38);
    color: #ffffff;
    font-size: 34px;
    line-height: 1;
    backdrop-filter: blur(8px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.hero-search {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: 78px;
    width: min(520px, calc(100% - 32px));
    display: flex;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
    transform: translateX(-50%);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 15px 18px;
    background: transparent;
}

.hero-search button {
    border: 0;
    padding: 0 22px;
    background: var(--brand);
    color: #ffffff;
    font-weight: 900;
}

.section {
    padding: 54px 0;
}

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

.section-heading.compact {
    margin-bottom: 18px;
}

.section-heading h2 {
    margin-top: 10px;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.section-more {
    color: var(--brand-dark);
    font-weight: 900;
}

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #0f766e);
}

.movie-cover img,
.category-card img,
.ranking-cover img,
.detail-poster img {
    transition: transform 0.35s ease;
}

.movie-card:hover .movie-cover img,
.category-card:hover img,
.ranking-card:hover img,
.detail-poster:hover img {
    transform: scale(1.06);
}

.movie-badge,
.movie-year {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 900;
}

.movie-badge {
    top: 10px;
    left: 10px;
    background: var(--brand);
    color: #ffffff;
}

.movie-year {
    right: 10px;
    bottom: 10px;
    background: rgba(15, 23, 42, 0.76);
    color: #ffffff;
}

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

.movie-card h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 900;
}

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

.movie-meta {
    margin: 8px 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.movie-desc {
    display: -webkit-box;
    min-height: 42px;
    overflow: hidden;
    color: #475569;
    font-size: 13px;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-card .tag-row {
    margin-top: 12px;
}

.muted-panel {
    width: min(1180px, calc(100% - 32px));
    margin: 10px auto;
    padding: 34px;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.09), rgba(59, 130, 246, 0.08));
}

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

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

.category-card {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 24px;
    padding: 20px;
    background: #0f172a;
    color: #ffffff;
    box-shadow: var(--shadow);
}

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

.category-card img {
    position: absolute;
    inset: 0;
    opacity: 0.76;
}

.category-card span,
.category-card strong {
    position: relative;
    z-index: 2;
}

.category-card span {
    font-size: 24px;
    font-weight: 950;
}

.category-card strong {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    line-height: 1.6;
}

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

.ranking-panel {
    position: sticky;
    top: 94px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #ffffff;
    padding: 22px;
    box-shadow: var(--shadow);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 4px 10px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.rank-item:hover {
    background: var(--brand-soft);
}

.rank-number {
    grid-row: span 2;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #0f172a;
    color: #ffffff;
    font-weight: 950;
}

.rank-title {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 900;
}

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

.horizontal-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(180px, 1fr);
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
}

.horizontal-strip .movie-card {
    scroll-snap-align: start;
}

.page-main {
    min-height: 70vh;
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto 0;
    padding: 48px;
    border-radius: 32px;
    background:
        radial-gradient(circle at 88% 8%, rgba(20, 184, 166, 0.32), transparent 30%),
        linear-gradient(135deg, #0f172a, #164e63);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.page-hero .section-kicker {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.page-hero h1 {
    margin: 18px 0 10px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.06;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 17px;
    line-height: 1.8;
}

.local-filter,
.search-box-large {
    display: flex;
    max-width: 560px;
    margin-top: 24px;
    overflow: hidden;
    border-radius: 999px;
    background: #ffffff;
}

.local-filter input,
.search-box-large input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 15px 18px;
}

.search-box-large button {
    border: 0;
    padding: 0 20px;
    background: var(--brand);
    color: #ffffff;
    font-weight: 900;
}

.search-status {
    margin-bottom: 18px;
    color: var(--muted);
    font-weight: 800;
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 18px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    padding: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.ranking-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, #0f172a, #0f766e);
}

.ranking-cover span {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--brand);
    color: #ffffff;
    font-weight: 950;
}

.ranking-card h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 950;
}

.ranking-card p {
    color: #475569;
    line-height: 1.7;
}

.breadcrumb {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

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

.detail-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 34px;
    align-items: stretch;
    border-radius: 34px;
    padding: 30px;
    background:
        radial-gradient(circle at 90% 0%, rgba(20, 184, 166, 0.22), transparent 30%),
        linear-gradient(135deg, #111827, #0f172a);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    min-height: 430px;
    border-radius: 26px;
    background: linear-gradient(135deg, #0f172a, #0f766e);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.34);
}

.detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-info h1 {
    margin: 18px 0 14px;
    font-size: clamp(38px, 5vw, 72px);
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.detail-one-line {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 22px;
    line-height: 1.55;
    font-weight: 800;
}

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

.detail-meta span {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.11);
    padding: 8px 12px;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 800;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #020617;
}

.player-start {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    border: 0;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.28), rgba(2, 6, 23, 0.56));
    color: #ffffff;
}

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

.player-start span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--brand);
    box-shadow: 0 18px 40px rgba(20, 184, 166, 0.38);
    font-size: 34px;
}

.player-start strong {
    font-size: 20px;
}

.player-message {
    min-height: 24px;
    margin-top: 12px;
    color: var(--muted);
    font-weight: 700;
}

.prose-panel {
    margin-top: 36px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #ffffff;
    padding: 34px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.prose-panel h2 {
    margin: 0 0 14px;
    font-size: 28px;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.prose-panel h2:not(:first-child) {
    margin-top: 28px;
}

.prose-panel p {
    color: #334155;
    font-size: 17px;
    line-height: 1.95;
}

.site-footer {
    margin-top: 50px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
}

.footer-brand {
    color: var(--text);
    font-size: 22px;
}

.footer-inner p {
    max-width: 560px;
    margin: 10px 0 0;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    gap: 14px;
    font-weight: 800;
}

.footer-links a:hover {
    color: var(--brand-dark);
}

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

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

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

    .ranking-panel {
        position: static;
    }

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

    .detail-hero {
        grid-template-columns: 260px 1fr;
    }
}

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

    .desktop-nav,
    .header-search {
        display: none;
    }

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

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

    .hero,
    .hero-content {
        min-height: 620px;
    }

    .hero-control {
        display: none;
    }

    .hero-search {
        bottom: 58px;
    }

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

    .section {
        padding: 36px 0;
    }

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

    .muted-panel {
        padding: 22px;
    }

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

    .page-hero {
        padding: 30px 22px;
    }

    .detail-hero {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .detail-poster {
        min-height: auto;
        aspect-ratio: 3 / 4;
    }

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

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

    .footer-inner {
        flex-direction: column;
    }
}

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

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

    .movie-desc,
    .movie-card .tag-row {
        display: none;
    }

    .hero h1 {
        font-size: 40px;
    }

    .hero-summary {
        display: none;
    }

    .hero-search {
        display: none;
    }

    .player-start span {
        width: 70px;
        height: 70px;
    }
}
