:root {
    --page-bg: #f9fafb;
    --text-main: #111827;
    --text-soft: #6b7280;
    --brand: #2563eb;
    --brand-deep: #1e3a8a;
    --pink: #ec4899;
    --purple: #7c3aed;
    --card: #ffffff;
    --line: #e5e7eb;
    --dark: #111827;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text-main);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

img {
    display: block;
    width: 100%;
    height: auto;
}

.site-container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    backdrop-filter: blur(16px);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 900;
    color: var(--brand-deep);
    letter-spacing: 0.02em;
}

.site-logo::before,
.footer-logo::before {
    content: "";
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), var(--purple), var(--pink));
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-weight: 700;
    color: #374151;
}

.site-nav a,
.mobile-nav a {
    position: relative;
}

.site-nav a.active,
.site-nav a:hover,
.mobile-nav a.active,
.mobile-nav a:hover {
    color: var(--brand);
}

.site-nav a.active::after,
.site-nav a:hover::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -12px;
    height: 3px;
    border-radius: 999px;
    background: var(--brand);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #eff6ff;
    color: var(--brand);
    font-size: 22px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.mobile-nav a {
    display: block;
    padding: 12px 8px;
    font-weight: 800;
}

.hero-section {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: linear-gradient(135deg, #172554 0%, #4c1d95 48%, #831843 100%);
    color: #ffffff;
}

.hero-glow {
    position: absolute;
    z-index: 1;
    border-radius: 999px;
    filter: blur(72px);
    opacity: 0.32;
}

.hero-glow-one {
    width: 360px;
    height: 360px;
    left: 8%;
    top: 18%;
    background: #3b82f6;
}

.hero-glow-two {
    width: 420px;
    height: 420px;
    right: 7%;
    bottom: 9%;
    background: #ec4899;
}

.hero-slider {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    align-items: center;
    gap: 54px;
    opacity: 0;
    transform: translateY(18px);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.16;
    transform: scale(1.08);
}

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

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 720px;
    animation: fade-in 0.8s ease both;
}

.hero-kicker,
.detail-kicker,
.page-hero span,
.section-heading span {
    display: inline-flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #dbeafe;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 0 0 20px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 660px;
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.85;
}

.hero-tags,
.movie-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-tags span,
.movie-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span,
.detail-tags span {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

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

.btn-primary,
.btn-ghost,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 18px 32px rgba(37, 99, 235, 0.32);
}

.btn-primary:hover,
.btn-ghost:hover,
.text-link:hover {
    transform: translateY(-2px);
}

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

.hero-poster {
    position: relative;
    z-index: 3;
    display: block;
    width: min(380px, 100%);
    justify-self: end;
    overflow: hidden;
    border: 12px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

.hero-poster img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hero-poster:hover img {
    transform: scale(1.06);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 34px;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: -4px;
}

.hero-next {
    right: -4px;
}

.hero-dots {
    position: absolute;
    left: 0;
    bottom: 48px;
    z-index: 5;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
}

.hero-dot.is-active {
    width: 38px;
    background: #ffffff;
}

.search-panel {
    margin-top: -48px;
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr minmax(320px, 0.85fr);
    gap: 24px;
    align-items: center;
    padding: 24px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-panel h2 {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 950;
}

.search-panel p {
    margin: 0;
    color: var(--text-soft);
}

.search-controls {
    display: grid;
    grid-template-columns: 1fr 150px;
    gap: 12px;
}

.search-controls input,
.search-controls select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f9fafb;
    padding: 0 14px;
    color: var(--text-main);
    outline: none;
}

.search-controls input:focus,
.search-controls select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.section-block {
    margin-top: 64px;
}

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

.section-heading-left {
    align-items: start;
}

.section-heading span,
.page-hero span {
    background: #dbeafe;
    color: #1d4ed8;
}

.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-content h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 950;
    letter-spacing: -0.04em;
}

.section-heading a,
.text-link {
    color: var(--brand);
    font-weight: 900;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3a8a, #831843);
}

.movie-cover img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card:hover .movie-cover img {
    transform: scale(1.06);
    opacity: 0.86;
}

.movie-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.62);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

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

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 52px;
    color: #111827;
    font-size: 18px;
    font-weight: 950;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-title:hover {
    color: var(--brand);
}

.movie-meta {
    margin: 8px 0;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 700;
}

.movie-desc {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    margin: 0 0 12px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: 24px;
    background: #111827;
    color: #ffffff;
    box-shadow: var(--shadow);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.34;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

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

.category-tile span,
.category-tile em {
    position: relative;
    z-index: 2;
    display: block;
    padding: 0 22px;
}

.category-tile span {
    margin-top: 108px;
    font-size: 24px;
    font-style: normal;
    font-weight: 950;
}

.category-tile em {
    margin-top: 8px;
    color: #e5e7eb;
    font-size: 14px;
    font-style: normal;
    line-height: 1.7;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.ranking-card,
.ranking-page-card {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    padding: 22px;
    box-shadow: var(--shadow);
}

.ranking-card ol,
.ranking-page-card ol {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-link {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: #f9fafb;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-link:hover {
    background: #eff6ff;
    transform: translateX(4px);
}

.rank-num {
    grid-row: span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), var(--purple));
    color: #ffffff;
    font-weight: 950;
}

.rank-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 950;
}

.rank-info {
    color: var(--text-soft);
    font-size: 13px;
}

.page-main {
    padding-top: 42px;
    padding-bottom: 72px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 34px;
    padding: 56px;
    border-radius: 30px;
    background: linear-gradient(135deg, #dbeafe 0%, #f5d0fe 52%, #ffe4e6 100%);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    max-width: 800px;
}

.page-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    color: #4b5563;
    font-size: 17px;
    line-height: 1.8;
}

.category-search {
    margin-top: 0;
    margin-bottom: 36px;
}

.quick-filters {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-filter {
    min-height: 34px;
    border: 0;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--brand);
    padding: 0 13px;
    font-weight: 900;
}

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

.category-panel {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    padding: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.category-panel-cover {
    overflow: hidden;
    border-radius: 18px;
    background: #111827;
}

.category-panel-cover img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.category-panel h2 {
    margin: 8px 0 12px;
    font-size: 26px;
    font-weight: 950;
}

.category-panel p {
    margin: 0 0 18px;
    color: var(--text-soft);
    line-height: 1.8;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 700;
}

.breadcrumb a:hover {
    color: var(--brand);
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    margin-bottom: 34px;
    padding: 30px;
    border-radius: 30px;
    background: linear-gradient(135deg, #111827, #1e3a8a 46%, #581c87);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.detail-cover {
    overflow: hidden;
    border: 10px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    box-shadow: 0 24px 46px rgba(0, 0, 0, 0.32);
}

.detail-cover img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-kicker {
    background: rgba(255, 255, 255, 0.16);
}

.detail-info h1 {
    font-size: clamp(34px, 5vw, 60px);
}

.detail-one-line {
    margin: 18px 0;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.85;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.detail-meta span {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    padding: 0 12px;
    color: #ffffff;
    font-weight: 900;
}

.player-section {
    margin-bottom: 36px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    justify-content: center;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.64));
    color: #ffffff;
    text-align: center;
}

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

.play-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-size: 34px;
    box-shadow: 0 22px 50px rgba(37, 99, 235, 0.42);
}

.player-overlay strong {
    max-width: 70%;
    font-size: clamp(20px, 3vw, 32px);
    font-weight: 950;
}

.detail-content {
    display: grid;
    gap: 18px;
    margin-bottom: 34px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #ffffff;
    padding: 28px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.detail-content h2 {
    font-size: 28px;
}

.detail-content p {
    margin: 0;
    color: #374151;
    font-size: 17px;
    line-height: 1.95;
}

.site-footer {
    margin-top: 60px;
    background: #111827;
    color: #d1d5db;
}

.footer-grid {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    min-height: 150px;
}

.site-footer p {
    max-width: 620px;
    margin: 14px 0 0;
    color: #9ca3af;
    line-height: 1.8;
}

.footer-logo {
    color: #ffffff;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-weight: 800;
}

.footer-links a:hover {
    color: #93c5fd;
}

@keyframes fade-in {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .split-layout,
    .hero-slide,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        justify-self: start;
        width: 260px;
    }

    .category-panels {
        grid-template-columns: 1fr;
    }
}

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

    .site-nav {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

    .hero-section,
    .hero-slider {
        min-height: 760px;
    }

    .hero-slide {
        align-content: center;
        gap: 28px;
        padding: 30px 0 90px;
    }

    .hero-poster {
        width: 210px;
    }

    .hero-arrow {
        display: none;
    }

    .search-panel,
    .category-search {
        grid-template-columns: 1fr;
        margin-top: 20px;
    }

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

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

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

    .movie-title {
        font-size: 16px;
    }

    .page-hero,
    .detail-hero,
    .detail-content {
        padding: 22px;
        border-radius: 24px;
    }

    .category-panel {
        grid-template-columns: 116px 1fr;
    }

    .footer-grid {
        align-items: flex-start;
        flex-direction: column;
        padding: 28px 0;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .compact-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero-content p,
    .detail-one-line {
        font-size: 16px;
    }
}
