:root {
    color-scheme: light;
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #eff6ff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --primary: #2563eb;
    --primary-dark: #1e3a8a;
    --primary-soft: #dbeafe;
    --accent: #fbbf24;
    --shadow: 0 24px 55px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.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, #0f172a, #1e3a8a 52%, #0f172a);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
}

.nav-container {
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 12px 28px rgba(37, 99, 235, 0.38);
}

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

.desktop-nav a,
.mobile-links a,
.mobile-categories a {
    color: rgba(255, 255, 255, 0.82);
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-links a:hover,
.mobile-categories a:hover {
    color: #bfdbfe;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.header-search input {
    width: 190px;
    color: #ffffff;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 8px 8px 8px 14px;
}

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

.header-search button {
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    color: #ffffff;
    background: var(--primary);
}

.mobile-menu-button {
    display: none;
    color: #ffffff;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    padding: 9px 12px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 16px;
}

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

.mobile-panel .header-search {
    width: min(100%, 520px);
    margin: 0 auto 14px;
}

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

.mobile-links,
.mobile-categories {
    width: min(100%, 520px);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.mobile-categories {
    margin-top: 12px;
    font-size: 14px;
}

.hero-slider {
    position: relative;
    min-height: 660px;
    overflow: hidden;
    color: #ffffff;
    background: #0f172a;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 28%, rgba(37, 99, 235, 0.52), transparent 32%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.58) 48%, rgba(15, 23, 42, 0.18)),
        linear-gradient(0deg, rgba(15, 23, 42, 0.94), transparent 42%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(760px, 100%);
    padding-top: 32px;
}

.eyebrow,
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    color: #60a5fa;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-head h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 70px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-summary {
    max-width: 680px;
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: clamp(16px, 2vw, 22px);
    line-height: 1.72;
}

.hero-tags,
.detail-tags,
.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags span,
.detail-tags span,
.movie-tags span {
    border-radius: 999px;
    padding: 6px 10px;
    color: #1e3a8a;
    background: #dbeafe;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
}

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

.primary-button,
.ghost-button,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    min-width: 132px;
    color: #ffffff;
    background: var(--primary);
    padding: 13px 24px;
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.36);
}

.ghost-button {
    min-width: 132px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.12);
    padding: 12px 24px;
    backdrop-filter: blur(10px);
}

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

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hero-controls > button,
.hero-dots button {
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
}

.hero-controls > button {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    font-size: 28px;
}

.hero-dots {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.hero-dots button {
    width: 34px;
    height: 8px;
    border-radius: 999px;
    opacity: 0.52;
}

.hero-dots button.is-active {
    opacity: 1;
    background: #60a5fa;
}

.section-block {
    padding: 72px 0;
}

.section-white {
    background: #ffffff;
}

.section-soft {
    background: linear-gradient(180deg, #f8fafc, #eff6ff);
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

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

.section-link {
    flex: 0 0 auto;
    color: var(--primary);
    background: var(--primary-soft);
    padding: 11px 18px;
}

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

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

.movie-card-link {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card-link:hover {
    transform: translateY(-6px);
    border-color: #bfdbfe;
    box-shadow: var(--shadow);
}

.poster-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #1e3a8a, #0f172a);
}

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

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

.poster-badge,
.card-rank {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.poster-badge {
    top: 12px;
    left: 12px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    padding: 6px 10px;
    backdrop-filter: blur(8px);
}

.card-rank {
    right: 12px;
    bottom: 12px;
    color: #111827;
    background: var(--accent);
    padding: 7px 10px;
}

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

.movie-card-body h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 13px 0;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.movie-tags {
    margin-top: auto;
}

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

.category-tile {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    border-radius: 26px;
    color: #ffffff;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.52;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile:hover img {
    transform: scale(1.06);
    opacity: 0.68;
}

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

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

.category-tile span {
    margin: 150px 20px 0;
    font-size: 22px;
    font-weight: 900;
}

.category-tile p {
    margin: 10px 20px 20px;
    color: #dbeafe;
    line-height: 1.7;
    font-size: 14px;
}

.page-hero,
.detail-hero {
    color: #ffffff;
    background:
        radial-gradient(circle at 20% 20%, rgba(96, 165, 250, 0.28), transparent 28%),
        linear-gradient(120deg, #0f172a, #1e3a8a 58%, #0f172a);
    padding: 70px 0;
}

.page-hero p,
.detail-head p {
    max-width: 820px;
    color: #dbeafe;
    line-height: 1.78;
    font-size: 18px;
}

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

.category-overview-card a {
    display: block;
    overflow: hidden;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 170px;
    background: #1e3a8a;
}

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

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

.category-overview-body h2 {
    margin: 0;
    font-size: 22px;
}

.category-overview-body p {
    color: var(--muted);
    line-height: 1.75;
}

.category-overview-body span {
    color: var(--primary);
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 12px;
    margin-bottom: 28px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #f8fafc;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    outline: 0;
    background: #ffffff;
    padding: 13px 14px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.16);
}

.movie-card.is-hidden {
    display: none;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: #bfdbfe;
    font-size: 14px;
    margin-bottom: 32px;
}

.breadcrumb a:hover {
    color: #ffffff;
}

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

.detail-layout-section {
    padding-top: 48px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

.player-card,
.detail-sidebar,
.detail-content article {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.player-card {
    overflow: hidden;
}

.video-shell {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #ffffff;
    border: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.28), rgba(15, 23, 42, 0.82));
}

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

.play-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.42);
    font-size: 30px;
}

.detail-sidebar {
    overflow: hidden;
    padding-bottom: 20px;
}

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

.detail-info-list {
    padding: 18px 20px 8px;
}

.detail-info-list p {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin: 0;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.detail-info-list b {
    color: #334155;
}

.detail-info-list span {
    text-align: right;
    color: var(--muted);
}

.detail-tags {
    padding: 8px 20px 0;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.detail-content article {
    padding: 28px;
}

.detail-content h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.detail-content p {
    margin: 0;
    color: #334155;
    line-height: 1.9;
}

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

.site-footer {
    color: #d1d5db;
    background: linear-gradient(180deg, #0f172a, #020617);
    padding-top: 52px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 36px;
}

.footer-logo {
    color: #ffffff;
    font-size: 22px;
}

.site-footer p {
    color: #cbd5e1;
    line-height: 1.8;
}

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

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
}

.footer-links a:hover {
    color: #60a5fa;
}

.footer-bottom {
    margin-top: 42px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 22px 16px;
    text-align: center;
    color: #94a3b8;
}

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

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

    .detail-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .detail-sidebar {
        display: grid;
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 20px;
        padding-bottom: 0;
    }

    .detail-sidebar > img {
        height: 100%;
    }
}

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

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

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

    .hero-shade {
        background:
            linear-gradient(180deg, rgba(15, 23, 42, 0.48), rgba(15, 23, 42, 0.96)),
            radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.45), transparent 38%);
    }

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

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

    .movie-grid,
    .category-grid,
    .category-overview-grid,
    .related-grid,
    .footer-grid,
    .detail-content {
        grid-template-columns: 1fr 1fr;
    }
}

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

    .hero-slider {
        min-height: 590px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-head h1 {
        font-size: 34px;
    }

    .hero-controls {
        bottom: 20px;
    }

    .hero-dots button {
        width: 22px;
    }

    .section-block {
        padding: 52px 0;
    }

    .movie-grid,
    .category-grid,
    .category-overview-grid,
    .related-grid,
    .footer-grid,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        display: block;
    }

    .detail-sidebar > img {
        height: auto;
    }
}
