/* =========================================
   SHOP UI STYLES - PREMIUM CYBERPUNK
   ========================================= */

#shop-list { 
    display: flex; flex-direction: column; gap: 12px; 
    padding-top: 10px; padding-bottom: 80px; 
}

.shop-item {
    display: flex; align-items: center; padding: 12px;
    background: rgba(22, 27, 34, 0.7); border: 1px solid #30363d;
    border-radius: 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    position: relative; overflow: hidden; transition: transform 0.2s, border-color 0.2s;
}

/* Garis Neon Akses Emas Tipis di Kiri */
.shop-item::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 4px; height: 100%; background: var(--gold);
    box-shadow: 0 0 10px var(--gold);
}

.shop-item:hover {
    transform: translateY(-2px); border-color: #4b5563;
    background: rgba(22, 27, 34, 0.9);
}

/* --- KOTAK GAMBAR ITEM --- */
.shop-item-img-container {
    width: 55px; height: 55px; background: #0d1117;
    border: 1px solid #30363d; border-radius: 8px;
    display: flex; justify-content: center; align-items: center;
    margin-right: 12px; flex-shrink: 0;
    box-shadow: inset 0 0 10px rgba(255, 202, 40, 0.05);
}

.shop-item-img {
    width: 35px; height: 35px; object-fit: contain;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.8));
}

/* --- INFO BARANG (Tengah) --- */
.shop-item-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.shop-item-title {
    color: #e6edf3; font-weight: 900; font-size: 14px;
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 3px;
}

.shop-item-desc { color: #8b949e; font-size: 9px; line-height: 1.3; font-weight: bold; }

/* --- HARGA & KONTROL (Kanan) --- */
.shop-item-action { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* Label Harga Ala Price Tag */
.shop-item-price {
    color: var(--gold); font-weight: 900; font-size: 12px;
    background: rgba(255, 202, 40, 0.1); padding: 3px 8px;
    border-radius: 4px; border: 1px solid rgba(255, 202, 40, 0.2); letter-spacing: 0.5px;
}

/* --- GABUNGAN INPUT QTY & TOMBOL --- */
.shop-item-controls {
    display: flex;
    flex-direction: column; 
    align-items: flex-end;
    gap: 6px;
}

.qty-wrapper {
    display: flex;
    align-items: center;
}

/* Tombol Plus & Minus */
.btn-qty {
    width: 28px; height: 26px;
    background: #161b22; color: #c9d1d9;
    border: 1px solid #30363d; font-weight: 900; font-size: 16px;
    cursor: pointer; display: flex; justify-content: center; align-items: center;
    transition: 0.2s; outline: none;
}

.btn-qty:hover { background: rgba(46, 204, 113, 0.1); color: var(--emerald); }
.btn-qty:active { background: var(--emerald); color: #000; }

.btn-qty.minus { border-radius: 4px 0 0 4px; border-right: none; }
.btn-qty.plus { border-radius: 0 4px 4px 0; border-left: none; }

/* Input Angka Manual (Tengah) */
.shop-qty-input {
    width: 36px; height: 26px;
    background: #0d1117; color: white;
    border: 1px solid #30363d; border-radius: 0;
    text-align: center; font-weight: bold; font-size: 12px;
    outline: none; 
    -webkit-appearance: none; /* [OPTIMASI]: Mencegah styling bawaan Safari iOS */
    appearance: none;
}

.shop-qty-input:focus { border-color: var(--emerald); }

/* Tombol BUY */
.btn-buy-item {
    width: 100%; 
    min-width: 92px; 
    height: 28px; background: var(--emerald); color: #000;
    border: none; padding: 0 12px; border-radius: 4px; 
    font-weight: 900; font-size: 11px; text-transform: uppercase;
    cursor: pointer; transition: 0.2s;
}

.btn-buy-item:active { background: #1e8449; transform: scale(0.95); }
.btn-buy-item:disabled { background: #30363d; color: #8b949e; cursor: not-allowed; transform: none; }

/* --- MODAL (Pop-up) Shop --- */
.modal-box.shop-box { border-color: var(--gold); box-shadow: 0 0 20px rgba(255, 202, 40, 0.3); }
.text-warning-shop { color: var(--gold); font-weight: 900; margin-bottom: 10px; font-size: 18px; text-transform: uppercase; letter-spacing: 1px; }

/* ============================================================== */
/* NEBULA BAZAAR GACHA STYLES (SCOPED SECURELY)                   */
/* ============================================================== */

#nebula-bazaar-container {
    --machine-main: #1a1a2e;
    --machine-dark: #0f0f1a;
    --neon-cyan: #00f3ff;
    --neon-pink: #ff00ea;
    --neon-gold: #ffd700;
    --glass-bg: rgba(16, 24, 43, 0.6);
    font-family: 'Orbitron', 'Poppins', sans-serif;
    color: white;
}

#nebula-bazaar-container * {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

#nebula-bazaar-container .stars-bg, 
#nebula-bazaar-container .twinkling-bg {
    position: absolute; 
    top: 0; left: 0; right: 0; bottom: 0; 
    width: 100%; height: 100%; 
    display: block; z-index: 0;
    border-radius: 12px;
}

#nebula-bazaar-container .stars-bg { 
    background: #000 url('https://www.transparenttextures.com/patterns/stardust.png') repeat top center; 
}

#nebula-bazaar-container .twinkling-bg {
    background: transparent url('https://www.transparenttextures.com/patterns/stardust.png') repeat top center;
    z-index: 1; 
    animation: move-twinkle 150s linear infinite; 
    opacity: 0.5;
}

@keyframes move-twinkle { 
    from { background-position: 0 0; } 
    to { background-position: -10000px 5000px; } 
}

#nebula-bazaar-container .main-layout {
    position: relative;
    z-index: 2;
    display: flex; flex-direction: column; align-items: center; justify-content: space-between;
    width: 100%;
}

.header-area { text-align: center; width: 100%; flex-shrink: 0; }
.title { font-family: 'Orbitron', sans-serif; letter-spacing: 4px; margin: 0 0 5px 0; color: var(--neon-cyan); text-shadow: 0 0 15px rgba(0, 243, 255, 0.6), 0 0 30px rgba(0, 243, 255, 0.2); }
.wallet-status { font-family: 'Orbitron', sans-serif; color: #4ade80; letter-spacing: 1px; display: flex; align-items: center; gap: 5px; }
.status-icon { animation: blink 2s infinite; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.machine-container { flex-grow: 1; display: flex; justify-content: center; align-items: center; width: 100%; }
.machine-body { width: 82vmin; height: 125vmin; max-width: 380px; max-height: 580px; background: linear-gradient(180deg, var(--machine-main) 0%, var(--machine-dark) 100%); border-radius: 12vmin; position: relative; border: 2px solid #2a2a4a; box-shadow: inset 0 0 30px rgba(0, 243, 255, 0.1), 0 20px 50px rgba(0,0,0,0.9); display: flex; flex-direction: column; }

.shake-animation { animation: machineShake 0.1s infinite; }
@keyframes machineShake { 
    0% { transform: translate(2px, 2px) rotate(0deg); } 
    50% { transform: translate(-2px, -2px) rotate(-1deg); } 
    100% { transform: translate(2px, -2px) rotate(1deg); } 
}

.glass-dome { width: 90%; height: 50%; background: var(--glass-bg); margin: 5% auto; border-radius: 8vmin; position: relative; overflow: hidden; border: 3px solid #3a3a5a; box-shadow: inset 0 0 50px rgba(0,0,0,0.8), 0 0 15px rgba(0, 243, 255, 0.2); backdrop-filter: blur(2px); }
.glass-highlight { position: absolute; top: 5px; left: 10%; width: 80%; height: 20%; background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 100%); border-radius: 50% / 100% 100% 0 0; pointer-events: none; }
.scan-line { position: absolute; width: 100%; height: 2px; background: rgba(0, 243, 255, 0.4); box-shadow: 0 0 10px rgba(0, 243, 255, 0.8); top: 0; animation: scan 4s linear infinite; pointer-events: none; }
@keyframes scan { 0% { top: 0; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

.ball-container { position: absolute; bottom: -5px; width: 100%; height: 100%; display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-end; padding: 10px; }
.ball { width: 13vmin; height: 13vmin; max-width: 60px; max-height: 60px; border-radius: 50%; margin: -3px; background-size: cover; background-position: center; background-repeat: no-repeat; background-color: transparent; border: none; box-shadow: 0 5px 10px rgba(0,0,0,0.6); }

.machine-bottom { flex-grow: 1; display: flex; flex-direction: column; }

/* Tier Selector CSS */
.tier-selector { display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; width: 100%; padding: 0 8%; }
.tier-btn { background: #0a0a0f; color: #555; border: 1px solid #333; padding: 6px 0; border-radius: 6px; font-family: 'Orbitron', sans-serif; font-weight: bold; font-size: 2.2vmin; cursor: pointer; transition: all 0.2s ease; flex: 1; text-shadow: 0 0 5px rgba(0,0,0,0); }
.tier-btn.active { color: var(--neon-cyan); border-color: var(--neon-cyan); background: rgba(0, 243, 255, 0.1); box-shadow: 0 0 10px rgba(0, 243, 255, 0.4), inset 0 0 5px rgba(0, 243, 255, 0.2); text-shadow: 0 0 8px var(--neon-cyan); }
.tier-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.controls-row { display: flex; justify-content: space-around; align-items: center; padding: 0 5%; flex-grow: 1; }
.coin-slot { width: 22vmin; height: 11vmin; max-width: 100px; max-height: 50px; background: #0a0a0f; border: 2px solid #333; border-radius: 10px; cursor: pointer; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: all 0.3s ease; }
.pulse-glow { border-color: var(--neon-gold); box-shadow: 0 0 15px rgba(255, 215, 0, 0.4), inset 0 0 10px rgba(255, 215, 0, 0.2); animation: breathGold 2s infinite; }
@keyframes breathGold { 0%, 100% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.4); } 50% { box-shadow: 0 0 25px rgba(255, 215, 0, 0.8), inset 0 0 15px rgba(255, 215, 0, 0.4); } }
.pay-label { font-family: 'Orbitron', sans-serif; font-size: 2.2vmin; font-weight: bold; color: var(--neon-gold); margin-top: 4px; }

.knob { width: 24vmin; height: 24vmin; max-width: 110px; max-height: 110px; background: linear-gradient(145deg, #2b2b3c, #1a1a2e); border-radius: 50%; border: 4px solid #444; cursor: pointer; box-shadow: 0 10px 20px rgba(0,0,0,0.8), inset 0 5px 15px rgba(255,255,255,0.1); position: relative; transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s; }
.disabled-knob { filter: brightness(0.5); cursor: not-allowed; }
.knob-handle { position: absolute; top: 50%; left: 50%; width: 100%; height: 20%; background: linear-gradient(90deg, #111, #333, #111); transform: translate(-50%, -50%); border-radius: 10px; border: 1px solid #555; }
.rotate-knob { transform: rotate(720deg); }

.exit-area { height: 35%; display: flex; align-items: flex-end; }
.exit-slot { width: 65%; height: 85%; background: #030305; margin: 0 auto 15px; border-radius: 15px 15px 25px 25px; border: 3px solid #1a1a2e; box-shadow: inset 0 25px 40px rgba(0,0,0,1), inset 0 5px 15px rgba(0, 243, 255, 0.05), 0 5px 10px rgba(0,0,0,0.5); position: relative; perspective: 400px; display: flex; justify-content: center; }
.exit-shadow-inner { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, transparent 60%); border-radius: 12px; z-index: 5; pointer-events: none; }
.door-flap { position: absolute; top: 0; width: 95%; height: 85%; background: linear-gradient(180deg, rgba(0, 243, 255, 0.15) 0%, rgba(0, 243, 255, 0.05) 100%); border: 1px solid rgba(0, 243, 255, 0.3); border-radius: 8px; transform-origin: top; transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 20; backdrop-filter: blur(2px); box-shadow: inset 0 2px 5px rgba(255,255,255,0.2); }
.chute-lip { position: absolute; bottom: -2px; width: 102%; height: 25px; background: linear-gradient(0deg, #111, #2b2b3c); border-radius: 0 0 20px 20px; z-index: 30; border-top: 2px solid #444; box-shadow: 0 -3px 10px rgba(0,0,0,0.6); }

.prize-ball { width: 16vmin; height: 16vmin; max-width: 75px; max-height: 75px; border-radius: 50%; position: absolute; top: -150px; left: 50%; transform: translateX(-50%) scale(0.6); opacity: 0; z-index: 15; background-size: cover; background-position: center; background-repeat: no-repeat; background-color: transparent; border: none; box-shadow: 0 15px 20px rgba(0,0,0,0.8); }
@keyframes realisticDrop { 0% { top: -150px; transform: translateX(-50%) scale(0.6); opacity: 0; } 20% { opacity: 1; } 45% { top: 5px; transform: translateX(-50%) scale(0.7); } 65% { top: -15px; transform: translateX(-50%) scale(0.85); } 85% { top: 15px; transform: translateX(-50%) scale(0.95) rotate(180deg); } 100% { top: 20px; transform: translateX(-50%) scale(1) rotate(360deg); } }
.drop-animation { animation: realisticDrop 0.9s cubic-bezier(0.28, 0.84, 0.42, 1) forwards; }

.status-panel { background: rgba(10, 10, 15, 0.8); border: 1px solid #333; border-radius: 8px; padding: 12px 20px; margin-top: 15px; text-align: center; backdrop-filter: blur(4px); flex-shrink: 0; }
#statusText { margin: 0; font-family: 'Orbitron', sans-serif; font-size: 3.5vmin; color: #888; letter-spacing: 2px; }

/* MODAL / HOLOGRAM POPUP (Ganti target dari .modal ke #gacha-modal agar tidak bentrok) */
#gacha-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 5, 0.85); justify-content: center; align-items: center; z-index: 1000; backdrop-filter: blur(8px); }
.hologram-content { background: rgba(0, 30, 40, 0.4); padding: 8vmin; border-radius: 20px; text-align: center; width: 85%; max-width: 340px; border: 1px solid var(--neon-cyan); box-shadow: 0 0 30px rgba(0, 243, 255, 0.3), inset 0 0 20px rgba(0, 243, 255, 0.1); animation: hologramPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); position: relative; overflow: hidden; }
.hologram-scanline { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, transparent 50%, rgba(0, 243, 255, 0.05) 51%); background-size: 100% 4px; pointer-events: none; z-index: 1; }
.hologram-title { font-family: 'Orbitron', sans-serif; color: var(--neon-cyan); margin-top: 0; position: relative; z-index: 2; text-shadow: 0 0 10px var(--neon-cyan); }
.reward-img { width: 120px; height: 120px; margin: 15px auto 5px; display: block; position: relative; z-index: 5; border-radius: 50%; animation: floatToken 3s ease-in-out infinite; filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5)); }
@keyframes floatToken { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
#rewardText { position: relative; z-index: 2; font-size: 1.1rem; line-height: 1.6; }
@keyframes hologramPop { 0% { transform: scale(0.8) translateY(30px); opacity: 0; filter: hue-rotate(90deg) blur(5px); } 100% { transform: scale(1) translateY(0); opacity: 1; filter: hue-rotate(0deg) blur(0); } }

.claim-btn { font-family: 'Orbitron', sans-serif; background: rgba(0, 243, 255, 0.1); color: var(--neon-cyan); border: 1px solid var(--neon-cyan); padding: 15px 20px; border-radius: 5px; font-size: 3.5vmin; margin-top: 25px; cursor: pointer; width: 100%; position: relative; z-index: 2; transition: all 0.2s; text-transform: uppercase; }
.claim-btn:active { background: var(--neon-cyan); color: #000; box-shadow: 0 0 20px var(--neon-cyan); }
#particleCanvas { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100%; height: 100%; pointer-events: none; z-index: 0; }
