:root {
    --rose: #f43f5e;
    --rose-dark: #e11d48;
    --pink: #ec4899;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f9fafb;
    --card: #ffffff;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

body {
    min-height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #fff7f9 42%, #ffffff 100%);
    color: var(--ink);
}

body.is-menu-open {
    overflow: hidden;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.logo-icon {
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.16), rgba(236, 72, 153, 0.16));
    box-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.18);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link,
.mobile-link {
    font-size: 0.95rem;
    font-weight: 700;
    color: #374151;
    transition: color 0.25s ease;
}

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

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

.mobile-toggle span {
    display: block;
    width: 1.15rem;
    height: 2px;
    background: var(--rose);
    border-radius: 999px;
}

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

.mobile-menu.is-open {
    display: grid;
    gap: 0.75rem;
}

.hero-carousel {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: #111827;
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.05) contrast(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 22%, rgba(244, 63, 94, 0.32), transparent 26%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.72) 45%, rgba(17, 24, 39, 0.18)),
        linear-gradient(0deg, rgba(17, 24, 39, 0.66), transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: min(760px, calc(100% - 2rem));
    height: 100%;
    margin-left: max(1rem, calc((100vw - 80rem) / 2 + 2rem));
    color: #ffffff;
}

.hero-label,
.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
    border-radius: 999px;
    background: rgba(244, 63, 94, 0.16);
    color: #fb7185;
    padding: 0.42rem 0.85rem;
    font-size: 0.86rem;
    font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
    max-width: 780px;
    font-size: clamp(2.2rem, 5vw, 4.85rem);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.06em;
    text-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.hero-content h2 + p,
.hero-content h1 + h2 + p {
    margin-top: 1rem;
}

.hero-content p {
    max-width: 680px;
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.08rem;
    line-height: 1.85;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.55rem;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.42);
    color: #ffffff;
    padding: 0.55rem 1.45rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    transition: transform 0.25s ease, background 0.25s ease;
}

.btn-ghost:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 3rem;
    height: 3rem;
    transform: translateY(-50%);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 2.5rem;
    line-height: 1;
    backdrop-filter: blur(12px);
    transition: background 0.25s ease, transform 0.25s ease;
}

.hero-arrow:hover {
    background: rgba(244, 63, 94, 0.85);
    transform: translateY(-50%) scale(1.04);
}

.hero-prev {
    left: 2rem;
}

.hero-next {
    right: 2rem;
}

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

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

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

.intro-panel,
.page-hero,
.filter-panel,
.category-overview,
.detail-layout,
.player-section,
.detail-content {
    margin-top: 2.5rem;
}

.intro-panel {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 430px);
    gap: 1.5rem;
    align-items: center;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.intro-panel h2,
.page-hero h1,
.category-overview h2,
.player-section h2,
.content-card h2 {
    font-size: clamp(1.75rem, 3vw, 2.65rem);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.intro-panel p,
.page-hero p,
.category-overview p,
.content-card p {
    margin-top: 0.65rem;
    color: var(--muted);
    line-height: 1.85;
}

.quick-search,
.filter-row {
    display: flex;
    gap: 0.85rem;
}

.quick-search input,
.filter-row input,
.filter-row select {
    min-height: 3rem;
    border: 1px solid var(--line);
    border-radius: 0.85rem;
    background: #ffffff;
    padding: 0 1rem;
    color: var(--ink);
    outline: none;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.quick-search input,
.filter-row input {
    flex: 1;
}

.quick-search input:focus,
.filter-row input:focus,
.filter-row select:focus {
    border-color: rgba(244, 63, 94, 0.6);
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.1);
}

.section-block {
    margin-top: 3.5rem;
}

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

.section-head .section-title,
.section-head h2 {
    margin: 0;
    text-align: left;
}

.section-head a {
    color: var(--rose);
    font-weight: 800;
}

.section-head.light h2,
.section-head.light a {
    color: #ffffff;
}

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

.category-card {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    border-radius: 1.2rem;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #ffffff;
    background: #111827;
    box-shadow: var(--shadow);
    isolation: isolate;
}

.category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: var(--category-bg);
    background-size: cover;
    background-position: center;
    filter: saturate(1.05);
    transform: scale(1.06);
    transition: transform 0.35s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.08), rgba(17, 24, 39, 0.86));
}

.category-card:hover::before {
    transform: scale(1.12);
}

.category-card span {
    font-size: 1.3rem;
    font-weight: 900;
}

.category-card p {
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
    line-height: 1.6;
}

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

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

.movie-card {
    position: relative;
    border: 1px solid rgba(229, 231, 235, 0.72);
}

.movie-card.is-hidden {
    display: none;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5.25;
    overflow: hidden;
    background: #111827;
}

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

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

.play-mark {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    background: rgba(244, 63, 94, 0.92);
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(244, 63, 94, 0.36);
}

.rank-badge {
    position: absolute;
    left: 0.75rem;
    top: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    border-radius: 0.65rem;
    background: rgba(17, 24, 39, 0.78);
    color: #ffffff;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.movie-body {
    padding: 0.9rem;
}

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.movie-meta span,
.detail-meta span {
    border-radius: 999px;
    background: #fff1f3;
    color: #be123c;
    padding: 0.18rem 0.55rem;
    font-weight: 800;
}

.movie-body h3 {
    margin-top: 0.65rem;
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 900;
}

.movie-body h3 a:hover {
    color: var(--rose);
}

.movie-body p {
    display: -webkit-box;
    min-height: 3.9em;
    margin-top: 0.45rem;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.55;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.75rem;
}

.tag-row span,
.detail-tags a {
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.rank-band {
    margin-top: 3.5rem;
    padding: 3.5rem 0;
    background:
        radial-gradient(circle at top left, rgba(244, 63, 94, 0.3), transparent 30%),
        linear-gradient(135deg, #111827 0%, #1f2937 62%, #881337 100%);
}

.page-main {
    padding-bottom: 2rem;
}

.page-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 230px;
    border-radius: 1.5rem;
    background:
        radial-gradient(circle at top right, rgba(244, 63, 94, 0.22), transparent 34%),
        linear-gradient(135deg, #ffffff, #fff1f3);
    box-shadow: var(--shadow);
    padding: 2rem;
}

.small-hero,
.rank-hero,
.search-hero {
    display: block;
}

.filter-panel {
    border-radius: 1.4rem;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
    padding: 1.25rem;
}

.filter-row {
    margin-bottom: 1.25rem;
}

.filter-row.wide {
    grid-template-columns: 1fr 180px 160px;
}

.empty-state {
    display: none;
    margin-top: 1.25rem;
    border-radius: 1rem;
    background: #fff1f3;
    color: #be123c;
    padding: 1rem;
    text-align: center;
    font-weight: 800;
}

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

.category-overview {
    border-radius: 1.4rem;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
    padding: 1.25rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1.5rem;
    color: var(--muted);
    font-size: 0.92rem;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(230px, 320px) 1fr;
    gap: 2rem;
    align-items: stretch;
}

.detail-poster {
    aspect-ratio: 4 / 5.25;
}

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

.detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 1.5rem;
    background:
        radial-gradient(circle at top right, rgba(244, 63, 94, 0.18), transparent 32%),
        #ffffff;
    box-shadow: var(--shadow);
    padding: 2rem;
}

.detail-info h1 {
    font-size: clamp(2rem, 4.3vw, 4rem);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.detail-one-line {
    margin-top: 1rem;
    color: #374151;
    font-size: 1.1rem;
    line-height: 1.85;
}

.detail-meta {
    margin-top: 1rem;
}

.detail-tags {
    margin: 1rem 0 1.4rem;
}

.player-section h2 {
    margin-bottom: 1rem;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 1.4rem;
    background: #030712;
    box-shadow: 0 24px 60px rgba(3, 7, 18, 0.35);
    aspect-ratio: 16 / 9;
}

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

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 0.7rem;
    align-content: center;
    background: linear-gradient(180deg, rgba(3, 7, 18, 0.36), rgba(3, 7, 18, 0.8));
    color: #ffffff;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-cover span {
    display: grid;
    place-items: center;
    width: 5rem;
    height: 5rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--rose), var(--pink));
    box-shadow: 0 20px 48px rgba(244, 63, 94, 0.42);
    font-size: 2.1rem;
    padding-left: 0.25rem;
}

.play-cover strong {
    font-size: 1.15rem;
}

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

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

.content-card {
    padding: 1.4rem;
}

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

@media (max-width: 1180px) {
    .movie-grid,
    .compact-grid,
    .search-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .mobile-toggle {
        display: flex;
    }

    .hero-carousel {
        min-height: 520px;
    }

    .hero-content {
        margin-left: 1rem;
        padding-right: 1rem;
    }

    .hero-arrow {
        display: none;
    }

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

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

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

    .page-hero {
        display: block;
    }

    .page-hero .btn-primary {
        margin-top: 1rem;
    }

    .filter-row,
    .quick-search {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .header-inner {
        height: 64px;
    }

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

    .hero-carousel {
        min-height: 520px;
    }

    .hero-content p {
        font-size: 0.98rem;
    }

    .hero-dots {
        bottom: 1rem;
    }

    .intro-panel,
    .page-hero,
    .filter-panel,
    .category-overview,
    .detail-info {
        border-radius: 1.1rem;
        padding: 1rem;
    }

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

    .movie-body {
        padding: 0.75rem;
    }

    .movie-body p {
        min-height: 3.1em;
        -webkit-line-clamp: 2;
    }

    .detail-layout {
        gap: 1rem;
    }

    .play-cover span {
        width: 4rem;
        height: 4rem;
    }
}
