/* =============================================
   BUBBLE SHOOTER WORLD — style.css
   ============================================= */

:root {
  --bg-deep: #0d0521;
  --bg-mid: #1a0a3e;
  --bg-surface: #231155;
  --neon-cyan: #00f5ff;
  --neon-pink: #ff00aa;
  --neon-yellow: #ffe600;
  --neon-green: #00ff88;
  --text-primary: #ffffff;
  --text-muted: #a89dcf;
  --border-glow: rgba(0,245,255,0.3);
  --game-border: rgba(0,245,255,0.5);
  --bubble-r: 18px;
  --bubble-d: 36px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(0,245,255,0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(255,0,170,0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(35,17,85,0.8) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* ===== HEADER ===== */
header {
  width: 100%;
  max-width: 900px;
  padding: 18px 24px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
}

.logo {
  font-family: 'Orbitron', monospace;
  font-size: clamp(1.1rem, 3vw, 1.7rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
  text-shadow: none;
  filter: drop-shadow(0 0 12px rgba(0,245,255,0.5));
}

.logo span { color: var(--neon-yellow); -webkit-text-fill-color: var(--neon-yellow); }

.header-btns { display: flex; gap: 10px; align-items: center; }

.btn-install {
  background: linear-gradient(135deg, var(--neon-cyan), #0099ff);
  color: #000;
  border: none;
  border-radius: 50px;
  padding: 8px 18px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  box-shadow: 0 0 15px rgba(0,245,255,0.4);
  letter-spacing: 0.5px;
}
.btn-install:hover { transform: scale(1.05); box-shadow: 0 0 25px rgba(0,245,255,0.7); }

/* ===== MAIN LAYOUT ===== */
main {
  flex: 1;
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 12px 20px;
  position: relative;
  z-index: 5;
}

/* ===== SCORE BAR ===== */
.score-bar {
  width: 100%;
  max-width: 560px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  padding: 10px 22px;
  margin-bottom: 12px;
  backdrop-filter: blur(10px);
}

.score-item { text-align: center; }
.score-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 700;
}
.score-val {
  font-family: 'Orbitron', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--neon-cyan);
  line-height: 1.2;
  text-shadow: 0 0 10px rgba(0,245,255,0.5);
}
.score-val.level { color: var(--neon-yellow); text-shadow: 0 0 10px rgba(255,230,0,0.5); }
.score-val.lives { color: var(--neon-pink); text-shadow: 0 0 10px rgba(255,0,170,0.5); }

/* ===== GAME CANVAS WRAPPER ===== */
.game-wrapper {
  position: relative;
  width: 100%;
  max-width: 560px;
}

#gameCanvas {
  display: block;
  width: 100%;
  border-radius: 20px;
  border: 2px solid var(--game-border);
  box-shadow:
    0 0 30px rgba(0,245,255,0.2),
    0 0 60px rgba(0,245,255,0.08),
    inset 0 0 30px rgba(0,0,0,0.4);
  background: linear-gradient(180deg, #0d0d2e 0%, #1a1040 100%);
  cursor: crosshair;
  touch-action: none;
}

/* ===== OVERLAYS ===== */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10,3,30,0.92);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  z-index: 20;
  animation: fadeIn 0.3s ease;
}
.overlay.hidden { display: none; }

@keyframes fadeIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }

.overlay-title {
  font-family: 'Orbitron', monospace;
  font-size: clamp(1.6rem, 5vw, 2.5rem);
  font-weight: 900;
  margin-bottom: 8px;
  text-align: center;
}
.overlay-title.win  { color: var(--neon-green); text-shadow: 0 0 20px rgba(0,255,136,0.6); }
.overlay-title.lose { color: var(--neon-pink);  text-shadow: 0 0 20px rgba(255,0,170,0.6); }
.overlay-title.start {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.overlay-sub {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 24px;
  text-align: center;
  padding: 0 20px;
}
.overlay-score {
  font-family: 'Orbitron', monospace;
  font-size: 2rem;
  color: var(--neon-yellow);
  margin-bottom: 20px;
  text-shadow: 0 0 15px rgba(255,230,0,0.5);
}

.btn-action {
  background: linear-gradient(135deg, var(--neon-cyan), #007bff);
  color: #000;
  border: none;
  border-radius: 50px;
  padding: 14px 42px;
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 0 20px rgba(0,245,255,0.4);
  margin: 6px;
  letter-spacing: 1px;
}
.btn-action:hover { transform: scale(1.06); box-shadow: 0 0 35px rgba(0,245,255,0.7); }
.btn-action.secondary {
  background: linear-gradient(135deg, #ff00aa, #ff6600);
  box-shadow: 0 0 20px rgba(255,0,170,0.4);
}
.btn-action.secondary:hover { box-shadow: 0 0 35px rgba(255,0,170,0.7); }

.level-badge {
  background: var(--neon-yellow);
  color: #000;
  border-radius: 50px;
  padding: 4px 18px;
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  font-size: 0.9rem;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

/* ===== BUBBLE NEXT ===== */
.next-bubble-row {
  width: 100%;
  max-width: 560px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  margin-top: 10px;
}
.next-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.next-bubble-canvas { border-radius: 50%; }

/* ===== PROGRESS BAR ===== */
.progress-row {
  width: 100%;
  max-width: 560px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.progress-label { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; font-weight: 700; }
.progress-bar-bg {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-green));
  border-radius: 4px;
  transition: width 0.4s ease;
  box-shadow: 0 0 8px rgba(0,245,255,0.5);
}

/* ===== FOOTER ===== */
footer {
  width: 100%;
  background: rgba(0,0,0,0.4);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 22px 20px 16px;
  margin-top: 20px;
  position: relative;
  z-index: 5;
}

.share-section {
  max-width: 700px;
  margin: 0 auto 18px;
  text-align: center;
}
.share-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 12px;
}
.share-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

.share-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  transition: all 0.2s;
  text-decoration: none;
  color: #fff;
  letter-spacing: 0.3px;
}
.share-btn:hover { transform: translateY(-2px); filter: brightness(1.15); }
.share-btn svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }

.sb-facebook { background: #1877f2; box-shadow: 0 2px 10px rgba(24,119,242,0.35); }
.sb-whatsapp { background: #25d366; box-shadow: 0 2px 10px rgba(37,211,102,0.35); }
.sb-telegram { background: #229ed9; box-shadow: 0 2px 10px rgba(34,158,217,0.35); }
.sb-linkedin { background: #0a66c2; box-shadow: 0 2px 10px rgba(10,102,194,0.35); }
.sb-twitter  { background: #000; border: 1px solid rgba(255,255,255,0.15); box-shadow: 0 2px 10px rgba(0,0,0,0.4); }
.sb-copy     { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); }

.footer-credit {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto;
}
.footer-credit a { color: var(--neon-cyan); text-decoration: none; }
.footer-credit a:hover { text-decoration: underline; }
.footer-brand {
  font-family: 'Orbitron', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(60px);
  background: var(--neon-green);
  color: #000;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 0.9rem;
  z-index: 100;
  transition: transform 0.3s;
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ===== FLOATING PARTICLES ===== */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.particle {
  position: absolute;
  border-radius: 50%;
  animation: float linear infinite;
  opacity: 0.15;
}
@keyframes float {
  0%   { transform: translateY(100vh) rotate(0deg);   opacity: 0;    }
  10%  { opacity: 0.15; }
  90%  { opacity: 0.15; }
  100% { transform: translateY(-100px) rotate(360deg); opacity: 0;   }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  header { padding: 12px 14px 8px; }
  .score-bar { padding: 8px 14px; }
  .btn-install { padding: 7px 13px; font-size: 0.75rem; }
}
