:root {
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-50: #eff6ff;
    --red-600: #dc2626;
    --yellow-500: #eab308;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --slate-800: #1e293b;
    --white: #ffffff;
    --shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--gray-50);
    color: var(--gray-900);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(14px);
}

.header-inner {
    width: min(1280px, calc(100% - 32px));
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--gray-900);
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue-600), #0f172a);
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
}

.logo-text {
    font-size: 20px;
}

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

.nav-link,
.mobile-link {
    color: var(--gray-700);
    font-weight: 600;
    transition: color 0.2s ease;
}

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

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--gray-100);
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    padding: 10px 20px 18px;
    border-top: 1px solid var(--gray-200);
    background: var(--white);
}

.mobile-nav.is-open {
    display: grid;
    gap: 12px;
}

.main-content,
.page-main,
.detail-main {
    min-height: 70vh;
}

.hero {
    position: relative;
    height: 560px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3a8a, var(--slate-800));
}

.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;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.55), rgba(15, 23, 42, 0.25));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 70px;
    width: min(1280px, calc(100% - 32px));
    transform: translateX(-50%);
    color: var(--white);
}

.hero-content h1 {
    max-width: 820px;
    margin: 14px 0 18px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.75;
}

.hero-badges,
.detail-tags,
.hero-meta,
.detail-tag-row,
.tag-row,
.movie-meta-row,
.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-badges span,
.detail-tags span {
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--white);
    background: var(--blue-600);
    font-size: 13px;
    font-weight: 700;
}

.hero-badges span:first-child {
    background: var(--red-600);
}

.hero-meta {
    margin-bottom: 26px;
    color: #d1d5db;
    font-weight: 600;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0 26px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
    color: var(--white);
    background: var(--blue-600);
}

.primary-button:hover {
    background: var(--blue-700);
    transform: translateY(-1px);
}

.ghost-button {
    color: var(--white);
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.18);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.48);
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

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

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--white);
}

.section-narrow,
.detail-main {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.content-section,
.category-panel {
    padding: 56px 0;
}

.category-panel {
    width: min(1280px, calc(100% - 32px));
    margin: 30px auto;
    padding: 42px;
    border-radius: 28px;
    background: linear-gradient(90deg, var(--blue-50), #f8fafc);
}

.section-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 28px;
}

.section-heading.between {
    align-items: center;
    justify-content: space-between;
}

.section-heading h2 {
    margin: 0;
    color: var(--gray-900);
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.2;
    font-weight: 900;
}

.section-heading p {
    margin: 6px 0 0;
    color: var(--gray-600);
}

.section-icon {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: var(--white);
    background: var(--yellow-500);
    box-shadow: var(--shadow);
}

.text-link {
    color: var(--blue-600);
    font-weight: 800;
}

.movie-grid {
    display: grid;
    gap: 24px;
}

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

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

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

.movie-card-link {
    height: 100%;
    display: block;
    overflow: hidden;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.movie-card-large .poster-wrap {
    aspect-ratio: 16 / 10;
}

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

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

.poster-shadow {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.56), transparent 58%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card-link:hover .poster-shadow {
    opacity: 1;
}

.duration-pill,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.78);
    font-size: 12px;
    font-weight: 800;
}

.duration-pill {
    right: 12px;
    bottom: 12px;
    padding: 5px 9px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    background: var(--red-600);
}

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

.movie-card-body h3 {
    min-height: 48px;
    margin: 0 0 10px;
    color: var(--gray-900);
    font-size: 17px;
    line-height: 1.45;
    font-weight: 850;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

.movie-meta-row {
    justify-content: space-between;
    color: var(--gray-500);
    font-size: 13px;
}

.type-pill,
.tag-row span,
.detail-tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--blue-50);
    color: var(--blue-700);
    font-size: 12px;
    font-weight: 800;
}

.tag-row,
.detail-tag-row {
    margin-top: 14px;
}

.movie-card-compact .movie-card-link {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    align-items: stretch;
}

.movie-card-compact .poster-wrap {
    height: 100%;
    min-height: 128px;
}

.movie-card-compact .movie-card-body h3 {
    min-height: auto;
}

.movie-card-compact .movie-card-body p {
    min-height: auto;
}

.rank-list {
    display: grid;
    gap: 16px;
}

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

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: 22px;
    background: #0f172a;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 190px;
    object-fit: cover;
    opacity: 0.72;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.86), rgba(15, 23, 42, 0.1));
}

.category-title,
.category-desc {
    position: absolute;
    left: 20px;
    right: 20px;
    color: var(--white);
}

.category-title {
    bottom: 58px;
    font-size: 21px;
    font-weight: 900;
}

.category-desc {
    bottom: 20px;
    color: #d1d5db;
    font-size: 13px;
    line-height: 1.5;
}

.page-hero {
    background: linear-gradient(135deg, #172554, #0f172a 58%, #1e293b);
    color: var(--white);
}

.slim-hero {
    padding: 72px 0;
}

.slim-hero > div {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 12px;
    color: #93c5fd;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-hero h1 {
    max-width: 820px;
    margin: 0 0 14px;
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 950;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #d1d5db;
    font-size: 18px;
    line-height: 1.8;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 14px;
    margin-bottom: 24px;
}

.filter-input,
.filter-select {
    min-height: 48px;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    background: var(--white);
    color: var(--gray-900);
    outline: none;
    padding: 0 16px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.filter-input:focus,
.filter-select:focus {
    border-color: var(--blue-600);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.empty-state {
    display: none;
    margin: 24px 0;
    padding: 22px;
    border-radius: 18px;
    background: var(--white);
    color: var(--gray-600);
    text-align: center;
    box-shadow: var(--shadow);
}

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

.breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 28px 0 18px;
    color: var(--gray-600);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--blue-600);
    font-weight: 800;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
    gap: 32px;
    align-items: start;
    margin-bottom: 44px;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.22), rgba(0, 0, 0, 0.52));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: var(--blue-600);
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.36);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.play-button:hover {
    background: var(--blue-700);
    transform: scale(1.05);
}

.play-button span {
    margin-left: 5px;
    font-size: 32px;
}

.detail-info {
    padding: 30px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.detail-info h1 {
    margin: 16px 0;
    color: var(--gray-900);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.detail-lead {
    color: var(--gray-600);
    font-size: 16px;
    line-height: 1.8;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.detail-meta-grid div {
    min-height: 72px;
    padding: 14px;
    border-radius: 16px;
    background: var(--gray-50);
}

.detail-meta-grid strong,
.detail-meta-grid span {
    display: block;
}

.detail-meta-grid strong {
    margin-bottom: 4px;
    color: var(--gray-500);
    font-size: 12px;
}

.detail-meta-grid span {
    color: var(--gray-900);
    font-weight: 850;
}

.detail-section {
    margin: 0 0 42px;
    padding: 34px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.detail-section h2 {
    margin: 0 0 14px;
    font-size: 28px;
    font-weight: 900;
}

.detail-section p {
    margin: 0;
    color: var(--gray-700);
    font-size: 16px;
    line-height: 1.9;
}

.site-footer {
    margin-top: 58px;
    background: var(--gray-900);
    color: #d1d5db;
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 22px;
    align-items: center;
}

.footer-brand p {
    max-width: 520px;
    margin: 10px 0 0;
    color: #9ca3af;
    line-height: 1.7;
}

.footer-logo {
    color: var(--white);
    font-size: 20px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: flex-end;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-copy {
    grid-column: 1 / -1;
    margin: 10px 0 0;
    color: #9ca3af;
    font-size: 14px;
}

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

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

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

    .menu-button {
        display: block;
    }

    .hero {
        height: 520px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-content {
        bottom: 56px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .section-heading.between,
    .footer-inner {
        grid-template-columns: 1fr;
        display: grid;
        justify-content: start;
    }

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

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

    .movie-card-compact .movie-card-link {
        grid-template-columns: 150px minmax(0, 1fr);
    }

    .footer-links {
        justify-content: start;
    }
}

@media (max-width: 560px) {
    .header-inner {
        width: min(100% - 24px, 1280px);
    }

    .logo-text {
        font-size: 18px;
    }

    .hero {
        height: 520px;
    }

    .hero-content {
        width: min(100% - 28px, 1280px);
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
    }

    .content-section,
    .category-panel {
        padding: 36px 0;
    }

    .category-panel {
        padding: 28px 18px;
    }

    .four-cols,
    .three-cols,
    .category-grid,
    .large-category-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-compact .movie-card-link {
        grid-template-columns: 1fr;
    }

    .movie-card-body h3,
    .movie-card-body p {
        min-height: auto;
    }

    .detail-info,
    .detail-section {
        padding: 22px;
    }

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

    .play-button {
        width: 72px;
        height: 72px;
    }
}
