:root {
    color-scheme: light;
    --cyan: #0891b2;
    --cyan-dark: #0e7490;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --slate: #0f172a;
    --slate-soft: #1e293b;
    --text: #1f2937;
    --muted: #64748b;
    --border: #e2e8f0;
    --surface: #ffffff;
    --soft: #f8fafc;
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #f0f9ff 0%, #f8fafc 420px, #ffffff 100%);
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #0891b2, #2563eb 55%, #1d4ed8);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.22);
}

.header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark,
.footer-logo span {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

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

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

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

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

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input {
    width: 230px;
    padding: 10px 16px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    outline: none;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
    color: rgba(255, 255, 255, 0.68);
}

.header-search button,
.mobile-search button,
.primary-button,
.ghost-button,
.text-button,
.search-panel button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button {
    padding: 10px 16px;
    color: #0f172a;
    background: #ffffff;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.mobile-nav.is-open {
    display: block;
}

.mobile-nav-inner {
    display: grid;
    gap: 10px;
    padding: 16px 0 20px;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.35), transparent 34%), linear-gradient(135deg, #0f172a 0%, #0e7490 52%, #1d4ed8 100%);
}

.hero-stage {
    position: relative;
    min-height: 620px;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    align-items: center;
    gap: 56px;
    opacity: 0;
    transform: translateX(28px);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 7px 13px;
    color: #0e7490;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    border-radius: 999px;
    background: rgba(207, 250, 254, 0.92);
}

.hero-copy h1,
.page-hero h1,
.detail-content h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p {
    max-width: 680px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.hero-tags,
.detail-meta,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    color: #ecfeff;
    background: rgba(255, 255, 255, 0.16);
}

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

.primary-button,
.ghost-button,
.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    box-shadow: 0 14px 35px rgba(37, 99, 235, 0.24);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.text-button {
    color: #e0f2fe;
    background: transparent;
}

.primary-button:hover,
.ghost-button:hover,
.text-button:hover,
.header-search button:hover,
.mobile-search button:hover,
.search-panel button:hover {
    transform: translateY(-2px);
}

.hero-image {
    position: relative;
    align-self: center;
    border-radius: 36px;
    overflow: hidden;
    box-shadow: 0 32px 90px rgba(15, 23, 42, 0.42);
    background: rgba(255, 255, 255, 0.08);
}

.hero-image::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.36));
}

.hero-image img {
    width: 100%;
    height: min(70vh, 520px);
    object-fit: cover;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 36px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-prev {
    left: 4px;
}

.hero-next {
    right: 4px;
}

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

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

.hero-dots button.is-active {
    width: 32px;
    background: #ffffff;
}

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

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

.section-heading h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(26px, 3vw, 38px);
    letter-spacing: -0.03em;
}

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

.section-more {
    color: var(--cyan-dark);
    font-weight: 800;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: rgba(14, 165, 233, 0.45);
    box-shadow: var(--shadow);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #e0f2fe, #bfdbfe);
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.play-dot,
.rank-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.play-dot {
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.28);
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.movie-info {
    padding: 16px;
}

.movie-name {
    display: -webkit-box;
    min-height: 48px;
    color: #0f172a;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.5;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.movie-info p {
    display: -webkit-box;
    min-height: 42px;
    margin: 10px 0 0;
    color: #475569;
    font-size: 14px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.tag-row span {
    color: #0e7490;
    background: #ecfeff;
}

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

.category-tile,
.category-panel {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-tile:hover,
.category-panel:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.category-tile {
    min-height: 190px;
    padding: 18px;
    color: #ffffff;
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.category-tile span,
.category-tile em {
    position: relative;
    z-index: 2;
    display: block;
}

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

.category-tile em {
    margin-top: 4px;
    font-style: normal;
    color: rgba(255, 255, 255, 0.82);
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 32px;
}

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

.compact-row,
.ranking-row {
    display: grid;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
}

.compact-row {
    grid-template-columns: 58px 1fr;
}

.compact-row img {
    width: 58px;
    height: 76px;
    border-radius: 14px;
    object-fit: cover;
}

.compact-row strong,
.ranking-row span {
    display: block;
    color: #0f172a;
    font-weight: 800;
}

.compact-row em,
.ranking-row em {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.ranking-row {
    grid-template-columns: 42px 1fr auto;
}

.ranking-row b {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

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

.page-hero {
    margin-top: 40px;
    padding: 56px;
    color: #ffffff;
    border-radius: 36px;
    background: radial-gradient(circle at right top, rgba(34, 211, 238, 0.32), transparent 35%), linear-gradient(135deg, #0f172a, #0e7490 52%, #2563eb);
    box-shadow: var(--shadow);
}

.page-hero.small-hero,
.page-hero.category-hero {
    min-height: 280px;
}

.filter-bar,
.search-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    gap: 12px;
    margin-bottom: 28px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.filter-bar input,
.filter-bar select,
.search-panel input {
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    outline: none;
    background: #f8fafc;
}

.search-panel button {
    min-height: 48px;
    padding: 0 24px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.empty-state {
    display: none;
    padding: 36px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--border);
    border-radius: 24px;
    background: #ffffff;
}

.empty-state.is-visible {
    display: block;
}

.category-panel {
    display: grid;
    grid-template-rows: 180px 1fr;
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    overflow: hidden;
    background: #e0f2fe;
}

.category-covers img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.category-panel-body {
    padding: 22px;
}

.category-panel-body h2 {
    margin: 0 0 8px;
    color: #0f172a;
}

.category-panel-body p {
    margin: 0;
    color: var(--muted);
}

.category-panel-body span {
    display: inline-flex;
    margin-top: 18px;
    color: var(--cyan-dark);
    font-weight: 800;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
    padding-top: 24px;
}

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

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    color: #ffffff;
    border: 0;
    background: radial-gradient(circle, rgba(8, 145, 178, 0.16), rgba(2, 6, 23, 0.42));
    cursor: pointer;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    font-size: 34px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 20px 50px rgba(8, 145, 178, 0.38);
}

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

.detail-content,
.side-card {
    margin-top: 24px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.detail-content h1 {
    color: #0f172a;
    font-size: clamp(30px, 4vw, 52px);
}

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

.detail-meta span {
    color: #0e7490;
    background: #ecfeff;
}

.lead-text {
    color: #0f172a;
    font-size: 18px;
    font-weight: 700;
}

.detail-content h2,
.side-card h2 {
    margin-top: 28px;
    color: #0f172a;
    font-size: 24px;
}

.detail-content p {
    color: #475569;
    font-size: 16px;
}

.detail-cover {
    width: 100%;
    border-radius: 28px;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.side-card dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px 14px;
    margin: 0;
}

.side-card dt {
    color: var(--muted);
}

.side-card dd {
    margin: 0;
    color: #0f172a;
    font-weight: 700;
}

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

.search-results:empty,
.search-results:empty + .search-fallback {
    display: block;
}

.search-results:not(:empty) + .search-fallback {
    display: none;
}

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

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

.footer-brand p,
.footer-links a {
    color: #94a3b8;
}

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

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

.site-footer h2 {
    margin: 0 0 16px;
    color: #67e8f9;
    font-size: 18px;
}

.footer-bottom {
    padding: 18px 0;
    color: #94a3b8;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

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

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

    .hero-image {
        max-width: 560px;
        margin: 0 auto 64px;
    }

    .hero-stage {
        min-height: 840px;
    }
}

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

    .menu-toggle {
        display: block;
    }

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

    .hero-stage {
        min-height: 760px;
    }

    .hero-slide {
        gap: 20px;
    }

    .hero-copy {
        padding-top: 42px;
    }

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

    .movie-grid-featured,
    .movie-grid-ranking,
    .movie-grid,
    .related-grid,
    .category-grid,
    .category-panel-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section-heading,
    .footer-grid {
        display: grid;
    }

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

    .page-hero {
        padding: 34px 24px;
        border-radius: 28px;
    }

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

    .ranking-row em {
        grid-column: 2;
    }
}

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

    .mobile-search {
        grid-template-columns: 1fr auto;
    }

    .mobile-search input {
        width: 100%;
    }

    .hero-stage {
        min-height: 690px;
    }

    .hero-copy p {
        font-size: 15px;
    }

    .hero-actions {
        display: grid;
    }

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

    .hero-control {
        display: none;
    }

    .movie-grid-featured,
    .movie-grid-ranking,
    .movie-grid,
    .related-grid,
    .category-grid,
    .category-panel-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-content,
    .side-card {
        padding: 22px;
    }

    .side-card dl {
        grid-template-columns: 1fr;
    }
}
