/* ================================================
   MONEY OF FUN! - Globale stijlen & Glassmorphism
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Poppins:wght@300;400;600;700&display=swap');

/* ── CSS variabelen ── */
:root {
  --bg-dark: #06000f;
  --bg-mid: #110028;
  --purple: #7b2ff7;
  --gold: #FFD700;
  --gold-light: #FFF176;
  --neon-blue: #00d4ff;
  --neon-pink: #ff6ec7;
  --green-casino: #0a5c2e;
  --glass-bg: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-blur: blur(14px);
  --text-bright: #ffffff;
  --text-dim: rgba(255,255,255,0.6);
  --radius: 18px;
  --shadow: 0 8px 40px rgba(123, 47, 247, 0.35);
  --gold-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

/* ── Reset & basis ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-dark);
  color: var(--text-bright);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Geanimeerde achtergrond ── */
.bg-animated {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at 20% 30%, #1a004d 0%, transparent 60%),
              radial-gradient(ellipse at 80% 70%, #001a40 0%, transparent 60%),
              radial-gradient(ellipse at 50% 50%, #0d001f 0%, #000408 100%);
  overflow: hidden;
}

.bg-animated::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123,47,247,0.15) 0%, transparent 70%);
  top: -200px; left: -100px;
  animation: floatBg 12s ease-in-out infinite alternate;
}

.bg-animated::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,212,255,0.1) 0%, transparent 70%);
  bottom: -100px; right: -100px;
  animation: floatBg 10s ease-in-out infinite alternate-reverse;
}

@keyframes floatBg {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.2); }
}

/* ── Sterren canvas ── */
#stars-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ── Glassmorphism panel ── */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
}

/* ── Knoppen ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: 50px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  -webkit-user-select: none;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.2s;
}

.btn:hover::after { background: rgba(255,255,255,0.08); }
.btn:active { transform: scale(0.96); }

.btn-gold {
  background: linear-gradient(135deg, #f7c948, #FFD700, #f0a500);
  color: #1a0800;
  box-shadow: 0 4px 20px rgba(255,215,0,0.4);
}

.btn-gold:hover {
  box-shadow: 0 6px 30px rgba(255,215,0,0.6);
  transform: translateY(-2px);
}

.btn-purple {
  background: linear-gradient(135deg, #5b1fd4, #7b2ff7, #a855f7);
  color: white;
  box-shadow: 0 4px 20px rgba(123,47,247,0.4);
}

.btn-purple:hover {
  box-shadow: 0 6px 30px rgba(123,47,247,0.6);
  transform: translateY(-2px);
}

.btn-glass {
  background: var(--glass-bg);
  color: white;
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}

.btn-glass:hover { background: rgba(255,255,255,0.12); }

.btn-danger {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  color: white;
  box-shadow: 0 4px 20px rgba(231,76,60,0.4);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1.15rem;
}

/* ── Credits balk (top-left) ── */
.credits-bar {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.credit-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0,0,0,0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--gold);
  border-radius: 50px;
  font-family: 'Orbitron', monospace;
  font-size: 0.8rem;
  color: var(--gold);
  box-shadow: 0 0 15px rgba(255,215,0,0.2);
  min-width: 160px;
}

.credit-icon { font-size: 1rem; }
.credit-label { color: rgba(255,215,0,0.6); font-size: 0.65rem; }
.credit-value { font-weight: 700; font-size: 0.9rem; margin-left: auto; }

.credit-item.maxed {
  border-color: var(--neon-pink);
  box-shadow: 0 0 20px rgba(255,110,199,0.4);
  animation: pulseGold 1.5s ease-in-out infinite;
}

@keyframes pulseGold {
  0%, 100% { box-shadow: 0 0 15px rgba(255,110,199,0.3); }
  50%       { box-shadow: 0 0 30px rgba(255,110,199,0.7); }
}

/* ── Gebruikersbalk (top-right) ── */
.user-bar {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(0,0,0,0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
}


.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Notificaties ── */
#notifications-container {
  position: fixed;
  top: 80px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 320px;
}

.notification {
  padding: 14px 18px;
  border-radius: 12px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  cursor: pointer;
}

@keyframes slideIn {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

.notification.hide { animation: slideOut 0.3s ease forwards; }

@keyframes slideOut {
  to { transform: translateX(120%); opacity: 0; }
}

.notification-success { background: rgba(0, 200, 83, 0.85); color: white; border: 1px solid rgba(0,200,83,0.4); }
.notification-error   { background: rgba(231, 76, 60, 0.85); color: white; border: 1px solid rgba(231,76,60,0.4); }
.notification-info    { background: rgba(0, 150, 255, 0.85); color: white; border: 1px solid rgba(0,150,255,0.4); }
.notification-warning { background: rgba(255, 193, 7, 0.85); color: #1a1a00; border: 1px solid rgba(255,193,7,0.4); }
.notification-gold    { background: linear-gradient(135deg, rgba(255,215,0,0.9), rgba(255,140,0,0.9)); color: #1a0800; border: 1px solid gold; }

/* ── Trofee badge ── */
.trophy-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: linear-gradient(135deg, #f7c948, #FFD700);
  color: #1a0800;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: var(--gold-shadow);
  animation: trophyFloat 2s ease-in-out infinite;
}

@keyframes trophyFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

/* ── Laadindicator ── */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top: 3px solid var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utility klassen ── */
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-gold { color: var(--gold); }
.text-purple { color: var(--purple); }
.text-dim { color: var(--text-dim); }
.font-orbitron { font-family: 'Orbitron', monospace; }
.hidden { display: none !important; }
.relative { position: relative; }
.z-10 { z-index: 10; }

/* ── Trofee animatie ── */
@keyframes trophyAppear {
  0%   { transform: scale(0) rotate(-20deg); opacity: 0; }
  60%  { transform: scale(1.2) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* ── Confetti ── */
@keyframes confettiFall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.confetti-piece {
  position: fixed;
  width: 10px; height: 10px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
  pointer-events: none;
  z-index: 9999;
}

/* ── Muziek knop (gedeeld over alle pagina's) ── */
.music-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  width: 50px; height: 50px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: rgba(0,0,0,0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--gold);
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}
.music-btn:hover { background: rgba(255,215,0,0.15); transform: scale(1.1); }
.music-btn.playing { animation: musicPulse 1.5s ease-in-out infinite; }

@keyframes musicPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,215,0,0.4); }
  50%       { box-shadow: 0 0 0 12px rgba(255,215,0,0); }
}

/* ── Gebruikersbalk – sprite avatar ── */
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 8px;          /* hoekig, past beter bij pixel-art sprite */
  border: 2px solid var(--purple);
  image-rendering: pixelated;
  object-fit: cover;
}

/* ── Fade in ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up { animation: fadeInUp 0.6s ease forwards; }

/* ── Status badges ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 20px;
  font-family: 'Orbitron', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  border: 1px solid currentColor;
  opacity: 0.85;
  margin-top: 2px;
}

/* Totaal credits balk */
.total-credit-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0,0,0,0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50px;
  font-family: 'Orbitron', monospace;
  font-size: 0.8rem;
  color: white;
  min-width: 160px;
  margin-top: 2px;
}

.total-credit-item .credit-label { color: rgba(255,255,255,0.5); font-size: 0.65rem; }
.total-credit-item .credit-value { font-weight: 700; font-size: 0.9rem; margin-left: auto; color: white; }

/* ── Nintendo-stijl dubbel GURU animatie ── */
.nintendo-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: radial-gradient(ellipse at center, #1a0050 0%, #000010 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.nintendo-title {
  font-family: 'Orbitron', monospace;
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 900;
  text-align: center;
  background: linear-gradient(135deg, #FFD700, #ff6ec7, #00d4ff, #FFD700);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleGradient 2s ease infinite, titlePop 0.8s cubic-bezier(0.34,1.56,0.64,1) both;
  letter-spacing: 4px;
  text-shadow: none;
  line-height: 1.2;
}

@keyframes titleGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes titlePop {
  0%   { transform: scale(0) rotate(-10deg); opacity: 0; }
  60%  { transform: scale(1.1) rotate(2deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.nintendo-subtitle {
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: rgba(255,255,255,0.8);
  text-align: center;
  animation: fadeInUp 0.6s 0.5s ease both;
}

.nintendo-trophies {
  font-size: clamp(3rem, 8vw, 6rem);
  animation: trophyBounce 1s 1s ease both;
  letter-spacing: 8px;
}

@keyframes trophyBounce {
  0%   { transform: translateY(60px); opacity: 0; }
  60%  { transform: translateY(-15px); opacity: 1; }
  80%  { transform: translateY(8px); }
  100% { transform: translateY(0); opacity: 1; }
}

.nintendo-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.nintendo-star {
  position: absolute;
  font-size: 1.5rem;
  animation: starFly linear forwards;
  pointer-events: none;
}

@keyframes starFly {
  0%   { transform: translateY(110vh) rotate(0deg) scale(0); opacity: 1; }
  50%  { opacity: 1; transform: translateY(50vh) rotate(360deg) scale(1.2); }
  100% { transform: translateY(-10vh) rotate(720deg) scale(0.5); opacity: 0; }
}

/* ── Media queries ── */
@media (max-width: 768px) {
  .credits-bar { top: 8px; left: 8px; }
  .credit-item { padding: 6px 12px; font-size: 0.7rem; min-width: 130px; }
  .user-bar { top: 8px; right: 8px; padding: 6px 12px; }
  .user-name { max-width: 80px; }
}

@media (max-width: 480px) {
  .credits-bar { flex-direction: row; flex-wrap: wrap; }
  .credit-item { min-width: 110px; }
}
