:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-accent: #06b6d4;
    --color-soft: #eff6ff;
    --color-text: #1f2937;
    --color-muted: #6b7280;
    --color-line: #e5e7eb;
    --shadow-card: 0 16px 45px rgba(15, 23, 42, 0.12);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f8fafc;
    color: var(--color-text);
    line-height: 1.6;
}

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;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

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

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

.brand-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.brand-text,
.footer-brand {
    font-size: 22px;
    background: linear-gradient(90deg, var(--color-primary-dark), var(--color-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link,
.mobile-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    color: #4b5563;
    font-size: 15px;
    font-weight: 650;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.mobile-nav-link:hover,
.nav-link.is-active,
.mobile-nav-link.is-active {
    color: var(--color-primary-dark);
    background: #dbeafe;
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 2px;
    background: #334155;
}

.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;
}

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

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.hero-slide::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(30, 64, 175, 0.78) 42%, rgba(8, 145, 178, 0.22));
}

.hero-slide-content {
    position: absolute;
    z-index: 2;
    inset: 0;
    min-height: 620px;
    display: grid;
    align-items: center;
    padding: 72px 0;
    color: #ffffff;
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: grid;
    align-items: center;
    padding: 72px 0;
    color: #ffffff;
}

.hero-panel {
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #cffafe;
    font-size: 14px;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero h1 span {
    color: #67e8f9;
}

.hero-description {
    max-width: 640px;
    margin: 24px 0 32px;
    color: #e5f3ff;
    font-size: 19px;
}

.hero-actions,
.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.button-primary,
.button-ghost,
.button-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

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

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

.button-ghost {
    border: 1px solid rgba(255, 255, 255, 0.48);
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    backdrop-filter: blur(12px);
}

.button-light {
    background: #ffffff;
    color: var(--color-primary-dark);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

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

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

.hero-dot.is-active {
    width: 32px;
    background: #67e8f9;
}

.section {
    padding: 76px 0;
}

.section.is-soft {
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

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

.section-heading h2,
.page-hero h1,
.detail-content h2 {
    margin: 0 0 8px;
    color: #111827;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p {
    margin: 0;
    color: var(--color-muted);
}

.section-more {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    color: var(--color-primary-dark);
    background: #dbeafe;
    font-weight: 800;
}

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

.stat-card {
    padding: 26px;
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    box-shadow: var(--shadow-card);
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.16);
}

.stat-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #ffffff;
    font-size: 24px;
}

.stat-card strong {
    display: block;
    color: #111827;
    font-size: 22px;
}

.stat-card span {
    color: var(--color-muted);
    font-size: 14px;
}

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

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

.movie-card {
    min-width: 0;
}

.movie-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-link:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.16);
}

.movie-thumb {
    position: relative;
    height: 216px;
    overflow: hidden;
    background: #dbeafe;
}

.movie-grid.is-wide .movie-thumb {
    height: 240px;
}

.movie-card.is-compact .movie-thumb {
    height: 150px;
}

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

.movie-link:hover .movie-thumb img {
    transform: scale(1.08);
}

.movie-thumb::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.68), transparent);
}

.movie-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.92);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    right: 12px;
    left: auto;
    background: rgba(245, 158, 11, 0.96);
}

.movie-body {
    padding: 18px;
}

.movie-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    color: #111827;
}

.movie-meta,
.movie-desc {
    margin: 0;
}

.movie-meta {
    color: var(--color-primary-dark);
    font-size: 13px;
    font-weight: 700;
}

.movie-desc {
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 14px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 12px;
    font-weight: 750;
}

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

.category-card {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #0f172a;
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.18);
}

.category-card img {
    width: 100%;
    height: 100%;
    min-height: 230px;
    object-fit: cover;
    opacity: 0.78;
    transition: transform 0.45s ease;
}

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

.category-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.86));
}

.category-content {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    color: #ffffff;
}

.category-content strong {
    display: block;
    margin-bottom: 8px;
    font-size: 24px;
}

.category-content em {
    display: block;
    color: #e0f2fe;
    font-style: normal;
    font-size: 14px;
}

.page-hero {
    padding: 82px 0 58px;
    background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.22), transparent 34%), linear-gradient(135deg, #f8fafc, #eff6ff 50%, #ecfeff);
}

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

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

.search-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 170px 170px;
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.search-box {
    display: grid;
    gap: 6px;
    color: #475569;
    font-size: 13px;
    font-weight: 750;
}

.search-box input,
.filter-select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--color-line);
    border-radius: 14px;
    background: #f8fafc;
    color: var(--color-text);
    outline: 0;
}

.search-box input {
    padding: 0 15px;
}

.filter-select {
    padding: 0 12px;
    align-self: end;
}

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

.no-results {
    display: none;
    padding: 36px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    color: var(--color-muted);
    text-align: center;
}

.no-results.is-visible {
    display: block;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 86px 150px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.ranking-num {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
}

.ranking-item img {
    width: 150px;
    height: 92px;
    object-fit: cover;
    border-radius: 14px;
}

.ranking-item h2 {
    margin: 0 0 6px;
    font-size: 21px;
}

.ranking-item p {
    margin: 0;
    color: var(--color-muted);
}

.detail-shell {
    padding: 40px 0 82px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 360px;
    gap: 30px;
    align-items: start;
}

.player-card,
.detail-content,
.side-card {
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.player-card {
    overflow: hidden;
    background: #020617;
}

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

.player-frame video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.68));
    color: #ffffff;
    cursor: pointer;
}

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

.play-circle {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    box-shadow: 0 20px 46px rgba(6, 182, 212, 0.32);
    font-size: 32px;
    transition: transform 0.25s ease;
}

.player-overlay:hover .play-circle {
    transform: scale(1.08);
}

.player-error {
    display: none;
    padding: 14px 18px;
    background: #991b1b;
    color: #ffffff;
}

.player-error.is-visible {
    display: block;
}

.detail-content {
    margin-top: 24px;
    padding: 28px;
}

.detail-title {
    padding: 56px 0 20px;
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.detail-title h1 {
    color: #111827;
    font-size: clamp(32px, 5vw, 52px);
}

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

.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: #dbeafe;
    color: var(--color-primary-dark);
    font-size: 13px;
    font-weight: 800;
}

.detail-content h2 {
    font-size: 24px;
}

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

.review-box {
    padding: 20px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.side-card {
    position: sticky;
    top: 94px;
    padding: 22px;
}

.poster-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #dbeafe;
}

.poster-card img {
    width: 100%;
    height: 360px;
    object-fit: cover;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 0;
}

.related-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.related-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

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

.related-item strong {
    display: block;
    color: #111827;
    font-size: 14px;
    line-height: 1.35;
}

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

.site-footer {
    background: linear-gradient(135deg, #111827, #0f172a);
    color: #cbd5e1;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 30px;
    padding: 42px 0;
}

.footer-inner p {
    max-width: 560px;
    margin: 12px 0 0;
    color: #94a3b8;
}

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

.footer-links a:hover {
    color: #67e8f9;
}

.footer-copy {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 26px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    font-size: 14px;
}

@media (max-width: 1024px) {
    .movie-grid,
    .movie-grid.is-wide,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .side-card {
        position: static;
    }

    .poster-card img {
        height: 420px;
    }
}

@media (max-width: 760px) {
    .desktop-nav {
        display: none;
    }

    .mobile-menu-button {
        display: block;
    }

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

    .section {
        padding: 54px 0;
    }

    .section-heading,
    .footer-inner {
        grid-template-columns: 1fr;
        display: grid;
        align-items: start;
    }

    .movie-grid,
    .movie-grid.is-wide,
    .category-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

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

    .ranking-item {
        grid-template-columns: 54px 92px minmax(0, 1fr);
    }

    .ranking-item img {
        width: 92px;
        height: 64px;
    }

    .ranking-item .button-light {
        grid-column: 1 / -1;
    }

    .poster-card img {
        height: 320px;
    }
}
