:root {
    color-scheme: light;
    --page-bg: #f0f9ff;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #1f2937;
    --muted: #64748b;
    --primary: #0284c7;
    --primary-deep: #0369a1;
    --primary-soft: #e0f2fe;
    --line: #dbeafe;
    --shadow: 0 24px 60px rgba(14, 116, 144, 0.16);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(125, 211, 252, 0.28), transparent 30rem),
        linear-gradient(180deg, #f0f9ff 0%, #ffffff 42%, #f8fafc 100%);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(125, 211, 252, 0.45);
    background: rgba(240, 249, 255, 0.92);
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 28px rgba(14, 116, 144, 0.08);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.logo-mark {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    box-shadow: 0 14px 32px rgba(2, 132, 199, 0.28);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.logo-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

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

.nav-links a {
    color: #334155;
    font-weight: 700;
    transition: color 0.2s ease;
}

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

.header-search {
    width: min(280px, 22vw);
}

.search-shell {
    position: relative;
}

.search-input,
.filter-input {
    width: 100%;
    height: 44px;
    border: 1px solid rgba(125, 211, 252, 0.68);
    border-radius: 999px;
    outline: none;
    padding: 0 18px;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus,
.filter-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}

.search-results {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 80;
    width: min(520px, 92vw);
    max-height: 70vh;
    overflow: auto;
    display: none;
    padding: 10px;
    border: 1px solid rgba(125, 211, 252, 0.52);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
}

.search-results.is-open {
    display: grid;
    gap: 8px;
}

.search-result-item {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background: var(--primary-soft);
}

.search-result-item img {
    width: 78px;
    height: 54px;
    object-fit: cover;
    border-radius: 12px;
}

.search-result-title {
    font-weight: 800;
    color: #0f172a;
}

.search-result-meta {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    color: #0f172a;
    background: rgba(224, 242, 254, 0.9);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
}

.mobile-nav a {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
    color: #334155;
    font-weight: 700;
}

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

.hero-slider {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    border-radius: 28px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: end;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.86) 0%, rgba(2, 6, 23, 0.55) 46%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.84) 0%, transparent 62%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(760px, 100%);
    padding: 56px;
    color: #ffffff;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    margin-bottom: 16px;
    padding: 7px 14px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.22);
}

.hero-title {
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 0.96;
    letter-spacing: -0.055em;
}

.hero-feature-title {
    margin: 18px 0 12px;
    font-size: clamp(24px, 3vw, 40px);
    line-height: 1.12;
}

.hero-desc {
    max-width: 680px;
    margin: 0 0 24px;
    color: rgba(226, 232, 240, 0.92);
    font-size: 18px;
    line-height: 1.8;
}

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

.meta-pill,
.tag-pill,
.genre-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    color: #0369a1;
    font-size: 13px;
    font-weight: 800;
    background: var(--primary-soft);
}

.hero-meta .meta-pill {
    color: #e0f2fe;
    background: rgba(14, 165, 233, 0.28);
    backdrop-filter: blur(8px);
}

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

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    box-shadow: 0 16px 32px rgba(14, 165, 233, 0.28);
}

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

.btn-secondary {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.92);
}

.hero-search {
    width: min(540px, 100%);
    margin-top: 24px;
}

.hero-dots {
    position: absolute;
    right: 28px;
    bottom: 28px;
    z-index: 3;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.section {
    margin-top: 58px;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.section-desc {
    margin: 10px 0 0;
    max-width: 680px;
    color: var(--muted);
    line-height: 1.8;
}

.grid {
    display: grid;
    gap: 22px;
}

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

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

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

.movie-card,
.category-card,
.rank-card,
.info-panel {
    overflow: hidden;
    border: 1px solid rgba(125, 211, 252, 0.36);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
}

.movie-card {
    display: flex;
    flex-direction: column;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 54px rgba(14, 116, 144, 0.16);
}

.card-cover {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e0f2fe;
}

.movie-grid.compact .card-cover {
    aspect-ratio: 16 / 10;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.card-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 38px;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.08));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.card-title {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 900;
}

.card-title a:hover {
    color: var(--primary);
}

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

.card-meta {
    margin-top: auto;
    color: var(--muted);
    font-size: 12px;
}

.category-card {
    position: relative;
    min-height: 188px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 26px 54px rgba(14, 116, 144, 0.15);
}

.category-card h2,
.category-card h3 {
    margin: 12px 0 10px;
    font-size: 26px;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.category-arrow {
    margin-top: 18px;
    color: var(--primary);
    font-weight: 900;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 72px 148px 1fr;
    gap: 18px;
    align-items: center;
    padding: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 42px rgba(14, 116, 144, 0.13);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.rank-card img {
    width: 148px;
    height: 92px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-card h2,
.rank-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-card p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.65;
}

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

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

.detail-hero {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 34px;
    align-items: stretch;
    padding: 26px;
    border: 1px solid rgba(125, 211, 252, 0.36);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(224, 242, 254, 0.72));
    box-shadow: var(--shadow);
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    background: #dbeafe;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
}

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

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

.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

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

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.player-section {
    margin-top: 36px;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 26px 68px rgba(2, 6, 23, 0.32);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    color: #ffffff;
    background: #020617;
    cursor: pointer;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.78;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(14, 165, 233, 0.08), rgba(2, 6, 23, 0.72)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 62%);
}

.play-badge {
    position: relative;
    z-index: 2;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #0284c7;
    font-size: 38px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.32);
}

.player-cover.is-hidden {
    display: none;
}

.player-message {
    position: absolute;
    left: 50%;
    bottom: 22px;
    z-index: 4;
    display: none;
    transform: translateX(-50%);
    padding: 10px 16px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.84);
}

.player-message.is-open {
    display: block;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 26px;
    margin-top: 36px;
}

.content-card {
    border: 1px solid rgba(125, 211, 252, 0.34);
    border-radius: 24px;
    padding: 26px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
}

.content-card + .content-card {
    margin-top: 22px;
}

.content-card h2,
.aside-card h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.content-card p {
    margin: 0;
    color: #334155;
    line-height: 2;
    font-size: 16px;
}

.aside-stack {
    display: grid;
    gap: 18px;
}

.aside-card {
    border: 1px solid rgba(125, 211, 252, 0.34);
    border-radius: 24px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
}

.related-mini {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.related-mini:last-child {
    border-bottom: 0;
}

.related-mini img {
    width: 96px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
}

.related-mini h3 {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.35;
}

.related-mini span {
    color: var(--muted);
    font-size: 12px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 420px) 1fr;
    gap: 18px;
    align-items: start;
    margin-bottom: 26px;
    padding: 18px;
    border: 1px solid rgba(125, 211, 252, 0.36);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
}

.genre-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.genre-button {
    border: 0;
    cursor: pointer;
}

.genre-button.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.empty-filter {
    display: none;
    padding: 30px;
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
    background: rgba(224, 242, 254, 0.72);
}

.empty-filter.is-open {
    display: block;
}

.pager-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.site-footer {
    border-top: 1px solid rgba(125, 211, 252, 0.45);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.96));
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr;
    gap: 28px;
}

.footer-title {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 900;
}

.footer-text {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.footer-links a {
    color: #475569;
    font-weight: 700;
}

.footer-bottom {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    color: var(--muted);
    font-size: 13px;
}

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

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

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

    .detail-cover img {
        min-height: auto;
        aspect-ratio: 16 / 10;
    }
}

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

    .nav-links {
        display: none;
    }

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

    .logo-mark {
        width: 36px;
        height: 36px;
    }

    .logo-name {
        font-size: 18px;
    }

    .page-shell {
        width: min(100% - 24px, 1180px);
        padding-top: 22px;
    }

    .hero-slider {
        min-height: 620px;
        border-radius: 22px;
    }

    .hero-content {
        padding: 32px 22px 70px;
    }

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

    .hero-dots {
        left: 22px;
        right: auto;
    }

    .section-head {
        display: block;
    }

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

    .card-body {
        padding: 13px;
    }

    .card-title {
        font-size: 15px;
    }

    .rank-card {
        grid-template-columns: 52px 100px 1fr;
        gap: 12px;
    }

    .rank-number {
        width: 44px;
        height: 44px;
        font-size: 18px;
        border-radius: 14px;
    }

    .rank-card img {
        width: 100px;
        height: 68px;
    }

    .rank-card h2,
    .rank-card h3 {
        font-size: 16px;
    }

    .rank-card p {
        display: none;
    }

    .detail-hero {
        padding: 16px;
        border-radius: 22px;
    }

    .detail-copy h1 {
        font-size: 36px;
    }

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

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

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

    .hero-title {
        font-size: 38px;
    }

    .hero-feature-title {
        font-size: 25px;
    }
}
