:root { 
    --primary: #ff007f; /* Pink Neon Terang */
    --secondary: #ff66b2; /* Pink Muda */
    --dark: #050505; 
    --tiktok: #ff0050; 
    --online: #2ecc71; 
    --gold: #ffb700; 
    --gold-dark: #b8860b; 
}
body { background-color: var(--dark); color: white; font-family: 'Rajdhani', sans-serif; overflow: hidden; height: 100vh; display: flex; flex-direction: column; margin: 0; }
.bg-animated { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle at center, #2e0b1a 0%, #000000 90%); z-index: -2; }

/* PORTAL & BUTTONS */
#landing-portal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, #050505 0%, #2e0b1a 100%); z-index: 10000; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; transition: opacity 0.5s ease; }
.portal-container { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 0, 127, 0.2); padding: 40px 30px; border-radius: 30px; backdrop-filter: blur(20px); box-shadow: 0 0 50px rgba(255, 0, 127, 0.3); width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 25px; }
.portal-logo { font-family: 'Orbitron'; font-size: 2.8rem; font-weight: 900; letter-spacing: 3px; background: linear-gradient(to right, #fff, var(--primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin: 0; filter: drop-shadow(0 0 15px var(--primary)); }
.portal-btn { width: 100%; padding: 16px; border: 1px solid rgba(255,255,255,0.2); background: rgba(0,0,0,0.4); color: white; font-family: 'Orbitron'; letter-spacing: 2px; border-radius: 12px; cursor: pointer; transition: 0.3s; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; gap: 10px; }
.portal-btn:hover { background: var(--primary); color: white; box-shadow: 0 0 20px var(--primary); border-color: var(--primary); }
.portal-btn.idol-mode { border-color: rgba(255, 102, 178, 0.4); color: var(--secondary); }

/* MAIN UI */
#main-app { display: none; height: 100%; flex-direction: column; }
.top-bar { text-align: center; padding: 15px 0; z-index: 10; border-bottom: 1px solid rgba(255,255,255,0.05); position: relative; }
h1.mega-title { font-family: 'Orbitron'; font-size: 1.8rem; background: linear-gradient(to right, #fff, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 900; margin: 0; }
.logout-portal-btn { position: absolute; left: 20px; top: 18px; color: rgba(255,255,255,0.5); font-size: 1.2rem; cursor: pointer; z-index: 20; transition: 0.3s; }
.nav-tabs-custom { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 15px; flex-wrap: wrap; padding: 0 10px; }
.tab-link { color: #666; text-decoration: none; font-family: 'Orbitron'; font-size: 0.65rem; letter-spacing: 1px; cursor: pointer; padding-bottom: 6px; border-bottom: 3px solid transparent; transition: 0.3s; }
.tab-link.active { color: var(--primary); border-bottom-color: var(--primary); text-shadow: 0 0 10px var(--primary); }
.tiktok-official-btn { background: black; border: 1px solid var(--tiktok); color: white; padding: 4px 10px; border-radius: 20px; font-size: 0.6rem; font-family: 'Orbitron'; display: flex; align-items: center; gap: 4px; cursor: pointer; box-shadow: 0 0 10px rgba(255, 0, 80, 0.4); }

/* ANIMASI GIFT HEBOH (REVISI HALUS & ANTI BOCOR) */
#gift-anim-layer { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 30000; overflow: hidden; }
.falling-rose { position: absolute; font-size: 2.5rem; top: -10vh; animation: fall-down linear forwards; filter: drop-shadow(0 0 5px red); }
@keyframes fall-down { 0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 1; } 100% { transform: translateY(110vh) translateX(20px) rotate(360deg); opacity: 0; } }
.bounce-cake { position: absolute; left: 50%; bottom: 15%; margin-left: -4rem; font-size: 8rem; filter: drop-shadow(0 10px 15px rgba(255, 105, 180, 0.6)); animation: cake-bounce 2s ease-out forwards; }
@keyframes cake-bounce { 0% { transform: translateY(20vh) scale(0.5); opacity: 0; } 30% { transform: translateY(-5vh) scale(1.1) rotate(5deg); opacity: 1; } 50% { transform: translateY(0) scale(0.9) rotate(-5deg); } 70% { transform: translateY(-2vh) scale(1.05); opacity: 1;} 100% { transform: translateY(0) scale(1); opacity: 0; } }
.drift-car { position: absolute; bottom: 15%; left: -30%; font-size: 8rem; filter: drop-shadow(0 15px 25px rgba(255,0,127,0.6)); animation: car-drift 2s ease-in-out forwards; }
@keyframes car-drift { 0% { transform: translateX(0) scale(0.8) skewX(10deg); opacity: 0; } 20% { opacity: 1; } 50% { transform: translateX(60vw) scale(1.2) skewX(-5deg); } 80% { opacity: 1; } 100% { transform: translateX(130vw) scale(1) skewX(0deg); opacity: 0; } }
.rocket-launch { position: absolute; left: 50%; bottom: -20vh; margin-left: -6rem; font-size: 12rem; filter: drop-shadow(0 20px 30px #ff9d00); animation: rocket-blast 2.5s ease-in forwards; }
@keyframes rocket-blast { 0% { transform: translateY(0); opacity: 0; } 20% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(-120vh) scale(1.2); opacity: 1; } }
.giant-planet { position: absolute; top: 50%; left: 50%; margin-top: -7.5rem; margin-left: -7.5rem; font-size: 15rem; filter: drop-shadow(0 0 50px var(--gold)); z-index: 30002; animation: planet-explode 2s ease-out forwards; }
@keyframes planet-explode { 0% { transform: scale(0) rotate(-20deg); opacity: 0; } 40% { transform: scale(1.2) rotate(10deg); opacity: 1; } 100% { transform: scale(2) rotate(30deg); opacity: 0; filter: blur(10px); } }
.royal-crown { position: absolute; top: 40%; left: 50%; margin-top: -9rem; margin-left: -9rem; font-size: 18rem; z-index: 30003; filter: drop-shadow(0 0 60px var(--gold)); animation: crown-drop 2.5s ease-out forwards; }
.crown-aura { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); width: 300px; height: 300px; background: radial-gradient(circle, rgba(255,215,0,0.5) 0%, transparent 70%); z-index: 30002; mix-blend-mode: screen; animation: aura-pulse 2.5s ease-in-out forwards; }
@keyframes crown-drop { 0% { transform: translateY(-50vh) scale(2) rotate(-10deg); opacity: 0; } 40% { transform: translateY(0) scale(1) rotate(5deg); opacity: 1; } 60% { transform: translateY(0) scale(1.1) rotate(-5deg); } 100% { transform: translateY(0) scale(1.3); opacity: 0; filter: blur(5px); } }
@keyframes aura-pulse { 0%, 100% { opacity: 0; scale: 0.5; } 50% { opacity: 1; scale: 1.2; } }
.shake-screen { animation: shake-soft 0.4s ease-in-out infinite alternate; }
@keyframes shake-soft { 0% { transform: translate(-2px, -2px); } 100% { transform: translate(2px, 2px); } }
.supernova-flash { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: radial-gradient(circle, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0) 80%); z-index: 30001; pointer-events: none; animation: flash-bang-soft 0.8s ease-out forwards; }
@keyframes flash-bang-soft { 0% { opacity: 1; } 100% { opacity: 0; } }

/* --- CARDS & FRAME --- */
#member-view { height: calc(100vh - 180px); margin-top: 10px; display: flex; justify-content: center; align-items: center; }
.swiper { width: 280px; height: 430px; } 

.luxury-frame { border: 3px solid var(--gold) !important; box-shadow: 0 0 15px rgba(255, 215, 0, 0.4); z-index: 10; position: relative; }
.luxury-frame::after { content: ''; position: absolute; top: -3px; left: -3px; right: -3px; bottom: -3px; border-radius: inherit; pointer-events: none; box-shadow: 0 0 25px rgba(255, 215, 0, 0.6); animation: pulse-glow 2s infinite alternate; }
@keyframes pulse-glow { 0% { opacity: 0.5; } 100% { opacity: 1; } }
.luxury-frame::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: linear-gradient(to bottom right, transparent 40%, rgba(255,255,255,0.4) 50%, transparent 60%); animation: shine-rotate 5s infinite linear; pointer-events: none; }
@keyframes shine-rotate { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.crown-badge { position: absolute; top: -40px; left: 50%; transform: translateX(-50%); font-size: 3rem; z-index: 100; color: var(--gold); filter: drop-shadow(0 0 8px rgba(255,215,0,0.6)); animation: crown-float 2s infinite ease-in-out; }
@keyframes crown-float { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-8px); } }

.flip-card { width: 100%; height: 100%; perspective: 1000px; }
.flip-card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); transform-style: preserve-3d; border-radius: 20px; will-change: transform; }
.flip-card.flipped .flip-card-inner { transform: rotateY(180deg); }
.flip-card-front, .flip-card-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 20px; overflow: hidden; border: 1px solid rgba(255,255,255,0.2); }
.luxury-frame .flip-card-front { border: none; inset: 0; width: 100%; height: 100%; }
.flip-card-front { background-size: cover; background-position: center; display: flex; flex-direction: column; justify-content: flex-end; }

.front-gradient { background: linear-gradient(to top, rgba(0,0,0,0.95) 10%, rgba(0,0,0,0.4) 60%, transparent); padding: 25px 20px 20px 20px; text-align: left; }
.front-name { font-family: 'Orbitron'; font-size: 1.6rem; margin: 0; color: white; text-shadow: 0 0 10px var(--primary); }
.flip-card-back { background: rgba(20, 5, 15, 0.98); transform: rotateY(180deg); padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.data-row { display: flex; justify-content: space-between; width: 100%; margin-bottom: 8px; font-size: 0.8rem; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 3px; }
.chat-btn-big { flex: 2; background: linear-gradient(90deg, var(--secondary), var(--primary)); border: none; padding: 10px; border-radius: 50px; font-weight: bold; font-family: 'Orbitron'; font-size: 0.8rem; color: white; box-shadow: 0 0 15px var(--primary); }

.holo-glare { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(105deg, transparent 20%, rgba(255, 215, 0, 0.3) 25%, rgba(255, 0, 127, 0.3) 40%, rgba(255, 102, 178, 0.3) 55%, transparent 60%); mix-blend-mode: overlay; background-size: 200% 200%; background-position: 50% 50%; z-index: 5; pointer-events: none; border-radius: inherit; opacity: 0.5; }

/* MODALS (Penting! Ini yang bikin tombolnya bisa fungsi) */
#fan-login-modal, #luxury-modal, #gacha-result-modal, #gacha-upload-modal, #gacha-summon-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); z-index: 20000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(10px); }
.modal-content-lux { width: 90%; max-width: 450px; background: #111; border: 1px solid var(--primary); border-radius: 20px; padding: 25px; box-shadow: 0 0 40px rgba(255, 0, 127, 0.2); max-height: 85vh; overflow-y: auto; padding-bottom: 50px; }
.lux-input { background: #222 !important; border: 1px solid #555 !important; border-radius: 10px; padding: 12px; color: white !important; width: 100%; margin-bottom: 15px; font-family: 'Rajdhani'; font-size: 1rem; }
.lux-input:focus { border-color: var(--primary) !important; outline: none; box-shadow: 0 0 10px var(--primary); }

#chat-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); z-index: 2000; display: none; justify-content: center; align-items: flex-end; }
.chat-window { width: 100%; max-width: 500px; height: 90vh; background: #0a0a0a; border-top: 2px solid var(--secondary); border-radius: 25px 25px 0 0; display: flex; flex-direction: column; }
.chat-header { padding: 15px 20px; background: #111; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #222; }
.chat-body { flex-grow: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; scrollbar-width: none; }
.msg { max-width: 80%; padding: 10px 14px; border-radius: 15px; margin-bottom: 10px; font-size: 0.9rem; position: relative; }
.msg-fan { align-self: flex-end; background: rgba(255, 0, 127, 0.1); border: 1px solid var(--primary); }
.msg-idol { align-self: flex-start; background: rgba(255, 102, 178, 0.1); border: 1px solid var(--secondary); }
.msg-gift { border: 2px solid var(--gold) !important; background: rgba(255, 204, 0, 0.1) !important; box-shadow: 0 0 10px var(--gold); }

/* --- CINEMATIC GACHA ANIMATION --- */
#gacha-summon-modal { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: #000; z-index: 30000; display: none; align-items: center; justify-content: center; overflow: hidden; }
.warp-tunnel { position: absolute; top: 50%; left: 50%; width: 200vw; height: 200vh; margin-top: -100vh; margin-left: -100vw; background: repeating-conic-gradient(from 0deg, #000 0deg 10deg, var(--primary) 11deg 12deg, #000 13deg 20deg); opacity: 0.2; animation: warp-spin 6s linear infinite; }
@keyframes warp-spin { 0% { transform: rotate(0deg) scale(1); } 100% { transform: rotate(360deg) scale(1.5); } }
.summon-gate { position: absolute; top: 0; left: 0; width: 100vw; height: 100vh; display: flex; align-items: center; justify-content: center; }
.gate-ring { position: absolute; top: 50%; left: 50%; width: 300px; height: 300px; margin-top: -150px; margin-left: -150px; border: 4px dashed var(--primary); border-radius: 50%; animation: spin-slow 4s linear infinite; box-shadow: 0 0 30px var(--primary); }
.gate-ring.inner { width: 250px; height: 250px; margin-top: -125px; margin-left: -125px; border: 2px solid var(--secondary); animation: spin-fast 2s linear infinite reverse; box-shadow: 0 0 20px var(--secondary); }
@keyframes spin-slow { 100% { transform: rotate(360deg); } }
@keyframes spin-fast { 100% { transform: rotate(360deg); } }
.scan-bar { position: absolute; top: 50%; left: 50%; width: 100vw; max-width: 400px; height: 2px; background: white; box-shadow: 0 0 20px white; animation: scan-move 1.5s ease-in-out infinite alternate; }
@keyframes scan-move { 0% { transform: translate(-50%, -150px); opacity: 0.2; } 100% { transform: translate(-50%, 150px); opacity: 1; } }

.gacha-card-reveal { width: 250px; height: 380px; background: #000; border-radius: 20px; overflow: hidden; position: relative; margin: 0 auto; border: 4px solid var(--gold); box-shadow: 0 0 50px rgba(255, 215, 0, 0.5); animation: card-reveal-entry 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; transform-style: preserve-3d; }
#gacha-img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes card-reveal-entry { 0% { transform: scale(0) rotateY(90deg) translateZ(500px); opacity: 0; } 100% { transform: scale(1) rotateY(0deg) translateZ(0); opacity: 1; } }

.rarity-badge { font-family: 'Orbitron'; font-size: 2.8rem; font-weight: 900; margin-bottom: 20px; letter-spacing: 8px; text-transform: uppercase; animation: rarity-pulse 0.5s ease-in-out infinite alternate; }
@keyframes rarity-pulse { 0% { transform: scale(1); filter: brightness(1); } 100% { transform: scale(1.05); filter: brightness(1.5); } }

.burst-common { filter: drop-shadow(0 0 20px white); }
.burst-rare { filter: drop-shadow(0 0 30px var(--primary)); }
.burst-epic { filter: drop-shadow(0 0 30px var(--secondary)); }
.burst-legendary { filter: drop-shadow(0 0 40px var(--gold)); }
.burst-mythic { filter: drop-shadow(0 0 50px #ff0050); }

/* GALLERY & GAMES */
#gallery-view { display: none; height: 75vh; overflow-y: auto; padding: 15px; padding-bottom: 120px; scrollbar-width: none; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 1200px; margin: 0 auto; }
.gallery-item { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 1; border: 1px solid rgba(255,0,127,0.3); background: #111; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-overlay { position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); padding: 10px; display: flex; justify-content: space-between; align-items: flex-end; font-size: 0.75rem; }
#game-view { display: none; height: 75vh; overflow-y: auto; padding: 20px; }
.game-card { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--primary); border-radius: 20px; padding: 20px; display: flex; align-items: center; gap: 15px; cursor: pointer; transition: 0.3s; position: relative; overflow: hidden; }
.game-icon { font-size: 3rem; background: linear-gradient(45deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.music-widget { position: fixed; bottom: 25px; right: 20px; background: rgba(0,0,0,0.85); border: 1px solid var(--secondary); padding: 8px 15px; border-radius: 50px; z-index: 100; font-size: 0.7rem; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.visualizer { display: none; gap: 2px; align-items: flex-end; height: 12px; }
.visualizer.active { display: flex; }
.v-bar { width: 2px; background: var(--primary); animation: v-jump 0.5s infinite ease-in-out; }
@keyframes v-jump { 0%, 100% { height: 4px; } 50% { height: 12px; } }

/* ADD MEMBER BUTTON */
.add-member-btn { position: fixed; bottom: 80px; left: 20px; width: 50px; height: 50px; background: rgba(0,0,0,0.8); border: 2px solid var(--primary); border-radius: 50%; color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; cursor: pointer; z-index: 100; box-shadow: 0 0 15px var(--primary); transition: 0.3s; }
.add-member-btn:hover { transform: scale(1.1) rotate(90deg); background: var(--primary); color: white; }

@media (min-width: 769px) {
    .portal-container { max-width: 600px !important; padding: 60px !important; display: flex; flex-direction: column; align-items: center; }
    .portal-logo { font-size: 4rem !important; margin-bottom: 10px; }
    .portal-btns-group { display: flex; gap: 20px; width: 100%; justify-content: center; margin-top: 20px; }
    .portal-btn { width: 220px !important; }
    .top-bar { height: 80px; display: flex; align-items: center; justify-content: flex-end; padding: 0 50px; position: relative; }
    h1.mega-title { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 2.2rem; margin: 0; z-index: 5; }
    .nav-tabs-custom { display: flex; gap: 25px; margin-right: 150px; }
    .tab-link { font-size: 0.9rem; }
    #top-coin-display { position: absolute !important; right: 40px !important; top: 50% !important; transform: translateY(-50%) !important; font-size: 1.1rem !important; z-index: 10; }
    .logout-portal-btn { position: absolute; left: 40px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; }
    .swiper { width: 350px !important; height: 530px !important; }
    #member-view { height: calc(100vh - 120px) !important; }
}

/* --- ANIMASI PELEBURAN KARTU (COMBINE) --- */
.combine-card-spin { position: absolute; width: 90px; height: 130px; border-radius: 8px; background-size: cover; background-position: center; border: 2px solid white; box-shadow: 0 0 15px rgba(255,255,255,0.5); animation: spin-collide 1.5s cubic-bezier(0.5, 0, 0.2, 1) forwards; }
@keyframes spin-collide { 0% { transform: translate(var(--startX), var(--startY)) rotate(0deg) scale(1); opacity: 0; } 20% { opacity: 1; } 80% { transform: translate(0, 0) rotate(1080deg) scale(0.5); opacity: 1; } 100% { transform: translate(0, 0) rotate(1440deg) scale(0); opacity: 0; filter: brightness(2); } }
.combine-flash { position: absolute; width: 10vw; height: 10vw; border-radius: 50%; background: white; box-shadow: 0 0 100px 100px white; animation: explode-flash 1s 1.2s ease-out forwards; opacity: 0; pointer-events: none; }
@keyframes explode-flash { 0% { transform: scale(0); opacity: 1; } 50% { transform: scale(10); opacity: 1; } 100% { transform: scale(15); opacity: 0; } }
.combine-result { position: absolute; width: 240px; height: 350px; border-radius: 15px; border: 4px solid var(--gold); animation: result-reveal 1s 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; opacity: 0; transform: scale(0); box-shadow: 0 0 50px var(--gold); }
@keyframes result-reveal { 0% { transform: scale(0) rotateY(90deg); opacity: 0; } 100% { transform: scale(1) rotateY(0deg); opacity: 1; } }
