@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #ffffff;
    min-height: 100vh;
    position: relative;
    padding-bottom: 70px;
    overflow-x: hidden;
}

/* Dekorasi background */
body::before {
    content: '';
    position: fixed;
    top: -20%; left: -10%;
    width: 70%; height: 70%;
    background: radial-gradient(circle, rgba(0, 123, 255, 0.164) 0%, rgba(0, 149, 255, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20%; right: -10%;
    width: 70%; height: 70%;
    background: radial-gradient(circle, rgba(0, 100, 200, 0.048) 0%, rgba(0, 100, 200, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.main-content::before {
    content: '';
    position: fixed;
    top: 30%; right: -5%;
    width: 40%; height: 40%;
    background: radial-gradient(ellipse, rgba(0, 162, 255, 0.151), transparent);
    filter: blur(40px);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.main-content::after {
    content: '';
    position: fixed;
    bottom: 20%; left: -5%;
    width: 35%; height: 35%;
    background: radial-gradient(ellipse, rgba(0,120,200,0.05), transparent);
    filter: blur(50px);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.bg-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: url('backgroun.jpg') center/cover no-repeat fixed;
    opacity: 0.08;
    z-index: -2;
}

.app-wrapper {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
}

/* ===== SIDE NAV ===== */
.side-nav {
    width: 90px;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(12px);
    border-right: 1px solid #e2e8f0;
    padding: 16px 6px;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.side-nav-logo {
    text-align: center;
    padding-bottom: 12px;
}

.side-nav-logo img {
    width: 36px;
    height: 36px;
    margin-bottom: 4px;
    transition: transform 0.3s;
}
.side-nav-logo img:hover { transform: scale(1.1); }

.side-nav-logo span {
    display: block;
    font-size: 0.6rem;
    font-weight: bold;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0055aa, #0088ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.side-nav-divider, .nav-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 6px 0;
}

.side-nav-menu {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.side-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 4px;
    color: #475569;
    text-decoration: none;
    font-size: 0.55rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
}

.side-nav-link:hover,
.side-nav-link.active {
    background: #eef2ff;
    color: #0088ff;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,136,255,0.1);
}

.side-nav-link.active::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: #0088ff;
    border-radius: 0 4px 4px 0;
}

.side-nav-footer { margin-top: auto; padding-top: 12px; }

.google-login {
    flex-direction: row !important;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 40px;
    padding: 6px !important;
    margin-top: 6px;
    transition: all 0.3s;
}
.google-login:hover {
    background: #f1f5f9;
    border-color: #0088ff;
    box-shadow: 0 0 0 3px rgba(0,136,255,0.1);
}

.google-icon { width: 18px; height: 18px; }

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-left: 90px;
    padding: 0 20px 40px;
    min-height: 100vh;
}

/* ===== HEADER ===== */
.header-sticky {
    position: fixed;
    top: 0; right: 0; left: 90px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    z-index: 99;
    padding: 8px 20px;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}
.header-sticky::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0,136,255,0.2), rgba(0,136,255,0.6), rgba(0,136,255,0.2), transparent);
    pointer-events: none;
}

.header-container { display: flex; align-items: center; gap: 16px; }
.logo-area { display: flex; align-items: center; gap: 8px; }
.logo-img { width: 28px; height: 28px; transition: transform 0.3s; }
.logo-img:hover { transform: rotate(-5deg) scale(1.1); }

.logo-text {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0055aa, #0088ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 0.9rem;
    font-weight: 700;
}

.search-bar-wrapper { flex: 1; }
.search-container {
    display: flex; align-items: center;
    background: #f1f5f9;
    border-radius: 40px;
    border: 1px solid #e2e8f0;
    padding: 6px 16px;
    transition: all 0.3s;
}
.search-container:focus-within {
    border-color: #0088ff;
    box-shadow: 0 0 0 3px rgba(0,136,255,0.1);
    background: #ffffff;
}
.search-icon-header { width: 14px; height: 14px; color: #94a3b8; margin-right: 8px; }
.search-input-header { flex: 1; background: transparent; border: none; color: #1e293b; font-size: 0.75rem; outline: none; }

.currency-box {
    background: #f1f5f9;
    border-radius: 40px;
    padding: 5px 12px;
    display: flex; align-items: center; gap: 6px;
    border: 1px solid #e2e8f0;
    cursor: default;
    transition: all 0.3s;
}
.currency-box:hover { border-color: #0088ff; box-shadow: 0 2px 8px rgba(0,136,255,0.1); }
.flag-icon { width: 18px; height: 13px; border-radius: 2px; }
.currency-text { color: #475569; font-size: 0.65rem; font-weight: 600; }

.header-bottom-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, #cbd5e1, #cbd5e1, transparent);
    margin-top: 8px;
}
.header-spacer { height: 65px; }

/* ===== STACKED 3D SLIDER ===== */
.banner-wrapper {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stacked-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 5;
    perspective: 1200px;
    transform-style: preserve-3d;
    display: flex;
    justify-content: center;
    align-items: center;
}

.stacked-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1.2),
                opacity 0.3s ease,
                box-shadow 0.3s ease;
    will-change: transform, opacity;
    pointer-events: none; /* agar tidak mengganggu click event */
}

/* State aktif (tengah) */
.stacked-slide.active {
    transform: translateX(0) scale(1) translateZ(0);
    opacity: 1;
    z-index: 3;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}

/* State kiri belakang */
.stacked-slide.left {
    transform: translateX(-18%) scale(0.85) translateZ(-80px);
    opacity: 0.5;
    z-index: 2;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* State kanan belakang */
.stacked-slide.right {
    transform: translateX(18%) scale(0.85) translateZ(-80px);
    opacity: 0.5;
    z-index: 2;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Class untuk menonaktifkan transisi (saat memindahkan slide ke posisi baru) */
.stacked-slide.no-transition {
    transition: none !important;
}

.stacked-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Caption */
.stacked-caption {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    padding: 6px 16px;
    border-radius: 30px;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Dots (pill) */
.stacked-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.stacked-dot {
    width: 8px;
    height: 8px;
    background: #cbd5e1;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stacked-dot.active {
    width: 24px;
    background: #0088ff;
    box-shadow: 0 0 8px rgba(0,136,255,0.5);
}

/* Responsif */
@media (max-width: 700px) {
    .stacked-slide.left {
        transform: translateX(-12%) scale(0.9) translateZ(-40px);
        opacity: 0.4;
    }
    .stacked-slide.right {
        transform: translateX(12%) scale(0.9) translateZ(-40px);
        opacity: 0.4;
    }
    .stacked-caption {
        font-size: 0.65rem;
        bottom: 10px;
        left: 10px;
        padding: 4px 10px;
    }
}
/* Section Box */
.section-box {
    background: rgba(255,255,255,0.9);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.04);
}
.section-box h3 {
    color: #0055aa;
    font-size: 0.9rem; font-weight: 600;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eef2ff;
}

.top-games-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.top-game-card {
    background: #f8fafc; border-radius: 12px; padding: 8px;
    display: flex; align-items: center; gap: 8px;
    border: 1px solid #e2e8f0; cursor: pointer;
    transition: all 0.3s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.top-game-card:hover {
    transform: translateY(-3px); border-color: #0088ff;
    box-shadow: 0 8px 20px rgba(0,136,255,0.15); background: #ffffff;
}
.top-game-card img { width: 32px; height: 32px; border-radius: 8px; background: white; padding: 3px; box-shadow: 0 2px 5px rgba(0,0,0,0.08); }
.top-game-card .game-name { font-size: 0.7rem; font-weight: 600; color: #1e293b; }
.top-game-card .game-price { font-size: 0.6rem; color: #0088ff; }

/* All Games */
.all-games-title {
    color: #0055aa; font-size: 0.9rem; font-weight: 600;
    margin: 20px 0 15px 0; padding-bottom: 8px;
    border-bottom: 2px solid #eef2ff;
}
.games-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 20px; }

.game-poster-card {
    background: #f8fafc; border-radius: 14px; overflow: hidden;
    border: 1px solid #e2e8f0; cursor: pointer; padding: 8px;
    transition: all 0.3s ease; box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    animation: fadeInUp 0.5s ease forwards; opacity: 0;
}
.game-poster-card:hover {
    transform: translateY(-4px); border-color: #0088ff;
    box-shadow: 0 12px 25px rgba(0,136,255,0.2); background: #ffffff;
}
.game-poster-card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 10px; transition: transform 0.3s; }
.game-poster-card:hover img { transform: scale(1.02); }
.game-poster-card .game-info { padding: 6px 0 2px 0; }
.game-poster-card .game-name { font-size: 0.7rem; font-weight: 600; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-poster-card .game-price { font-size: 0.6rem; color: #0088ff; margin-top: 3px; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.load-more-btn {
    background: #eef2ff; border: 1px solid #cbd5e1; color: #0088ff;
    padding: 6px 16px; border-radius: 30px; font-size: 0.7rem; font-weight: 500;
    cursor: pointer; transition: all 0.3s;
}
.load-more-btn:hover { background: #0088ff; color: white; box-shadow: 0 4px 15px rgba(0,136,255,0.3); }

/* Footer */
.footer {
    margin-top: 40px; background: #f8fafc; border-radius: 20px;
    padding: 25px 20px 15px; border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.footer-logo img { width: 32px; transition: transform 0.3s; }
.footer-logo img:hover { transform: rotate(5deg); }
.footer-logo span { font-size: 0.9rem; font-weight: bold; color: #0055aa; }
.footer-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 20px; margin-bottom: 20px; }
.footer-col h4 { color: #475569; font-size: 0.75rem; margin-bottom: 8px; }
.footer-col a { display: block; color: #94a3b8; text-decoration: none; font-size: 0.65rem; margin: 5px 0; transition: color 0.3s; }
.footer-col a:hover { color: #0088ff; text-decoration: underline; }
.footer-bottom { text-align: center; padding-top: 12px; border-top: 1px solid #e2e8f0; color: #94a3b8; font-size: 0.6rem; }

/* Mobile Bottom Nav */
.mobile-bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(255,255,255,0.98); backdrop-filter: blur(10px);
    border-top: 1px solid #e2e8f0; display: none;
    justify-content: space-around; padding: 8px 12px;
    z-index: 1000; box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
}
.mobile-bottom-link {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    text-decoration: none; color: #94a3b8; font-size: 0.6rem;
    padding: 6px 12px; border-radius: 30px; transition: all 0.3s;
}
.mobile-bottom-link.active { color: #0088ff; background: #eef2ff; box-shadow: 0 2px 8px rgba(0,136,255,0.2); }
.google-mobile { flex-direction: row !important; gap: 6px !important; background: #f1f5f9; padding: 6px 12px !important; }
.google-icon-mobile { width: 14px; height: 14px; }

/* Icon PNG */
.nav-icon-img { width: 20px; height: 20px; object-fit: contain; display: block; margin-bottom: 4px; transition: transform 0.2s; }
.side-nav-link:hover .nav-icon-img { transform: scale(1.1); }
.mobile-icon-img { width: 18px; height: 18px; object-fit: contain; display: block; margin-bottom: 2px; transition: transform 0.2s; }
.mobile-bottom-link:hover .mobile-icon-img { transform: scale(1.1); }

/* Responsive */
@media (max-width: 900px) {
    .side-nav { display: none; }
    .main-content { margin-left: 0; padding-bottom: 70px; }
    .header-sticky { left: 0; }
    .mobile-bottom-nav { display: flex; }
    .games-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .top-games-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
}
@media (max-width: 700px) {
    .main-content { padding: 0 12px 70px; }
    .header-spacer { height: 60px; }
    .logo-text { display: none; }
    .top-games-grid { grid-template-columns: repeat(2, 1fr); }
    .games-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .banner-caption { font-size: 0.65rem; bottom: 10px; left: 10px; padding: 4px 10px; }
    .mobile-icon-img { width: 16px; height: 16px; }
}
@media (max-width: 480px) {
    .games-grid { gap: 8px; }
    .game-poster-card .game-name { font-size: 0.6rem; }
    .game-poster-card .game-price { font-size: 0.5rem; }
}