/* Block Blast! Production Theme: Humane, Accessible, Play Store Grade */
:root {
  --bg-gradient: radial-gradient(circle at 50% 15%, #1e293b 0%, #0a0f1d 100%);
  --panel-bg: rgba(26, 36, 56, 0.85);
  --panel-border: rgba(255, 255, 255, 0.1);
  --accent-gold: #f59e0b;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-purple: #8b5cf6;
  --accent-rose: #f43f5e;
  --text-main: #f8fafc;
  --text-dim: #94a3b8;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0f1d;
  background-image: var(--bg-gradient);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-main);
}

#app-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  height: 100%;
  max-height: 940px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

/* Screen Transitions */
.app-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  padding: 10px 14px;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.app-screen.active {
  display: flex;
  opacity: 1;
  transform: scale(1);
}

/* ========================================================
   HOME DASHBOARD SCREEN
   ======================================================== */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(14px);
  padding: 5px 12px 5px 5px;
  border-radius: 28px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.profile-chip:active { transform: scale(0.96); }

.avatar-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(6, 182, 212, 0.3);
}

.profile-info {
  display: flex;
  flex-direction: column;
}

.profile-name {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 4px;
}

.profile-level {
  font-size: 11px;
  color: #38bdf8;
  font-weight: 700;
}

.top-currencies {
  display: flex;
  gap: 6px;
  align-items: center;
}

.currency-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  padding: 5px 10px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 800;
  color: #fbbf24;
}

.add-coins-btn {
  background: #f59e0b;
  border: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #000;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
}

/* Mascot Companion Banner */
.mascot-banner {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(168, 85, 247, 0.15));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 16px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  animation: floatMascot 3s ease-in-out infinite alternate;
}

@keyframes floatMascot {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-2px); }
}

.mascot-face {
  font-size: 26px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.mascot-speech {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.mascot-title {
  font-size: 11px;
  font-weight: 800;
  color: #7dd3fc;
  text-transform: uppercase;
}

.mascot-quote {
  font-size: 12px;
  font-weight: 600;
  color: #f1f5f9;
}

/* XP Progress Bar */
.xp-container {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 8px 12px;
  margin-bottom: 10px;
  cursor: pointer;
}

.xp-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}

.xp-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.xp-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #06b6d4, #3b82f6);
  border-radius: 8px;
  transition: width 0.3s ease;
}

/* Mode Selection Cards */
.mode-selector-header {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}

.modes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.mode-card {
  background: var(--panel-bg);
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-card.active {
  border-color: #06b6d4;
  background: rgba(6, 182, 212, 0.18);
}

.mode-card:active { transform: scale(0.96); }
.mode-icon { font-size: 20px; }
.mode-title { font-size: 11px; font-weight: 800; color: #fff; }
.mode-desc { font-size: 9px; color: var(--text-dim); }

/* Hero Play Banner */
.hero-banner {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  margin-bottom: 10px;
}

.league-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 12px;
  text-transform: uppercase;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.league-badge.silver { background: linear-gradient(135deg, #94a3b8, #64748b); }
.league-badge.gold { background: linear-gradient(135deg, #f59e0b, #d97706); }
.league-badge.emerald { background: linear-gradient(135deg, #10b981, #047857); box-shadow: 0 0 12px rgba(16, 185, 129, 0.4); }
.league-badge.diamond { background: linear-gradient(135deg, #38bdf8, #6366f1); box-shadow: 0 0 14px rgba(56, 189, 248, 0.5); }

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.play-now-btn {
  width: 100%;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  border: none;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  padding: 14px;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.15s ease;
  animation: pulsePlay 2.5s infinite;
}

@keyframes pulsePlay {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); box-shadow: 0 10px 26px rgba(6, 182, 212, 0.6); }
}

.play-now-btn:active { transform: scale(0.97); }

.continue-game-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.new-game-sub-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
  padding: 8px;
  border-radius: 12px;
  cursor: pointer;
}

/* Quick Hub Grid */
.hub-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.hub-btn {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.hub-btn:active { transform: scale(0.94); }
.hub-btn span { font-size: 10px; font-weight: 700; }
.hub-icon { font-size: 18px; }

/* Stats Matrix */
.stats-header-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 6px;
}

.stat-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
  border-radius: 14px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-icon { font-size: 20px; }
.stat-detail { display: flex; flex-direction: column; }
.stat-label { font-size: 9px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; }
.stat-value { font-size: 16px; font-weight: 900; color: #fff; }

/* ========================================================
   GAMEPLAY SCREEN
   ======================================================== */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 6px;
}

.dashboard-nav-btn {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(6, 182, 212, 0.35));
  border: 1px solid rgba(6, 182, 212, 0.5);
  color: #fff;
  padding: 7px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.dashboard-nav-btn:active { transform: scale(0.95); }

.score-card {
  display: flex;
  flex-direction: column;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
  padding: 4px 10px;
  border-radius: 12px;
  min-width: 75px;
  align-items: center;
}

.score-label { font-size: 8px; font-weight: 700; text-transform: uppercase; color: var(--text-dim); }
.score-value { font-size: 18px; font-weight: 900; color: #fff; }
.best-card .score-label { color: #fde68a; }

.controls-group { display: flex; gap: 5px; align-items: center; }

.icon-btn {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
}

.icon-btn:active { transform: scale(0.92); }

/* Blitz Timer Bar */
#blitz-timer-container {
  display: none;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 10px;
  padding: 4px 10px;
  margin-bottom: 6px;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  color: #fca5a5;
}

/* Offline Incentive Banner */
#offline-reward-banner {
  display: none;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(234, 88, 12, 0.25));
  border: 1px solid rgba(245, 158, 11, 0.5);
  backdrop-filter: blur(8px);
  padding: 5px 10px;
  border-radius: 12px;
  margin-bottom: 6px;
  animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(245, 158, 11, 0.2); }
  50% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.5); }
}

.banner-icon { font-size: 18px; }
.banner-text { flex: 1; display: flex; flex-direction: column; font-size: 10px; }
.banner-text strong { font-size: 11px; color: #fde68a; }

.claim-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  color: #fff;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 11px;
}

/* Humane In-Game Companion Dialogue */
#ingame-mascot-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 4px 10px;
  margin-bottom: 4px;
  font-size: 11px;
  color: #cbd5e1;
}

.buddy-face { font-size: 16px; }

/* Combo Banner */
#combo-container {
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#combo-banner {
  font-size: 18px;
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 0 16px rgba(251, 191, 36, 0.7);
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
}

#combo-banner.animate {
  animation: comboPop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes comboPop {
  0% { opacity: 0; transform: scale(0.5) translateY(10px); }
  35% { opacity: 1; transform: scale(1.2) translateY(-2px); }
  75% { opacity: 1; transform: scale(1.0) translateY(0); }
  100% { opacity: 0; transform: scale(0.9) translateY(-8px); }
}

/* Canvas Area */
#canvas-container {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 0;
}

#game-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Tactical Boosters Toolbar (Undo, Rotate, Hammer, Wand) */
.boosters-toolbar {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.booster-action-btn {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  color: #fff;
  padding: 6px 10px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.booster-action-btn:active { transform: scale(0.94); }
.booster-action-btn.active-tool {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  animation: pulseGlow 1.2s infinite;
}

.booster-count {
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 5px;
  border-radius: 8px;
  font-size: 10px;
  color: #fde68a;
}

/* Bottom Pieces Tray */
#tray-pedestal {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(14px);
  border-radius: 18px;
  padding: 6px;
  margin-bottom: 4px;
}

#pieces-tray {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 95px;
}

.tray-slot {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  position: relative;
}

.tray-slot:active { cursor: grabbing; }
.tray-slot.is-dragging { opacity: 0; }
.tray-slot.unplayable { opacity: 0.35; filter: grayscale(0.6); }

/* Rotate Badge on Slot */
.slot-rotate-badge {
  position: absolute;
  top: 2px;
  right: 6px;
  background: rgba(6, 182, 212, 0.25);
  border: 1px solid rgba(6, 182, 212, 0.5);
  color: #fff;
  font-size: 11px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: transform 0.2s ease;
}

.slot-rotate-badge:active { transform: scale(0.85) rotate(90deg); }

.tray-piece {
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
}

/* Toast */
#game-toast {
  position: absolute;
  top: 75px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  color: #fff;
  padding: 8px 18px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 150;
  white-space: nowrap;
}

#game-toast.active { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Modals */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 12, 22, 0.88);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 100;
  padding: 16px;
}

.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-card {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  width: 100%;
  max-width: 340px;
  padding: 20px 18px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  transform: scale(0.92);
  transition: transform 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-card { transform: scale(1); }
.modal-title { font-size: 22px; font-weight: 900; margin-bottom: 8px; color: #fff; }

.modal-score-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 14px;
}

.modal-score-num { font-size: 38px; font-weight: 900; color: #fff; }
.modal-best-text { font-size: 12px; color: #fde68a; font-weight: 700; }

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.primary-btn {
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  border: none;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  padding: 12px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(6, 182, 212, 0.35);
}

.reward-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  padding: 12px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.secondary-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
}

/* Lucky Spin Wheel */
.wheel-container {
  width: 220px;
  height: 220px;
  margin: 10px auto 14px;
  position: relative;
}

#wheel-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.35);
}

.wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  z-index: 10;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

/* Daily Streak Calendar */
.streak-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 12px 0;
}

.streak-day-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.streak-day-card.claimed {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
}

.streak-day-card.today {
  border-color: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.streak-day-title { font-size: 9px; font-weight: 700; color: var(--text-dim); }
.streak-day-icon { font-size: 18px; }
.streak-day-reward { font-size: 10px; font-weight: 800; color: #fde68a; }

/* Level Up Celebration */
.level-up-badge {
  font-size: 56px;
  margin-bottom: 6px;
  animation: bounceRotate 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite alternate;
}

@keyframes bounceRotate {
  0% { transform: scale(1) rotate(-5deg); }
  100% { transform: scale(1.15) rotate(5deg); }
}

.level-reward-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(16, 185, 129, 0.2));
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 14px;
  padding: 12px;
  margin: 10px 0 14px;
}

.level-reward-title { font-size: 11px; font-weight: 800; color: #fde68a; text-transform: uppercase; margin-bottom: 3px; }
.level-reward-desc { font-size: 14px; font-weight: 800; color: #fff; }

/* Roadmap List */
.roadmap-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  margin: 10px 0 14px;
  text-align: left;
}

.roadmap-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
}

.roadmap-item.completed { border-color: rgba(16, 185, 129, 0.4); background: rgba(16, 185, 129, 0.1); }
.roadmap-item.current { border-color: rgba(6, 182, 212, 0.6); background: rgba(6, 182, 212, 0.2); }
.roadmap-left { display: flex; align-items: center; gap: 8px; }
.roadmap-lvl-num { font-size: 13px; font-weight: 900; color: #38bdf8; width: 22px; }
.roadmap-info strong { font-size: 12px; display: block; }
.roadmap-info span { font-size: 10px; color: #94a3b8; }
.roadmap-reward-tag { font-size: 10px; font-weight: 800; color: #fde68a; background: rgba(0, 0, 0, 0.3); padding: 3px 6px; border-radius: 6px; }

/* Profile Form */
.avatar-selection-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.avatar-choice { font-size: 24px; background: rgba(255, 255, 255, 0.05); border: 2px solid transparent; border-radius: 12px; padding: 8px; cursor: pointer; }
.avatar-choice.selected { border-color: #06b6d4; background: rgba(6, 182, 212, 0.2); }

.text-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px 14px;
  color: #fff;
  font-size: 14px;
  margin-bottom: 12px;
  outline: none;
}
.text-input:focus { border-color: #06b6d4; }

/* Shop Skins */
.skin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.skin-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}
.skin-card.selected { border-color: #06b6d4; background: rgba(6, 182, 212, 0.15); }
.skin-preview-dots { display: flex; gap: 4px; margin-bottom: 2px; }
.skin-dot { width: 12px; height: 12px; border-radius: 3px; }

/* Simulated Ad */
.ad-video-mock {
  width: 100%;
  height: 120px;
  background: #000;
  border-radius: 12px;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.ad-logo { font-size: 34px; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.ad-sponsor-tag { font-size: 10px; color: #38bdf8; font-weight: 700; }

/* Slot Flip Badge */
.slot-flip-badge {
  position: absolute;
  top: 2px;
  left: 6px;
  background: rgba(168, 85, 247, 0.25);
  border: 1px solid rgba(168, 85, 247, 0.5);
  color: #fff;
  font-size: 11px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: transform 0.2s ease;
}
.slot-flip-badge:active { transform: scale(0.85) scaleX(-1); }

/* Revive Gate Countdown Modal */
.revive-gate-card {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.35);
  animation: reviveCardPulse 1.8s infinite ease-in-out;
}
@keyframes reviveCardPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(239, 68, 68, 0.3); }
  50% { box-shadow: 0 0 55px rgba(239, 68, 68, 0.6); }
}

.revive-warning-badge {
  font-size: 42px;
  margin-bottom: 2px;
  animation: warningBounce 1s infinite alternate ease-in-out;
}
@keyframes warningBounce {
  from { transform: translateY(0); }
  to { transform: translateY(-6px); }
}

.revive-countdown-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 10px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.countdown-svg {
  width: 80px;
  height: 80px;
  transform: rotate(-90deg);
}

.countdown-bg-circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 6;
}

.countdown-bar-circle {
  fill: none;
  stroke: #ef4444;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 213.6; /* 2 * PI * 34 */
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.3s;
}

.revive-timer-number {
  position: absolute;
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 12px rgba(239, 68, 68, 0.8);
}

.revive-cta-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  font-size: 15px !important;
  padding: 14px 18px !important;
  font-weight: 900 !important;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5) !important;
  animation: ctaPulse 1.2s infinite ease-in-out;
}
@keyframes ctaPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* Mascot Reactive Expressions & Animations */
.mascot-face {
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mascot-face.worried {
  animation: sweatNervous 1.2s infinite ease-in-out;
  filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.6));
}
@keyframes sweatNervous {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-3px) rotate(-4deg); }
  75% { transform: translateY(-3px) rotate(4deg); }
}

.mascot-face.triumph {
  animation: cheerJump 0.8s infinite ease-in-out;
  filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.8));
}
@keyframes cheerJump {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.15) rotate(3deg); }
}

/* Fireworks celebration canvas */
#fireworks-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  pointer-events: none;
  z-index: 80;
}
