:root {
    color-scheme: light;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --cyan: #0891b2;
    --ink: #111827;
    --muted: #6b7280;
    --soft: #f8fafc;
    --line: #e5e7eb;
    --dark: #0f172a;
    --shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    backdrop-filter: blur(14px);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.nav-wrap,
.footer-wrap,
.section-wrap,
.hero-inner,
.page-hero-inner,
.detail-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.nav-inner {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: #111827;
}

.logo-mark {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: var(--blue);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

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

.nav-link {
    font-size: 14px;
    font-weight: 650;
    color: #374151;
    transition: color 0.2s ease;
}

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

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: #f3f4f6;
    padding: 9px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 999px;
    background: #374151;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    padding: 12px 0;
}

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

.mobile-link {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #374151;
    font-weight: 650;
}

.mobile-link:hover {
    background: #ecfeff;
    color: var(--cyan);
}

.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #111827;
}

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

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

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.04));
}

.hero-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 680px;
    color: #fff;
}

.kicker,
.type-badge,
.rank-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--blue);
    color: #fff;
    font-size: 12px;
    font-weight: 750;
    padding: 5px 10px;
}

.hero-copy h1 {
    margin: 18px 0 14px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
    font-weight: 850;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 620px;
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: 18px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
    color: #d1d5db;
}

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

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 12px;
    font-weight: 750;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.32);
}

.btn-primary:hover {
    background: var(--blue-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(10px);
}

.hero-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.48);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dots button {
    width: 16px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: #fff;
}

.content-section {
    padding: 56px 0;
    background: #fff;
}

.content-section.alt {
    background: #f8fafc;
}

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

.section-heading h2,
.page-hero h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.18;
    font-weight: 850;
    letter-spacing: -0.03em;
}

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

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

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

.card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: #e5e7eb;
}

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

.card-link:hover .poster-wrap img {
    transform: scale(1.1);
}

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.62));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.card-link:hover .poster-wrap::after {
    opacity: 1;
}

.type-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    border-radius: 8px;
}

.rank-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 2;
    background: #0f172a;
}

.play-float {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--blue);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.card-link:hover .play-float {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 0;
    min-height: 48px;
    color: #111827;
    font-size: 17px;
    line-height: 1.4;
    font-weight: 780;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-body p {
    margin: 10px 0 14px;
    min-height: 44px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #6b7280;
    font-size: 12px;
}

.meta-row span {
    max-width: 55%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 700;
    color: #4b5563;
}

.meta-row em {
    font-style: normal;
    white-space: nowrap;
    color: #9ca3af;
}

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 288px;
    gap: 24px;
    overflow-x: auto;
    padding: 4px 4px 22px;
    scrollbar-width: none;
}

.scroll-row::-webkit-scrollbar {
    display: none;
}

.compact-list {
    display: grid;
    gap: 14px;
}

.compact-card a {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    border-radius: 16px;
    background: #fff;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card a:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.compact-card img {
    width: 112px;
    height: 74px;
    border-radius: 12px;
    object-fit: cover;
}

.compact-card h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 780;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compact-card p {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-card span {
    color: #9ca3af;
    font-size: 12px;
}

.compact-rank {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--blue);
    font-weight: 850;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 168px;
    border-radius: 18px;
    background: #111827;
    color: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 168px;
    object-fit: cover;
    opacity: 0.62;
    transition: transform 0.45s ease;
}

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

.category-tile div {
    position: absolute;
    inset: auto 0 0 0;
    padding: 18px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
}

.category-tile h3 {
    margin: 0 0 6px;
    font-size: 21px;
    font-weight: 850;
}

.category-tile p {
    margin: 0;
    color: #d1d5db;
    font-size: 13px;
}

.page-hero {
    padding: 66px 0;
    background: linear-gradient(135deg, #2563eb, #0f172a);
    color: #fff;
}

.page-hero h1,
.page-hero p {
    color: #fff;
}

.page-hero p {
    max-width: 760px;
    color: #dbeafe;
    font-size: 18px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1.2fr) minmax(0, 2fr);
    gap: 16px;
    margin-bottom: 26px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    border-radius: 12px;
    background: #f3f4f6;
    padding: 0 14px;
}

.search-box input,
.filter-controls select {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #111827;
    font: inherit;
}

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

.filter-controls label {
    display: grid;
    gap: 4px;
    min-height: 48px;
    border-radius: 12px;
    background: #f3f4f6;
    padding: 6px 12px;
}

.filter-controls span {
    color: #6b7280;
    font-size: 12px;
    font-weight: 750;
}

.empty-state {
    display: none;
    margin: 26px 0;
    padding: 24px;
    border-radius: 16px;
    background: #fff;
    color: #6b7280;
    text-align: center;
}

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

.detail-hero {
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.25), transparent 35%), #111827;
    color: #fff;
    padding: 36px 0 56px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    color: #cbd5e1;
    font-size: 14px;
}

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

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

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #000;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.22), rgba(0, 0, 0, 0.52));
    color: #fff;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-overlay span {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #fff;
    color: var(--blue);
    font-size: 30px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
}

.player-message {
    margin-top: 12px;
    min-height: 24px;
    color: #cbd5e1;
    font-size: 14px;
}

.detail-side {
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    padding: 18px;
    backdrop-filter: blur(12px);
}

.detail-side img {
    width: 100%;
    height: 430px;
    border-radius: 16px;
    object-fit: cover;
}

.detail-side h1 {
    margin: 18px 0 10px;
    font-size: 30px;
    line-height: 1.22;
}

.detail-side p {
    margin: 0;
    color: #d1d5db;
}

.info-pills,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.info-pills span,
.tag-list span {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #e5e7eb;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 650;
}

.detail-content {
    padding: 54px 0;
}

.article-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) 340px;
    gap: 28px;
    align-items: start;
}

.text-panel,
.side-panel {
    border-radius: 20px;
    background: #fff;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.text-panel h2,
.side-panel h2 {
    margin: 0 0 16px;
    font-size: 24px;
    font-weight: 850;
}

.text-panel p {
    margin: 0 0 18px;
    color: #374151;
    font-size: 16px;
}

.light-tags span {
    background: #eff6ff;
    color: var(--blue);
}

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

[data-card].is-hidden {
    display: none;
}

.site-footer {
    background: #111827;
    color: #d1d5db;
    padding: 48px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 34px;
}

.footer-brand {
    color: #fff;
    margin-bottom: 14px;
}

.footer-main p,
.site-footer a,
.footer-bottom {
    color: #d1d5db;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 15px;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

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

.footer-bottom {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid #1f2937;
    font-size: 14px;
}

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

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

    .desktop-nav {
        gap: 14px;
    }

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

    .detail-side img {
        height: 360px;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero-slider {
        height: 520px;
    }

    .hero-arrow {
        display: none;
    }

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

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

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

@media (max-width: 560px) {
    .nav-wrap,
    .footer-wrap,
    .section-wrap,
    .hero-inner,
    .page-hero-inner,
    .detail-wrap {
        width: min(100% - 24px, 1180px);
    }

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

    .hero-slider {
        height: 500px;
    }

    .hero-copy p {
        font-size: 15px;
    }

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

    .poster-wrap {
        height: 230px;
    }

    .compact-card a {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .compact-rank {
        display: none;
    }

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

    .detail-side img {
        height: 300px;
    }

    .text-panel,
    .side-panel {
        padding: 22px;
    }
}
