:root {
    --lava-50: #fff7ed;
    --lava-100: #ffedd5;
    --lava-500: #f97316;
    --lava-600: #ea580c;
    --lava-700: #c2410c;
    --ember-500: #d97706;
    --volcanic-50: #fafafa;
    --volcanic-100: #f4f4f5;
    --volcanic-200: #e4e4e7;
    --volcanic-300: #d4d4d8;
    --volcanic-500: #71717a;
    --volcanic-600: #52525b;
    --volcanic-700: #3f3f46;
    --volcanic-800: #27272a;
    --volcanic-900: #18181b;
    --surface: #ffffff;
    --shadow-soft: 0 20px 50px rgba(24, 24, 27, 0.12);
    --shadow-card: 0 12px 32px rgba(24, 24, 27, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--volcanic-900);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(180deg, var(--volcanic-50), var(--volcanic-100));
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

img,
video {
    max-width: 100%;
    height: auto;
}

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.container-custom {
    width: min(100% - 2rem, 1280px);
    margin-inline: auto;
}

.section-spacing {
    padding: 4rem 0;
}

.bg-white {
    background: #ffffff;
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    transition: background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    color: #ffffff;
}

.site-header.is-scrolled,
.site-header.solid-header {
    background: rgba(255, 255, 255, 0.95);
    color: var(--volcanic-900);
    box-shadow: 0 10px 30px rgba(24, 24, 27, 0.08);
    backdrop-filter: blur(14px);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 1.5rem;
}

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

.logo-mark {
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 0.8rem;
    background: linear-gradient(135deg, var(--lava-600), var(--ember-500));
    color: #fff;
    box-shadow: 0 12px 22px rgba(234, 88, 12, 0.34);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.main-nav a {
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    color: currentColor;
    font-weight: 650;
    opacity: 0.88;
    transition: background 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
    opacity: 1;
    background: rgba(249, 115, 22, 0.14);
    color: var(--lava-600);
}

.mobile-toggle {
    display: none;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: currentColor;
    width: 2.7rem;
    height: 2.7rem;
}

.mobile-toggle span {
    display: block;
    width: 1.25rem;
    height: 2px;
    margin: 0.24rem auto;
    background: currentColor;
    border-radius: 999px;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border-radius: 0.65rem;
    padding: 0.85rem 1.25rem;
    font-weight: 750;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
    background: var(--lava-600);
    color: #ffffff;
    box-shadow: 0 16px 30px rgba(234, 88, 12, 0.32);
}

.btn-primary:hover {
    background: var(--lava-700);
    transform: translateY(-2px) scale(1.02);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover,
.btn-ghost:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(24, 24, 27, 0.14);
}

.btn-ghost {
    background: #ffffff;
    color: var(--volcanic-800);
    box-shadow: 0 10px 24px rgba(24, 24, 27, 0.08);
}

.hero-section {
    position: relative;
    min-height: 88vh;
    overflow: hidden;
    background: #050505;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 82%, rgba(234, 88, 12, 0.48), transparent 32%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.48) 42%, rgba(0, 0, 0, 0.16));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    min-height: 88vh;
    padding: 8rem 0 5rem;
    color: #ffffff;
}

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

.hero-copy {
    max-width: 760px;
    animation: fadeIn 0.6s ease both;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 0.45rem 0.8rem;
    margin-bottom: 1.1rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.hero-title {
    margin: 0 0 1rem;
    font-size: clamp(2.5rem, 8vw, 5.8rem);
    line-height: 0.95;
    letter-spacing: -0.07em;
    text-shadow: 0 22px 44px rgba(0, 0, 0, 0.45);
}

.hero-desc {
    margin: 0 0 1.6rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    max-width: 680px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.hero-dots {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 1.4rem;
}

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

.hero-dot.is-active {
    width: 2.1rem;
    background: var(--lava-500);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.38);
    color: #ffffff;
    transition: transform 0.25s ease, background 0.25s ease;
}

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

.hero-arrow.prev {
    left: 1rem;
    transform: translateY(-50%);
}

.hero-arrow.prev:hover {
    transform: translateY(-50%) scale(1.08);
}

.hero-arrow.next {
    right: 1rem;
    transform: translateY(-50%);
}

.hero-arrow.next:hover {
    transform: translateY(-50%) scale(1.08);
}

.search-panel {
    position: relative;
    z-index: 4;
    margin-top: -2rem;
}

.search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    padding: 1rem;
    border-radius: 1.35rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
}

.search-box input,
.filter-box input,
.filter-box select {
    width: 100%;
    border: 1px solid var(--volcanic-200);
    border-radius: 0.9rem;
    background: #ffffff;
    padding: 0.9rem 1rem;
    outline: none;
    transition: border 0.25s ease, box-shadow 0.25s ease;
}

.search-box input:focus,
.filter-box input:focus,
.filter-box select:focus {
    border-color: var(--lava-500);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.search-results {
    display: none;
    margin-top: 1rem;
    border-radius: 1.1rem;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.search-results.is-open {
    display: block;
}

.search-result-item {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 0.85rem;
    padding: 0.85rem;
    border-bottom: 1px solid var(--volcanic-100);
}

.search-result-item:last-child {
    border-bottom: 0;
}

.search-result-item img {
    width: 58px;
    height: 76px;
    object-fit: cover;
    border-radius: 0.65rem;
}

.section-heading {
    margin-bottom: 2rem;
}

.section-heading h1,
.section-heading h2 {
    margin: 0 0 0.65rem;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.text-gradient-lava {
    background: linear-gradient(90deg, var(--lava-700), var(--lava-500), var(--ember-500));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-heading p {
    margin: 0;
    max-width: 760px;
    color: var(--volcanic-600);
    font-size: 1.05rem;
}

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: var(--shadow-card);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-0.35rem);
    box-shadow: 0 24px 54px rgba(24, 24, 27, 0.18);
}

.card-poster {
    position: relative;
    height: 15rem;
    overflow: hidden;
    background: var(--volcanic-100);
}

.large-cards .card-poster {
    height: 24rem;
}

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

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

.card-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.14));
    transition: opacity 0.3s ease;
}

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

.play-badge {
    position: absolute;
    inset: 50% auto auto 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 4rem;
    height: 4rem;
    border-radius: 999px;
    background: var(--lava-600);
    color: #ffffff;
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.movie-card:hover .play-badge {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-meta-over {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    opacity: 0;
    transform: translateY(0.5rem);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.chip,
.card-meta-over span,
.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.card-meta-over span {
    background: rgba(234, 88, 12, 0.92);
    color: #ffffff;
}

.card-body {
    padding: 1rem;
}

.card-body h3 {
    margin: 0 0 0.45rem;
    font-size: 1.08rem;
    line-height: 1.35;
    letter-spacing: -0.02em;
    transition: color 0.2s ease;
}

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

.card-body p {
    display: -webkit-box;
    margin: 0;
    color: var(--volcanic-600);
    font-size: 0.92rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.8rem;
}

.tag {
    background: var(--volcanic-100);
    color: var(--volcanic-600);
}

.horizontal-row {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.horizontal-row::-webkit-scrollbar {
    display: none;
}

.horizontal-row .movie-card {
    flex: 0 0 18rem;
    scroll-snap-align: start;
}

.scroll-controls {
    display: flex;
    gap: 0.5rem;
}

.scroll-controls button {
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 999px;
    background: #ffffff;
    color: var(--volcanic-700);
    box-shadow: var(--shadow-card);
    transition: background 0.25s ease, transform 0.25s ease;
}

.scroll-controls button:hover {
    background: var(--lava-50);
    transform: translateY(-2px);
}

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

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

.category-card {
    position: relative;
    display: block;
    min-height: 12rem;
    padding: 1.35rem;
    overflow: hidden;
    border-radius: 1.1rem;
    background: linear-gradient(135deg, #ffffff, var(--lava-50));
    box-shadow: var(--shadow-card);
}

.category-card::before {
    content: "";
    position: absolute;
    right: -2rem;
    bottom: -2rem;
    width: 9rem;
    height: 9rem;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.16);
}

.category-card h2,
.category-card h3 {
    position: relative;
    margin: 0 0 0.55rem;
    font-size: 1.35rem;
}

.category-card p {
    position: relative;
    margin: 0 0 1rem;
    color: var(--volcanic-600);
}

.category-card span {
    position: relative;
    color: var(--lava-700);
    font-weight: 800;
}

.page-hero {
    padding: 8.5rem 0 4rem;
    color: #ffffff;
    background:
        radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.4), transparent 30%),
        linear-gradient(135deg, var(--volcanic-800), var(--volcanic-900));
}

.page-hero h1 {
    margin: 0 0 0.8rem;
    max-width: 980px;
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.page-hero p {
    margin: 0;
    max-width: 780px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.1rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.76);
    font-weight: 650;
}

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

.filter-box {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 1rem;
    padding: 1rem;
    margin: -2rem auto 2rem;
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-soft);
}

.rank-list {
    display: grid;
    gap: 1rem;
}

.rank-item {
    display: grid;
    grid-template-columns: 4.5rem 8rem 1fr auto;
    gap: 1.2rem;
    align-items: center;
    padding: 1rem;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.rank-number {
    font-size: 2rem;
    font-weight: 900;
    color: var(--lava-600);
    text-align: center;
}

.rank-item img {
    width: 8rem;
    height: 6rem;
    object-fit: cover;
    border-radius: 0.8rem;
}

.rank-info h2,
.rank-info h3 {
    margin: 0 0 0.35rem;
    font-size: 1.3rem;
}

.rank-info p {
    margin: 0;
    color: var(--volcanic-600);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
    gap: 2rem;
}

.player-card {
    overflow: hidden;
    border-radius: 1rem;
    background: #000000;
    box-shadow: var(--shadow-soft);
}

.video-player {
    position: relative;
    background: #000000;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.32);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-start {
    display: grid;
    place-items: center;
    width: 5.25rem;
    height: 5.25rem;
    border: 0;
    border-radius: 999px;
    background: var(--lava-600);
    color: #ffffff;
    box-shadow: 0 16px 40px rgba(234, 88, 12, 0.4);
    transition: transform 0.25s ease, background 0.25s ease;
}

.player-start:hover {
    background: var(--lava-700);
    transform: scale(1.08);
}

.player-message {
    display: none;
    position: absolute;
    inset: auto 1rem 1rem 1rem;
    border-radius: 0.8rem;
    background: rgba(0, 0, 0, 0.72);
    color: #ffffff;
    padding: 0.85rem 1rem;
    text-align: center;
}

.player-message.is-visible {
    display: block;
}

.detail-main {
    padding: 1.6rem;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.detail-main h2,
.sidebar-card h2 {
    margin: 0 0 1rem;
    font-size: 1.55rem;
}

.detail-main p {
    color: var(--volcanic-700);
}

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

.detail-meta .chip {
    background: var(--lava-50);
    color: var(--lava-700);
}

.sidebar-card {
    padding: 1.2rem;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

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

.related-item {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0.8rem;
    align-items: center;
}

.related-item img {
    width: 5.5rem;
    height: 4.2rem;
    object-fit: cover;
    border-radius: 0.7rem;
}

.related-item strong {
    display: block;
    line-height: 1.35;
}

.related-item span {
    color: var(--volcanic-500);
    font-size: 0.86rem;
}

.site-footer {
    margin-top: 3rem;
    padding: 3rem 0;
    color: var(--volcanic-300);
    background: var(--volcanic-900);
}

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

.footer-grid h2,
.footer-grid h3 {
    color: #ffffff;
    margin: 0 0 0.8rem;
}

.footer-grid p {
    margin: 0;
    max-width: 560px;
}

.footer-links {
    display: grid;
    gap: 0.5rem;
}

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

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--volcanic-400);
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@media (max-width: 820px) {
    .main-nav {
        position: absolute;
        top: 72px;
        left: 1rem;
        right: 1rem;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 0.8rem;
        border-radius: 1rem;
        background: rgba(255, 255, 255, 0.98);
        color: var(--volcanic-900);
        box-shadow: var(--shadow-soft);
    }

    .main-nav.is-open {
        display: flex;
    }

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero-arrow {
        display: none;
    }

    .search-box,
    .filter-box,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .split-heading {
        align-items: flex-start;
    }

    .split-heading {
        display: grid;
    }

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

    .rank-item {
        grid-template-columns: 3.5rem 6.5rem 1fr;
    }

    .rank-item .btn-ghost {
        grid-column: 2 / -1;
    }
}

@media (max-width: 560px) {
    .container-custom {
        width: min(100% - 1rem, 1280px);
    }

    .section-spacing {
        padding: 3rem 0;
    }

    .hero-section,
    .hero-content {
        min-height: 78vh;
    }

    .hero-content {
        padding: 7rem 0 3.5rem;
    }

    .grid-cards,
    .grid-cards.large-cards,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 3rem 1fr;
    }

    .rank-item img {
        grid-column: 1 / -1;
        width: 100%;
        height: 12rem;
    }

    .rank-item .btn-ghost {
        grid-column: 1 / -1;
    }

    .card-poster,
    .large-cards .card-poster {
        height: 18rem;
    }
}
