:root {
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --primary-800: #075985;
    --primary-900: #0c4a6e;
    --accent-50: #fffbeb;
    --accent-100: #fef3c7;
    --accent-400: #fbbf24;
    --accent-500: #f59e0b;
    --accent-600: #d97706;
    --neutral-50: #fafaf9;
    --neutral-100: #f5f5f4;
    --neutral-200: #e7e5e4;
    --neutral-300: #d6d3d1;
    --neutral-500: #78716c;
    --neutral-600: #57534e;
    --neutral-700: #44403c;
    --neutral-800: #292524;
    --neutral-900: #1c1917;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    color: var(--neutral-900);
    background: var(--neutral-50);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    line-height: 1.5;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, var(--primary-900), var(--primary-800));
    box-shadow: var(--shadow-md);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
    max-width: 80rem;
    padding: 0 1rem;
    margin: 0 auto;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    color: var(--primary-900);
    background: var(--accent-400);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.32);
}

.brand-text {
    font-size: 1.18rem;
}

.desktop-nav {
    display: none;
    align-items: center;
    gap: 1.4rem;
}

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

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

.mobile-menu-button {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem;
    border: 0;
    border-radius: 0.65rem;
    background: transparent;
}

.mobile-menu-button span {
    height: 2px;
    background: #fff;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 0.5rem 1rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: var(--primary-800);
}

.mobile-nav.is-open {
    display: grid;
    gap: 0.25rem;
}

.mobile-nav-link {
    display: block;
    padding: 0.65rem 0.75rem;
    border-radius: 0.75rem;
    font-weight: 600;
}

.mobile-nav-link:hover {
    background: var(--primary-700);
}

.hero-carousel {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: var(--neutral-900);
}

.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;
    filter: saturate(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0.05));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: min(80rem, 100%);
    padding: 2rem 1rem 3.5rem;
    transform: translateX(-50%);
    color: #fff;
}

.hero-kicker,
.eyebrow {
    margin-bottom: 0.75rem;
    color: var(--accent-400);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 48rem;
    margin: 0 0 1rem;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.05;
}

.hero-content p {
    max-width: 42rem;
    margin: 0 0 1.4rem;
    color: var(--neutral-200);
    font-size: 1.08rem;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

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

.hero-tags span,
.detail-tags span {
    padding: 0.32rem 0.72rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    padding: 0.75rem 1.35rem;
    border-radius: 0.75rem;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
    color: #fff;
    background: var(--accent-500);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.25);
}

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

.ghost-button {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.12);
}

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

.ghost-button.dark {
    color: var(--primary-800);
    border-color: var(--primary-100);
    background: #fff;
}

.hero-dots {
    position: absolute;
    right: 1.5rem;
    bottom: 1.5rem;
    display: flex;
    gap: 0.5rem;
}

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

.hero-dot.is-active {
    background: var(--accent-500);
    transform: scale(1.1);
}

.page-shell {
    max-width: 80rem;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.home-shell {
    display: grid;
    gap: 4rem;
}

.page-top {
    padding-top: 2rem;
}

.home-search-panel {
    background: #fff;
    border-bottom: 1px solid var(--neutral-200);
}

.home-search-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.home-search-inner h2 {
    margin: 0 0 0.25rem;
    font-size: 1.45rem;
}

.home-search-inner p {
    margin: 0 0 1rem;
    color: var(--neutral-600);
}

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

.section-heading > div {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.45rem, 3vw, 2rem);
    line-height: 1.2;
}

.section-heading p {
    max-width: 30rem;
    margin: 0;
    color: var(--neutral-600);
}

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.7rem;
    color: #fff;
    background: var(--accent-500);
}

.compact-heading {
    margin-bottom: 1rem;
}

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

.featured-grid,
.compact-grid,
.category-grid {
    align-items: stretch;
}

.movie-card {
    min-width: 0;
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-100), var(--accent-100));
}

.movie-card-wide .poster-wrap {
    aspect-ratio: 16 / 9;
}

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

.movie-card:hover .poster-wrap img {
    transform: scale(1.05);
}

.year-badge,
.rank-mark,
.play-chip {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.year-badge {
    top: 0.65rem;
    left: 0.65rem;
    padding: 0.2rem 0.55rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.62);
}

.rank-mark {
    top: 0.65rem;
    right: 0.65rem;
    min-width: 2rem;
    height: 2rem;
    color: var(--primary-900);
    background: var(--accent-400);
}

.play-chip {
    right: 0.65rem;
    bottom: 0.65rem;
    width: 2.25rem;
    height: 2.25rem;
    color: #fff;
    background: var(--primary-600);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-chip {
    opacity: 1;
    transform: translateY(0);
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.85rem;
}

.movie-card-body h3 {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--neutral-900);
    font-size: 1rem;
    line-height: 1.32;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-meta-line,
.movie-card-desc {
    margin: 0;
    color: var(--neutral-600);
    font-size: 0.86rem;
}

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

.tag-row {
    margin-top: auto;
}

.tag-row span {
    padding: 0.18rem 0.5rem;
    color: var(--primary-700);
    background: var(--primary-50);
}

.highlight-section,
.rank-section {
    padding: 1.5rem;
    border-radius: 1.2rem;
    background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
}

.scroll-row {
    display: flex;
    gap: 1rem;
    padding: 0.2rem 0.2rem 1rem;
    margin: 0 -0.2rem;
    overflow-x: auto;
}

.scroll-item {
    flex: 0 0 12rem;
}

.category-card-grid,
.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
}

.category-card,
.category-overview-card {
    display: block;
    min-height: 8rem;
    padding: 1.2rem;
    border: 1px solid var(--neutral-200);
    border-radius: 1rem;
    background: #fff;
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.category-overview-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-100);
    box-shadow: var(--shadow-xl);
}

.category-card strong,
.category-overview-card span {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--primary-700);
    font-size: 1.16rem;
}

.category-card span,
.category-overview-card p {
    margin: 0;
    color: var(--neutral-600);
}

.preview-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.preview-title h3 {
    margin: 0;
    font-size: 1.35rem;
}

.preview-title a {
    color: var(--primary-700);
    font-weight: 800;
}

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

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

.filter-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 1rem;
    margin: 0 0 1.5rem;
    border: 1px solid var(--neutral-200);
    border-radius: 1rem;
    background: #fff;
    box-shadow: var(--shadow-md);
}

.filter-input,
.filter-select {
    width: 100%;
    min-height: 2.8rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--neutral-200);
    border-radius: 0.75rem;
    color: var(--neutral-900);
    background: var(--neutral-50);
    outline: none;
}

.filter-input:focus,
.filter-select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14);
}

.page-hero {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-radius: 1.2rem;
    background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
}

.simple-page-hero,
.category-hero,
.rank-hero {
    border: 1px solid var(--neutral-200);
}

.page-hero h1 {
    margin: 0 0 0.65rem;
    font-size: clamp(2rem, 5vw, 3.3rem);
    line-height: 1.05;
}

.page-hero p:not(.eyebrow) {
    max-width: 48rem;
    margin: 0;
    color: var(--neutral-600);
    font-size: 1.05rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
    color: var(--neutral-600);
    font-size: 0.92rem;
}

.breadcrumb a {
    color: var(--primary-700);
    font-weight: 700;
}

.detail-page {
    display: grid;
    gap: 2rem;
}

.detail-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.2rem;
    border-radius: 1.2rem;
    background: linear-gradient(135deg, var(--primary-900), var(--primary-800));
    color: #fff;
    box-shadow: var(--shadow-xl);
}

.detail-poster {
    overflow: hidden;
    border-radius: 1rem;
    background: var(--neutral-900);
}

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

.detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-info h1 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.08;
}

.detail-one-line {
    max-width: 54rem;
    margin: 0 0 1rem;
    color: var(--neutral-200);
    font-size: 1.1rem;
}

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

.fact-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0;
    margin: 0 0 1.4rem;
    list-style: none;
}

.fact-list li {
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.08);
}

.fact-list span {
    display: block;
    color: var(--neutral-300);
    font-size: 0.78rem;
}

.fact-list strong {
    display: block;
    margin-top: 0.2rem;
    color: #fff;
}

.player-section,
.article-section {
    padding: 1.2rem;
    border: 1px solid var(--neutral-200);
    border-radius: 1.2rem;
    background: #fff;
    box-shadow: var(--shadow-md);
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    background: #000;
    aspect-ratio: 16 / 9;
}

.movie-video,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-video {
    background: #000;
}

.player-cover {
    border: 0;
    padding: 0;
    color: #fff;
    background: #000;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

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

.player-cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.2));
}

.player-play-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    border-radius: 999px;
    background: var(--accent-500);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    transform: translate(-50%, -50%);
    font-size: 2rem;
}

.article-section h2 {
    margin: 0 0 0.8rem;
    font-size: 1.45rem;
}

.article-section h2:not(:first-child) {
    margin-top: 1.6rem;
}

.article-section p {
    margin: 0 0 1rem;
    color: var(--neutral-700);
    line-height: 1.8;
}

.related-grid {
    margin-top: 1rem;
}

.site-footer {
    margin-top: 4rem;
    color: var(--neutral-300);
    background: var(--neutral-900);
}

.footer-inner {
    max-width: 80rem;
    padding: 3rem 1rem 2rem;
    margin: 0 auto;
}

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

.footer-brand {
    margin-bottom: 1rem;
    color: #fff;
    font-size: 1.05rem;
}

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

.site-footer p {
    margin: 0;
    color: var(--neutral-300);
}

.site-footer ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.site-footer li + li {
    margin-top: 0.45rem;
}

.site-footer a:hover {
    color: var(--accent-400);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: space-between;
    padding-top: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid var(--neutral-800);
    color: var(--neutral-500);
    font-size: 0.88rem;
}

.is-filter-hidden {
    display: none !important;
}

@media (min-width: 640px) {
    .filter-panel {
        grid-template-columns: 1fr 12rem 12rem;
    }

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

@media (min-width: 768px) {
    .site-header-inner {
        padding: 0 1.5rem;
    }

    .desktop-nav {
        display: flex;
    }

    .mobile-menu-button {
        display: none;
    }

    .hero-carousel {
        height: 600px;
    }

    .hero-content {
        padding: 3rem 2rem 4rem;
    }

    .page-shell,
    .home-search-inner,
    .footer-inner {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

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

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

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

    .page-hero {
        flex-direction: row;
        align-items: center;
        padding: 2.5rem;
    }

    .detail-hero {
        grid-template-columns: minmax(15rem, 22rem) 1fr;
        padding: 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
    }

    .footer-bottom {
        flex-direction: row;
    }
}

@media (min-width: 1024px) {
    .site-header-inner,
    .page-shell,
    .home-search-inner,
    .footer-inner {
        padding-left: 2rem;
        padding-right: 2rem;
    }

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

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

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

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