:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --soft: #e2e8f0;
    --cyan: #0891b2;
    --cyan-dark: #0e7490;
    --blue: #2563eb;
    --slate: #0f172a;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius: 1rem;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.nav-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 800;
    font-size: 1.22rem;
    color: var(--slate);
}

.logo-mark {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 24px rgba(8, 145, 178, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    color: #334155;
    font-weight: 650;
}

.desktop-nav a,
.mobile-nav a {
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: var(--cyan);
}

.mobile-toggle {
    display: none;
    width: 2.6rem;
    height: 2.6rem;
    border: 0;
    border-radius: 0.75rem;
    background: #f1f5f9;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.28rem;
}

.mobile-toggle span {
    width: 1.2rem;
    height: 2px;
    border-radius: 2px;
    background: #334155;
}

.mobile-nav {
    display: none;
    padding: 0.75rem 1rem 1rem;
    border-top: 1px solid var(--soft);
    background: #fff;
}

.mobile-nav a {
    display: block;
    padding: 0.75rem 0;
    color: #334155;
    font-weight: 650;
}

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

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 6rem;
    width: min(1180px, calc(100% - 2rem));
    transform: translateX(-50%);
    color: #fff;
}

.hero-content h1 {
    max-width: 720px;
    margin: 0 0 1rem;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 1.5rem;
    color: #e2e8f0;
    font-size: 1.15rem;
}

.hero-labels,
.detail-tags,
.card-tags,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.hero-labels {
    margin-bottom: 1rem;
}

.hero-labels span,
.detail-tags span,
.card-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 0.82rem;
    line-height: 1;
}

.hero-labels span {
    padding: 0.5rem 0.82rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.hero-labels span:first-child {
    background: var(--cyan);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    padding: 0.82rem 1.25rem;
    font-weight: 750;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #fff;
    background: var(--cyan);
    box-shadow: 0 14px 28px rgba(8, 145, 178, 0.25);
}

.btn-primary:hover {
    background: var(--cyan-dark);
}

.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 3.1rem;
    height: 3.1rem;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 2.2rem;
    line-height: 1;
    z-index: 4;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.28);
}

.hero-prev {
    left: 1rem;
}

.hero-next {
    right: 1rem;
}

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

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

.hero-dot.is-active {
    width: 2.15rem;
    background: #fff;
}

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 1.8rem;
    width: min(480px, calc(100% - 2rem));
    display: flex;
    transform: translateX(-50%) translateY(-3.2rem);
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    backdrop-filter: blur(12px);
    overflow: hidden;
    z-index: 5;
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 0.9rem 1rem;
    color: #fff;
    background: transparent;
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.hero-search button {
    border: 0;
    color: #fff;
    background: var(--cyan);
    padding: 0 1.25rem;
    font-weight: 750;
}

.content-section {
    padding: 4rem 0;
}

.section-light {
    background: #f8fafc;
}

.section-white {
    background: #fff;
}

.section-gradient {
    background: linear-gradient(135deg, #fff, #eff6ff 48%, #ecfeff);
}

.section-shell {
    width: min(1220px, calc(100% - 2rem));
    margin: 0 auto;
}

.section-heading {
    margin-bottom: 2rem;
}

.section-heading h2 {
    margin: 0 0 0.35rem;
    color: #1e293b;
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    line-height: 1.15;
    font-weight: 850;
}

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

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

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

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

.movie-card article {
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover article {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.card-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0f172a;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover .card-cover img {
    transform: scale(1.08);
}

.card-shade {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.18), transparent);
    transition: opacity 0.28s ease;
}

.movie-card:hover .card-shade {
    opacity: 1;
}

.card-play {
    width: 3.6rem;
    height: 3.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(255, 255, 255, 0.92);
    transform: scale(0.86);
    transition: transform 0.28s ease;
}

.movie-card:hover .card-play {
    transform: scale(1);
}

.card-badges {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    gap: 0.45rem;
}

.card-badges span,
.card-year {
    color: #fff;
    font-size: 0.75rem;
    line-height: 1;
    border-radius: 0.45rem;
    padding: 0.45rem 0.55rem;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
}

.card-badges span:first-child {
    background: var(--cyan);
}

.card-year {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
}

.card-body {
    padding: 1rem;
}

.card-body h3 {
    margin: 0 0 0.45rem;
    font-size: 1rem;
    color: #1e293b;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

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

.card-body p {
    min-height: 2.9rem;
    margin: 0 0 0.85rem;
    color: var(--muted);
    font-size: 0.92rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags span {
    padding: 0.34rem 0.55rem;
    color: #475569;
    background: #f1f5f9;
}

.scroll-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.3rem 0 1.1rem;
    scroll-snap-type: x proximity;
}

.scroll-row .wide-card {
    flex: 0 0 18rem;
    scroll-snap-align: start;
}

.category-stack {
    display: grid;
    gap: 3rem;
}

.category-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.category-block-head h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.35rem;
    color: #1e293b;
}

.category-block-head h3 span {
    width: 0.28rem;
    height: 1.5rem;
    border-radius: 1rem;
    background: var(--cyan);
}

.category-block-head a,
.section-more a {
    color: var(--cyan);
    font-weight: 750;
}

.section-more {
    margin-top: 1.5rem;
    text-align: center;
}

.rank-list {
    display: grid;
    gap: 0.7rem;
}

.rank-item {
    display: grid;
    grid-template-columns: auto 4rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.9rem;
    padding: 0.75rem;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.rank-num {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-weight: 850;
}

.rank-item img {
    width: 4rem;
    height: 2.65rem;
    object-fit: cover;
    border-radius: 0.6rem;
}

.rank-title {
    min-width: 0;
    overflow: hidden;
    color: #1e293b;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-meta {
    color: var(--muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.page-hero {
    position: relative;
    min-height: 320px;
    display: grid;
    place-items: center;
    padding: 4rem 1rem;
    color: #fff;
    text-align: center;
    background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.34), transparent 35%), linear-gradient(135deg, #020617, #0f172a 55%, #0e7490);
    overflow: hidden;
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -35% auto;
    width: 32rem;
    height: 32rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.25);
    filter: blur(45px);
}

.page-hero > div {
    position: relative;
    z-index: 2;
    max-width: 760px;
}

.page-hero span {
    display: inline-flex;
    margin-bottom: 0.85rem;
    padding: 0.42rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.page-hero h1 {
    margin: 0 0 0.8rem;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.08;
    font-weight: 900;
}

.page-hero p {
    margin: 0;
    color: #dbeafe;
    font-size: 1.08rem;
}

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

.channel-card {
    overflow: hidden;
    border-radius: 1.35rem;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.channel-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.channel-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 120px;
    background: #0f172a;
}

.channel-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.channel-info {
    padding: 1.2rem;
}

.channel-info span {
    color: var(--cyan);
    font-size: 0.85rem;
    font-weight: 800;
}

.channel-info h2 {
    margin: 0.25rem 0 0.4rem;
    color: #1e293b;
    font-size: 1.35rem;
}

.channel-info p {
    margin: 0;
    color: var(--muted);
}

.filter-panel {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.filter-panel h2 {
    margin: 0 0 0.2rem;
    font-size: 1.25rem;
    color: #1e293b;
}

.filter-panel p {
    margin: 0 0 1rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.filter-controls {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 0.8rem;
}

.filter-controls input,
.filter-controls select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.85rem;
    outline: 0;
    padding: 0.78rem 0.9rem;
    color: #1e293b;
    background: #fff;
}

.filter-controls input:focus,
.filter-controls select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}

.empty-state {
    display: none;
    margin: 1.5rem 0;
    padding: 2rem;
    border-radius: 1rem;
    color: var(--muted);
    text-align: center;
    background: #fff;
}

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

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

.rank-sidebar {
    position: sticky;
    top: 5.6rem;
    padding: 1rem;
    border-radius: 1.25rem;
    background: #f8fafc;
}

.rank-sidebar h2 {
    margin: 0 0 1rem;
    color: #1e293b;
}

.compact-rank .rank-item {
    grid-template-columns: auto minmax(0, 1fr);
}

.compact-rank img,
.compact-rank .rank-meta {
    display: none;
}

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

.detail-bg {
    position: absolute;
    inset: 0;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(14px) brightness(0.45);
    transform: scale(1.1);
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.55));
}

.detail-shell {
    position: relative;
    z-index: 2;
    width: min(1220px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2.5rem 0 4rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 2rem;
    color: #cbd5e1;
    font-size: 0.94rem;
}

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

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

.detail-poster {
    overflow: hidden;
    border-radius: 1.35rem;
    box-shadow: var(--shadow);
}

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

.detail-info h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    line-height: 1.05;
    font-weight: 900;
}

.detail-info p {
    max-width: 760px;
    margin: 0 0 1.2rem;
    color: #e2e8f0;
    font-size: 1.1rem;
}

.detail-meta {
    margin-bottom: 1rem;
    color: #cbd5e1;
}

.detail-tags {
    margin-bottom: 1.3rem;
}

.detail-tags span {
    padding: 0.42rem 0.68rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 1.5rem;
    align-items: start;
}

.player-card,
.story-card {
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.player-card {
    overflow: hidden;
}

.movie-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--cyan);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.34));
    z-index: 5;
}

.player-overlay span {
    width: 5rem;
    height: 5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
    font-size: 2rem;
}

.player-overlay.is-hidden {
    display: none;
}

.player-error {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 6;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    color: #fff;
    background: rgba(220, 38, 38, 0.88);
    text-align: center;
}

.story-card {
    padding: 1.35rem;
}

.story-card h2 {
    margin: 0 0 0.7rem;
    color: #1e293b;
    font-size: 1.25rem;
}

.story-card p {
    margin: 0 0 1.2rem;
    color: #475569;
}

.story-card p:last-child {
    margin-bottom: 0;
}

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

.footer-grid {
    width: min(1220px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 3rem 0 2rem;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 2rem;
}

.footer-logo {
    color: #fff;
    margin-bottom: 1rem;
}

.site-footer p {
    margin: 0;
    color: #94a3b8;
}

.site-footer h2 {
    margin: 0 0 1rem;
    color: #fff;
    font-size: 1rem;
}

.footer-links {
    display: grid;
    gap: 0.55rem;
}

.footer-links a {
    color: #94a3b8;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    width: min(1220px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.2rem 0 1.6rem;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

    .mobile-toggle {
        display: inline-flex;
    }

    .hero {
        height: 540px;
    }

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

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

    .rank-sidebar {
        position: static;
    }

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

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

    .footer-grid,
    .channel-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 680px) {
    .nav-shell {
        padding: 0.75rem 1rem;
    }

    .site-logo {
        font-size: 1.05rem;
    }

    .logo-mark {
        width: 2.25rem;
        height: 2.25rem;
    }

    .hero {
        height: 560px;
    }

    .hero-content {
        bottom: 8.5rem;
    }

    .hero-content h1 {
        font-size: 2.15rem;
    }

    .hero-arrow {
        display: none;
    }

    .hero-search {
        bottom: 2.1rem;
        transform: translateX(-50%);
    }

    .content-section {
        padding: 3rem 0;
    }

    .movie-grid,
    .compact-grid,
    .channel-grid,
    .footer-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

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

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

    .rank-item {
        grid-template-columns: auto 3.4rem minmax(0, 1fr);
    }

    .rank-meta {
        display: none;
    }
}
