:root {
    --site-primary: #2563eb;
    --site-primary-dark: #1d4ed8;
    --site-accent: #f97316;
    --site-night: #0f172a;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
}

.brand-mark {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--site-primary), var(--site-accent));
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

.brand-mark-light {
    background: linear-gradient(135deg, #60a5fa, #fb923c);
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--site-primary);
}

.search-input {
    width: 12rem;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
}

.search-input:focus {
    border-color: var(--site-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1rem;
}

.mobile-menu-button {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    border-radius: 0.5rem;
}

.mobile-menu-button span {
    width: 1.25rem;
    height: 2px;
    background: #374151;
    border-radius: 999px;
}

.mobile-menu {
    display: none;
    padding: 1rem 0;
    border-top: 1px solid #e5e7eb;
}

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

.mobile-search {
    margin-bottom: 0.75rem;
}

.mobile-search .search-input {
    width: 100%;
    padding-left: 1rem;
}

.mobile-nav-link {
    display: block;
    padding: 0.6rem 0;
    color: #374151;
    font-weight: 600;
}

.hero-carousel {
    background: #020617;
}

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

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

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
    backdrop-filter: blur(8px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 1rem;
}

.hero-next {
    right: 1rem;
}

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

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

.hero-dot.is-active {
    width: 2rem;
    background: #ffffff;
}

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

.section-heading h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    line-height: 1.15;
    font-weight: 800;
    color: #111827;
}

.section-heading a {
    color: var(--site-primary);
    font-weight: 700;
    white-space: nowrap;
}

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

.compact-card h3 {
    font-size: 1rem;
}

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

.category-tile,
.overview-card {
    display: block;
    border-radius: 1rem;
    background: #ffffff;
    padding: 1.25rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.overview-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
}

.category-tile strong,
.overview-body h2 {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.5rem;
}

.category-tile span,
.overview-body p {
    display: block;
    color: #6b7280;
    font-size: 0.92rem;
    line-height: 1.7;
}

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

.overview-thumbs img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 0.5rem;
    background: #e5e7eb;
}

.overview-body span {
    display: inline-flex;
    margin-top: 0.75rem;
    color: var(--site-primary);
    font-weight: 700;
}

.ranking-panel {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    align-self: start;
    position: sticky;
    top: 5rem;
}

.ranking-panel h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.ranking-row {
    display: grid;
    grid-template-columns: 2rem 4.5rem 1fr;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eef2f7;
}

.ranking-row:last-child {
    border-bottom: 0;
}

.ranking-number {
    width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--site-primary);
    font-weight: 800;
}

.ranking-row img {
    width: 4.5rem;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 0.5rem;
}

.ranking-title {
    font-weight: 700;
    color: #111827;
    min-width: 0;
}

.ranking-meta {
    grid-column: 3;
    color: #6b7280;
    font-size: 0.78rem;
    margin-top: -0.5rem;
}

.page-hero h1 {
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.page-hero p {
    max-width: 48rem;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.08rem;
    line-height: 1.8;
}

.breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.78);
}

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

.filter-panel {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.filter-input {
    flex: 1 1 260px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 0.7rem 1rem;
    outline: none;
}

.filter-input:focus {
    border-color: var(--site-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.filter-chip {
    border-radius: 999px;
    padding: 0.6rem 0.95rem;
    background: #f3f4f6;
    color: #374151;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
    background: var(--site-primary);
    color: #ffffff;
}

.filter-count {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.ranking-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.ranking-card a {
    display: grid;
    grid-template-columns: 3rem 10rem 1fr;
    gap: 1rem;
    align-items: center;
    background: #ffffff;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-card a:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.ranking-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 0.75rem;
}

.ranking-badge {
    width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--site-primary), var(--site-accent));
    color: #ffffff;
    font-weight: 800;
}

.ranking-card h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.4rem;
}

.ranking-card p {
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 0.45rem;
}

.ranking-card span:last-child {
    color: #6b7280;
    font-size: 0.9rem;
}

.movie-detail-hero {
    position: relative;
    min-height: 34rem;
    overflow: hidden;
    background: #020617;
    color: #ffffff;
}

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(4px) scale(1.04);
    opacity: 0.58;
}

.detail-bg-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.88));
}

.detail-hero-content {
    position: relative;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr);
    gap: 2rem;
    align-items: end;
}

.detail-cover {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 1.25rem;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.45);
}

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

.detail-one-line {
    max-width: 56rem;
    color: #e5e7eb;
    font-size: 1.15rem;
    line-height: 1.8;
}

.detail-meta,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.detail-meta span,
.detail-tags span {
    display: inline-flex;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    background: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    font-size: 0.86rem;
    backdrop-filter: blur(8px);
}

.player-shell {
    position: relative;
    background: #020617;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(15, 23, 42, 0.22);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: #ffffff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.25));
    z-index: 2;
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    width: 4.75rem;
    height: 4.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--site-primary);
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.45);
    font-size: 2rem;
    padding-left: 0.25rem;
}

.player-overlay strong {
    max-width: 80%;
    text-align: center;
    font-size: 1.2rem;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22rem;
    gap: 2rem;
    margin-top: 2rem;
}

.detail-content-card,
.detail-side-card {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.detail-content-card h2,
.detail-side-card h2 {
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #111827;
}

.detail-content-card p {
    color: #374151;
    line-height: 1.9;
    margin-bottom: 1.5rem;
}

.related-list {
    display: grid;
    gap: 0.8rem;
}

.related-card {
    display: grid;
    grid-template-columns: 6rem 1fr;
    gap: 0.75rem;
    align-items: center;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #edf2f7;
}

.related-card:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.related-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 0.65rem;
}

.related-card strong {
    display: block;
    color: #111827;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.related-card span {
    color: #6b7280;
    font-size: 0.86rem;
}

.search-page-form {
    display: flex;
    gap: 0.75rem;
    background: #ffffff;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.search-page-input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 0.8rem 1rem;
    outline: none;
}

.search-page-form button {
    border-radius: 999px;
    padding: 0.8rem 1.25rem;
    background: var(--site-primary);
    color: #ffffff;
    font-weight: 800;
}

.search-result-summary {
    margin: 1.5rem 0 1rem;
    color: #4b5563;
    font-weight: 700;
}

.search-results {
    display: grid;
    gap: 1rem;
}

.search-result-card {
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: 1rem;
    background: #ffffff;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.search-result-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 0.75rem;
}

.search-result-card h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.35rem;
}

.search-result-card p {
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 0.35rem;
}

.search-result-card span {
    color: #6b7280;
    font-size: 0.9rem;
}

.footer-link {
    color: #cbd5e1;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #60a5fa;
}

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

@media (max-width: 900px) {
    .detail-grid,
    .detail-content-grid,
    .ranking-card a {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        max-width: 18rem;
    }

    .ranking-panel {
        position: static;
    }
}

@media (max-width: 640px) {
    .hero-arrow {
        display: none;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .ranking-row {
        grid-template-columns: 2rem 4rem 1fr;
    }

    .search-page-form,
    .search-result-card {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .search-result-card {
        display: block;
    }

    .search-result-card img {
        margin-bottom: 1rem;
    }
}
