:root {
    color-scheme: light;
    --bg: #f8fafc;
    --bg-soft: #eff6ff;
    --card: rgba(255, 255, 255, 0.88);
    --card-solid: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: rgba(148, 163, 184, 0.28);
    --blue: #2563eb;
    --blue-dark: #1e40af;
    --blue-soft: #dbeafe;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #f8fafc 0%, #eef6ff 42%, #f1f5f9 100%);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 190px;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: #ffffff;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
}

.logo-title {
    margin: 0;
    font-size: 20px;
    line-height: 1.1;
    font-weight: 800;
}

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

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

.primary-nav a,
.mobile-nav a {
    color: #334155;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.primary-nav a:hover,
.mobile-nav a:hover {
    color: var(--blue);
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 260px;
}

.header-search input,
.hero-search input,
.search-box input {
    width: 100%;
    border: 1px solid var(--line);
    outline: none;
    border-radius: 999px;
    padding: 12px 48px 12px 18px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.hero-search input:focus,
.search-box input:focus {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.header-search button,
.hero-search button,
.search-box button {
    position: absolute;
    right: 4px;
    border: 0;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    cursor: pointer;
}

.menu-toggle {
    display: none;
    border: 0;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #eef2ff;
    color: var(--blue-dark);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 16px;
    gap: 10px;
    overflow-x: auto;
}

.mobile-nav a {
    white-space: nowrap;
    border-radius: 999px;
    background: #f1f5f9;
    padding: 9px 14px;
}

.page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 24px 58px;
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    border-radius: 0 0 36px 36px;
    background: #0f172a;
    color: #ffffff;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.9s ease;
    pointer-events: none;
}

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

.hero-image {
    position: absolute;
    inset: 0;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(15, 23, 42, 0.66) 45%, rgba(15, 23, 42, 0.16) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.06));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 96px 24px 82px;
    min-height: 72vh;
    display: grid;
    align-content: center;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(191, 219, 254, 0.4);
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.25);
    color: #dbeafe;
    font-size: 14px;
    font-weight: 700;
    backdrop-filter: blur(12px);
}

.hero h1 {
    max-width: 780px;
    margin: 22px 0 18px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 700px;
    margin: 0 0 24px;
    color: #e2e8f0;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: #ffffff;
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.32);
}

.btn-ghost {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.hero-search {
    position: relative;
    max-width: 620px;
    margin-top: 30px;
}

.hero-search input {
    min-height: 56px;
    padding-right: 62px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.94);
}

.hero-search button {
    width: 48px;
    height: 48px;
}

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

.hero-dot {
    width: 30px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

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

.section {
    margin-top: 42px;
}

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

.section-title {
    margin: 0;
    font-size: clamp(24px, 3vw, 36px);
    letter-spacing: -0.02em;
}

.section-desc {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.7);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

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

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 14px;
}

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

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

.card-meta {
    margin-top: 8px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 12px;
}

.card-summary {
    margin: 10px 0 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.65;
}

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

.category-card {
    min-height: 170px;
    padding: 24px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(219, 234, 254, 0.76));
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 82px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.07);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--blue-soft);
    color: var(--blue-dark);
    font-weight: 900;
}

.rank-cover {
    width: 82px;
    height: 110px;
    border-radius: 14px;
    overflow: hidden;
    background: #dbeafe;
}

.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.rank-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

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

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

.detail-hero {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 32px;
    align-items: stretch;
    padding: 26px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.82);
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    background: #dbeafe;
}

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

.detail-info h1 {
    margin: 0 0 14px;
    font-size: clamp(32px, 4vw, 56px);
    letter-spacing: -0.03em;
}

.meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 22px;
}

.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 800;
}

.detail-lead {
    color: #334155;
    font-size: 18px;
    line-height: 1.8;
}

.player-wrap {
    margin-top: 38px;
    border-radius: 30px;
    overflow: hidden;
    background: #020617;
    box-shadow: var(--shadow);
}

.player-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.player-top h2 {
    margin: 0;
    font-size: 20px;
}

.watch-player {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.watch-player video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: #020617;
}

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.2), rgba(2, 6, 23, 0.62));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.watch-player.is-playing .play-layer {
    opacity: 0;
    visibility: hidden;
}

.play-button {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.38);
    cursor: pointer;
    font-size: 34px;
}

.content-panel {
    padding: 26px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.82);
}

.content-panel h2 {
    margin-top: 0;
    font-size: 26px;
}

.content-panel p {
    color: #334155;
    line-height: 1.9;
    font-size: 16px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.tag-list span {
    padding: 7px 11px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.search-page-head {
    max-width: 820px;
    margin: 24px auto 34px;
    text-align: center;
}

.search-page-head h1 {
    margin: 0 0 14px;
    font-size: clamp(32px, 5vw, 54px);
}

.search-box {
    position: relative;
    max-width: 720px;
    margin: 22px auto 0;
}

.search-box input {
    min-height: 58px;
    padding-right: 64px;
}

.search-box button {
    width: 48px;
    height: 48px;
    top: 5px;
}

.empty-state {
    padding: 34px;
    text-align: center;
    color: var(--muted);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.8);
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 24px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

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

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

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

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

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

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

    .hero,
    .hero-content {
        min-height: 68vh;
    }

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

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

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

    .detail-cover img {
        max-height: 560px;
    }
}

@media (max-width: 640px) {
    .header-inner,
    .page,
    .hero-content,
    .footer-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .logo {
        min-width: auto;
    }

    .logo-subtitle {
        display: none;
    }

    .hero {
        border-radius: 0 0 24px 24px;
    }

    .hero-content {
        padding-top: 74px;
        padding-bottom: 74px;
    }

    .hero-actions {
        align-items: stretch;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .card-grid,
    .category-grid,
    .rank-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .rank-item {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .rank-cover {
        display: none;
    }

    .detail-hero,
    .content-panel {
        padding: 18px;
        border-radius: 22px;
    }
}
