:root {
    color-scheme: light;
    --site-cyan: #06b6d4;
    --site-blue: #2563eb;
    --site-teal: #0f766e;
    --site-slate: #0f172a;
    --site-soft: #f8fafc;
    --site-muted: #64748b;
    --site-radius: 1.25rem;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #f8fafc;
    color: #0f172a;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img {
    background: linear-gradient(135deg, #0f172a, #0e7490 48%, #2563eb);
}

.site-header {
    backdrop-filter: blur(16px);
}

.site-logo:hover .logo-icon {
    transform: rotate(12deg) scale(1.04);
}

.logo-icon {
    display: inline-grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    font-weight: 900;
    transition: transform 0.3s ease;
}

.logo-icon.small {
    background: linear-gradient(135deg, var(--site-cyan), var(--site-blue));
}

.nav-link {
    color: white;
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
    color: #cffafe;
    transform: translateY(-1px);
}

.search-mark {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    color: #cffafe;
    transform: translateY(-50%);
}

.menu-toggle {
    display: inline-flex;
    width: 2.5rem;
    height: 2.5rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.menu-toggle span {
    width: 1.25rem;
    height: 0.125rem;
    border-radius: 999px;
    background: #fff;
}

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

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

.mobile-panel a {
    display: block;
    color: white;
    font-weight: 600;
}

.mobile-search-input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    padding: 0.75rem 1rem;
    color: white;
    outline: none;
}

.mobile-search-input::placeholder,
.search-input::placeholder {
    color: #cffafe;
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: #020617;
}

.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 {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.58), rgba(8, 145, 178, 0.12));
}

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

.hero-copy h1 {
    margin: 0 0 1rem;
    color: white;
    font-size: clamp(2.5rem, 7vw, 5.6rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
    text-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.eyebrow,
.section-kicker {
    margin: 0 0 0.5rem;
    color: #0891b2;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy .eyebrow {
    color: #67e8f9;
}

.hero-summary {
    max-width: 45rem;
    margin: 0 0 1.5rem;
    color: #e2e8f0;
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.8;
}

.hero-tags,
.meta-pills,
.detail-tags,
.card-tags,
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.hero-tags span,
.meta-pills span {
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: white;
    padding: 0.45rem 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    backdrop-filter: blur(14px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.6rem;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.85rem 1.6rem;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hero-btn.primary {
    background: linear-gradient(135deg, var(--site-cyan), var(--site-blue));
    color: white;
    box-shadow: 0 16px 35px rgba(37, 99, 235, 0.28);
}

.hero-btn.ghost {
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.16);
    color: white;
    backdrop-filter: blur(14px);
}

.hero-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 20px 45px rgba(6, 182, 212, 0.28);
}

.hero-control {
    position: absolute;
    z-index: 5;
    top: 50%;
    display: grid;
    width: 3rem;
    height: 3rem;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    color: white;
    font-size: 2rem;
    line-height: 1;
    transform: translateY(-50%);
    backdrop-filter: blur(14px);
}

.hero-control:hover {
    background: rgba(255, 255, 255, 0.45);
}

.hero-control.prev {
    left: 1rem;
}

.hero-control.next {
    right: 1rem;
}

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

.hero-dot {
    width: 0.75rem;
    height: 0.75rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 2rem;
    background: white;
}

.quick-search {
    margin-top: -2.5rem;
    position: relative;
    z-index: 10;
}

.hero-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.96);
    padding: 1rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.hero-search input,
.search-page-form input,
.catalog-tools input {
    width: 100%;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #f8fafc;
    padding: 0.85rem 1.2rem;
    color: #0f172a;
    outline: none;
}

.hero-search input:focus,
.search-page-form input:focus,
.catalog-tools input:focus {
    border-color: var(--site-cyan);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.hero-search button,
.search-page-form button {
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--site-cyan), var(--site-blue));
    color: white;
    padding: 0.85rem 1.4rem;
    font-weight: 800;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0 0;
}

.quick-links a,
.filter-chip {
    border-radius: 999px;
    background: white;
    color: #0e7490;
    padding: 0.55rem 1rem;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.filter-chip.active,
.filter-chip:hover,
.quick-links a:hover {
    background: linear-gradient(135deg, var(--site-cyan), var(--site-blue));
    color: white;
}

.category-strip {
    padding-top: 3.5rem;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-head h2 {
    margin: 0;
    color: #1e293b;
    font-size: clamp(1.65rem, 3vw, 2.4rem);
    letter-spacing: -0.035em;
}

.section-more {
    color: #0891b2;
    font-weight: 800;
}

.section-more:hover {
    color: #2563eb;
}

.category-grid,
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.category-tile,
.category-overview-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--site-radius);
    background: white;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.category-tile {
    min-height: 180px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: end;
    color: white;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.85), rgba(2, 6, 23, 0.12));
}

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

.category-tile span,
.category-tile small {
    position: relative;
    z-index: 1;
}

.category-tile span {
    font-size: 1.35rem;
    font-weight: 900;
}

.category-tile small {
    color: #e2e8f0;
}

.category-tile:hover img {
    transform: scale(1.08);
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.25rem;
}

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

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

.card-link {
    display: block;
    height: 100%;
}

.poster-wrap img {
    height: 18rem;
}

.card-tags span,
.detail-tags span {
    display: inline-flex;
    border-radius: 999px;
    background: #ecfeff;
    color: #0e7490;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.rank-badge {
    position: absolute;
    left: 0.75rem;
    top: 0.75rem;
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(239, 68, 68, 0.25);
}

.page-main {
    min-height: 100vh;
    background: linear-gradient(to bottom, #f8fafc, #eef2ff);
}

.page-hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 20% 15%, rgba(34, 211, 238, 0.32), transparent 32%), linear-gradient(135deg, #0f172a, #0e7490 54%, #2563eb);
    color: white;
}

.compact-hero {
    padding: 5.5rem 0 4rem;
}

.page-hero h1 {
    max-width: 850px;
    margin: 0 0 1rem;
    font-size: clamp(2.25rem, 6vw, 4.5rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.page-hero p {
    max-width: 780px;
    color: #e0f2fe;
    line-height: 1.8;
}

.page-hero .eyebrow {
    color: #67e8f9;
}

.catalog-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.catalog-tools input {
    max-width: 36rem;
}

.category-overview-card {
    padding: 1.25rem;
}

.overview-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.overview-thumbs img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 0.75rem;
    object-fit: cover;
}

.category-overview-card h2 {
    margin: 0 0 0.5rem;
    color: #1e293b;
}

.category-overview-card p {
    min-height: 3rem;
    color: #64748b;
    line-height: 1.6;
}

.category-overview-card span {
    color: #0891b2;
    font-weight: 800;
}

.search-page-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    max-width: 820px;
    margin: 1.5rem 0;
}

.detail-hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: #020617;
    color: white;
}

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(2px) saturate(1.05);
    transform: scale(1.04);
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.76), rgba(14, 116, 144, 0.35));
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 2rem;
    color: #bae6fd;
    font-size: 0.95rem;
}

.detail-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    align-items: center;
    gap: 2rem;
}

.detail-poster img {
    width: 100%;
    border-radius: 1.5rem;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.detail-copy h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.4rem, 6vw, 5.4rem);
    line-height: 0.95;
    letter-spacing: -0.055em;
}

.detail-one-line {
    max-width: 780px;
    color: #e2e8f0;
    font-size: 1.2rem;
    line-height: 1.8;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    background: #020617;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.22);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    border: 0;
    background: radial-gradient(circle at center, rgba(8, 145, 178, 0.38), rgba(2, 6, 23, 0.86));
    color: white;
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-ring {
    display: grid;
    width: 5.5rem;
    height: 5.5rem;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--site-cyan), var(--site-blue));
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.35);
    font-size: 2.2rem;
    line-height: 1;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.5rem;
}

.detail-article,
.detail-side {
    border-radius: 1.5rem;
    background: white;
    padding: 1.5rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.06);
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 1rem;
    color: #1e293b;
    font-size: 1.5rem;
}

.detail-article p {
    margin: 0 0 1.5rem;
    color: #475569;
    line-height: 2;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr);
    gap: 0.65rem 1rem;
    margin: 0 0 1rem;
}

.detail-side dt {
    color: #64748b;
    font-weight: 700;
}

.detail-side dd {
    margin: 0;
    color: #0f172a;
}

.line-clamp-2 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.empty-state {
    border-radius: 1rem;
    background: white;
    padding: 2rem;
    color: #64748b;
}

@media (max-width: 900px) {
    .hero-carousel {
        height: 74vh;
        min-height: 560px;
    }

    .hero-control {
        display: none;
    }

    .hero-search,
    .search-page-form {
        grid-template-columns: 1fr;
    }

    .section-head,
    .catalog-tools {
        align-items: start;
        flex-direction: column;
    }

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

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

@media (max-width: 640px) {
    .hero-carousel {
        min-height: 620px;
    }

    .hero-copy h1,
    .detail-copy h1,
    .page-hero h1 {
        font-size: 2.35rem;
    }

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

    .poster-wrap img {
        height: 14rem;
    }

    .movie-card .p-4 {
        padding: 0.85rem;
    }

    .detail-hero {
        min-height: auto;
    }

    .player-shell {
        border-radius: 1rem;
    }
}
