:root {
    color-scheme: light;
    --page-bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #eef6ff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --blue-deep: #1d4ed8;
    --cyan: #06b6d4;
    --red: #ef4444;
    --amber: #f59e0b;
    --slate: #1e293b;
    --shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #f8fafc 0%, #eef6ff 42%, #ffffff 100%);
    color: var(--text);
    min-height: 100vh;
}

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;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.96), rgba(8, 145, 178, 0.96));
    color: #ffffff;
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.25);
    backdrop-filter: blur(16px);
}

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

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

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

.nav-link {
    padding: 10px 16px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.9);
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
}

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

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

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background-image: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.9), transparent 34%), radial-gradient(circle at 78% 28%, rgba(6, 182, 212, 0.8), transparent 28%), linear-gradient(135deg, rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.2));
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

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

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.36;
    filter: saturate(1.05);
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.72) 46%, rgba(15, 23, 42, 0.2) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 620px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 70px 0 96px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.24);
    color: #bfdbfe;
    font-weight: 800;
}

.hero h1 {
    max-width: 780px;
    margin: 0;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 760px;
    margin: 24px 0 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.85;
}

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

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

.hero-tags span,
.card-tags span,
.detail-tags span,
.meta-list span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #e0f2fe;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
}

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

.primary-button,
.ghost-button,
.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 16px;
    padding: 0 22px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

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

.text-button {
    min-height: 42px;
    color: var(--blue);
    background: #eff6ff;
}

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

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 32px;
    z-index: 3;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 44px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    cursor: pointer;
}

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

.section {
    padding: 64px 0;
}

.section.alt {
    background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 100%);
}

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

.section-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.section-subtitle {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.search-panel {
    display: grid;
    gap: 10px;
    max-width: 520px;
    margin: 0 0 28px;
}

.search-panel label {
    color: var(--muted);
    font-weight: 800;
}

.search-panel input {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 16px;
    background: #ffffff;
    color: var(--text);
    outline: none;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #1d4ed8, #06b6d4);
}

.poster-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.poster-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

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

.card-tags span {
    background: #eff6ff;
    color: var(--blue-deep);
}

.movie-card h3 {
    min-height: 54px;
    margin: 12px 0 8px;
    font-size: 18px;
    line-height: 1.45;
}

.movie-card p {
    min-height: 62px;
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    font-size: 14px;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

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

.category-tile {
    min-height: 160px;
    padding: 22px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

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

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

.rank-row {
    display: grid;
    grid-template-columns: 68px 1fr minmax(150px, auto) 60px;
    align-items: center;
    gap: 14px;
    min-height: 64px;
    padding: 12px 18px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: #ffffff;
    font-weight: 900;
}

.rank-title {
    font-weight: 900;
}

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

.rank-score {
    color: var(--red);
    font-weight: 900;
    text-align: right;
}

.page-hero {
    padding: 62px 0;
    color: #ffffff;
    background: linear-gradient(135deg, #1d4ed8, #0891b2);
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 62px);
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    color: #dbeafe;
    line-height: 1.8;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
    font-weight: 800;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 48px 0;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 22% 10%, rgba(37, 99, 235, 0.46), transparent 32%), radial-gradient(circle at 82% 0%, rgba(6, 182, 212, 0.34), transparent 30%);
}

.detail-wrap {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(220px, 330px) 1fr;
    gap: 34px;
    align-items: center;
}

.detail-poster {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
    background: linear-gradient(135deg, #1d4ed8, #06b6d4);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-info h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 68px);
    line-height: 1.06;
    letter-spacing: -0.06em;
}

.detail-info .lead {
    margin: 20px 0 0;
    color: #dbeafe;
    line-height: 1.85;
    font-size: 18px;
}

.detail-tags {
    margin-top: 20px;
}

.detail-tags span,
.meta-list span {
    background: rgba(255, 255, 255, 0.13);
}

.player-section {
    padding: 48px 0 28px;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.25);
}

.player-wrap video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.55));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 118px;
    min-height: 118px;
    padding-left: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: #ffffff;
    font-size: 42px;
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.4);
}

.player-wrap.is-playing .play-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    padding: 36px 0 64px;
}

.content-card,
.side-card {
    border-radius: var(--radius-lg);
    background: #ffffff;
    padding: 28px;
    box-shadow: var(--shadow);
}

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

.content-card p,
.side-card p {
    color: #334155;
    line-height: 1.9;
}

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

.side-item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
}

.side-item img {
    width: 72px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
    background: linear-gradient(135deg, #1d4ed8, #06b6d4);
}

.side-item strong {
    display: block;
    line-height: 1.45;
}

.side-item span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 40px 0;
}

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

.footer-inner strong {
    color: #ffffff;
    font-size: 20px;
}

.footer-inner p {
    max-width: 620px;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.hidden-by-search {
    display: none !important;
}

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

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

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

    .detail-poster {
        max-width: 360px;
    }
}

@media (max-width: 720px) {
    .menu-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 74px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.96);
    }

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

    .nav-link {
        width: 100%;
    }

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

    .hero h1 {
        font-size: clamp(36px, 11vw, 54px);
    }

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

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

    .movie-card h3 {
        font-size: 16px;
    }

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

    .rank-meta {
        display: none;
    }

    .footer-inner,
    .section-heading {
        flex-direction: column;
        align-items: flex-start;
    }
}

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

    .hero-actions,
    .footer-links {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .primary-button,
    .ghost-button,
    .text-button {
        width: 100%;
    }
}
