:root {
    color-scheme: light;
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #eef6ff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --cyan: #06b6d4;
    --dark: #020617;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.09), transparent 28rem), var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

body.nav-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(226, 232, 240, 0.86);
    backdrop-filter: blur(18px);
}

.nav-bar {
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.28);
}

.brand-text,
.footer-brand {
    font-size: 22px;
    background: linear-gradient(120deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link,
.mobile-link {
    color: #334155;
    border-radius: 12px;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link {
    padding: 10px 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover {
    color: var(--blue);
    background: #eff6ff;
}

.menu-button {
    width: 44px;
    height: 44px;
    display: none;
    border: 0;
    border-radius: 14px;
    background: #eff6ff;
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--blue);
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    padding: 0 16px 18px;
}

.mobile-link {
    display: block;
    padding: 12px 16px;
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: var(--dark);
}

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

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

.hero-image,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay,
.detail-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.52), rgba(2, 6, 23, 0.2));
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: center;
    gap: 56px;
    color: #ffffff;
}

.hero-copy {
    max-width: 760px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.22);
    border: 1px solid rgba(147, 197, 253, 0.24);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-intro h1 {
    margin: 0;
    font-size: clamp(36px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.07em;
}

.hero p,
.page-hero p,
.detail-intro p {
    max-width: 720px;
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: 18px;
}

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

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

.hero-tags span,
.detail-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span,
.detail-tags span {
    padding: 8px 12px;
    color: #eff6ff;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

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

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

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

.secondary-button,
.section-link {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.section-link {
    color: var(--blue);
    background: #eff6ff;
    border: 1px solid #dbeafe;
}

.primary-button:hover,
.secondary-button:hover,
.section-link:hover,
.category-tile:hover,
.movie-card:hover {
    transform: translateY(-3px);
}

.hero-poster,
.detail-poster {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.hero-poster span,
.detail-poster span {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.9);
    font-weight: 900;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.hero-dot.active {
    width: 34px;
    border-radius: 999px;
    background: #ffffff;
}

.search-panel,
.section-block {
    margin-top: 56px;
}

.search-panel {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 24px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

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

.search-panel h2,
.section-heading h2,
.detail-main h2,
.detail-side h2 {
    margin: 0;
    font-size: 30px;
    letter-spacing: -0.05em;
}

.search-tools {
    display: grid;
    gap: 14px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    min-height: 52px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #ffffff;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    color: #1d4ed8;
    background: #eff6ff;
    cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

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

.section-heading p,
.search-panel p,
.movie-card p,
.category-tile p,
.detail-main p,
.footer-grid p {
    color: var(--muted);
}

.section-heading p {
    margin: 8px 0 0;
    max-width: 680px;
}

.eyebrow {
    color: var(--blue);
    background: #eff6ff;
    border-color: #dbeafe;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--surface);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.14);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.78), transparent);
}

.score-pill,
.rank-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
}

.score-pill {
    right: 12px;
    min-width: 42px;
    height: 28px;
    background: rgba(37, 99, 235, 0.92);
}

.rank-badge {
    left: 12px;
    min-width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

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

.movie-meta-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.movie-meta-line a {
    color: var(--blue);
}

.movie-card h3 {
    margin: 8px 0 8px;
    font-size: 18px;
    line-height: 1.35;
    letter-spacing: -0.03em;
}

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

.movie-card p {
    display: -webkit-box;
    min-height: 3.3em;
    margin: 0 0 12px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
}

.tag-row span {
    padding: 5px 8px;
    color: #1d4ed8;
    background: #eff6ff;
}

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

.category-tile {
    display: grid;
    gap: 16px;
    padding: 18px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 12px 38px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tile-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.tile-thumbs img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    object-fit: cover;
}

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

.category-tile p {
    margin: 0;
    font-size: 14px;
}

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

.page-hero {
    padding: 96px 0 78px;
}

.page-hero p {
    color: #dbeafe;
}

.detail-hero {
    min-height: 520px;
}

.detail-bg {
    filter: blur(8px) saturate(1.1);
    transform: scale(1.04);
}

.detail-hero-content {
    position: relative;
    z-index: 2;
    padding: 40px 0 52px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 34px;
    color: #dbeafe;
    font-size: 14px;
}

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

.detail-intro {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

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

.detail-meta span {
    padding: 8px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.player-section {
    margin-top: -42px;
    position: relative;
    z-index: 8;
}

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

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

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-content: center;
    gap: 18px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.18));
    cursor: pointer;
}

.play-layer.hidden {
    display: none;
}

.play-circle {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    margin: 0 auto;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 48px rgba(37, 99, 235, 0.42);
    font-size: 30px;
}

.play-layer strong {
    font-size: 22px;
    letter-spacing: -0.03em;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
    margin-top: 44px;
}

.detail-main,
.detail-side {
    padding: 28px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 14px 48px rgba(15, 23, 42, 0.08);
}

.detail-main p {
    font-size: 17px;
}

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

.detail-tags span {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #dbeafe;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    margin: 18px 0 0;
}

.detail-side dt {
    color: var(--muted);
}

.detail-side dd {
    margin: 0;
    font-weight: 700;
}

.detail-side a {
    color: var(--blue);
}

.prev-next {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.prev-next a {
    padding: 16px 18px;
    border-radius: 16px;
    color: var(--blue);
    background: #eff6ff;
    border: 1px solid #dbeafe;
    font-weight: 700;
}

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

.empty-state {
    display: none;
    margin-top: 20px;
    padding: 22px;
    border-radius: 18px;
    color: var(--muted);
    background: #ffffff;
    border: 1px dashed var(--line);
    text-align: center;
}

.empty-state.visible {
    display: block;
}

.site-footer {
    margin-top: 76px;
    color: #cbd5e1;
    background: #020617;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
    padding: 52px 0;
}

.footer-grid h3 {
    color: #93c5fd;
    margin: 0 0 14px;
}

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

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

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding: 18px;
    color: #94a3b8;
    text-align: center;
}

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

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

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

    .menu-button {
        display: block;
    }

    body.nav-open .mobile-nav {
        display: block;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        align-content: center;
        padding: 70px 0 90px;
    }

    .hero-poster {
        display: none;
    }

    .hero-arrow {
        display: none;
    }

    .search-panel,
    .detail-layout,
    .footer-grid,
    .detail-intro {
        grid-template-columns: 1fr;
    }

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

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

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

    .prev-next {
        grid-template-columns: 1fr;
    }
}

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

    .nav-bar {
        height: 64px;
    }

    .brand-text,
    .footer-brand {
        font-size: 18px;
    }

    .hero h1,
    .hero h2,
    .page-hero h1,
    .detail-intro h1 {
        font-size: 36px;
    }

    .hero p,
    .page-hero p,
    .detail-intro p {
        font-size: 16px;
    }

    .search-panel {
        padding: 18px;
    }

    .movie-grid,
    .library-grid,
    .featured-grid,
    .preview-grid,
    .rank-list,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .detail-main,
    .detail-side {
        padding: 22px;
    }

    .play-circle {
        width: 64px;
        height: 64px;
        font-size: 24px;
    }
}
