/* 1st Grade Superstars! - Bubbly, Ultra-Colorful Design System */

:root {
  --primary-pink: #FF6B8B;
  --primary-purple: #9D4EDD;
  --primary-blue: #4D96FF;
  --primary-green: #6BCB77;
  --primary-yellow: #FFD93D;
  --primary-orange: #FF7A00;
  
  --bg-gradient: linear-gradient(135deg, #F0F7FF 0%, #FFF5F7 50%, #F5F0FF 100%);
  --bubble-shadow: 0 8px 24px rgba(77, 150, 255, 0.18);
  --bubble-shadow-pink: 0 8px 24px rgba(255, 107, 139, 0.22);
  --bubble-shadow-yellow: 0 8px 24px rgba(255, 217, 61, 0.25);
  --bubble-shadow-green: 0 8px 24px rgba(107, 203, 119, 0.22);
  --bubble-shadow-purple: 0 8px 24px rgba(157, 78, 221, 0.22);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-gradient);
  color: #2D3748;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-bubble {
  font-family: 'Fredoka', 'Quicksand', cursive, sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Floating background bubble decor */
.bubble-bg-particle {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.45;
  z-index: 0;
  animation: float-bubble 12s infinite ease-in-out;
}

@keyframes float-bubble {
  0%, 100% {
    transform: translateY(0px) rotate(0deg) scale(1);
  }
  50% {
    transform: translateY(-25px) rotate(180deg) scale(1.08);
  }
}

/* Bubbly Buttons & Interactive Cards */
.bubbly-btn {
  font-family: 'Fredoka', cursive, sans-serif;
  border-radius: 20px;
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.12), 0 10px 20px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  user-select: none;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bubbly-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 9px 0 rgba(0, 0, 0, 0.12), 0 14px 24px rgba(0, 0, 0, 0.12);
}

.bubbly-btn:active {
  transform: translateY(3px) scale(0.98);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* Bubbly Card Containers */
.bubbly-card {
  background: #FFFFFF;
  border-radius: 28px;
  border: 3px solid #F0F4F8;
  box-shadow: 0 12px 32px rgba(100, 116, 139, 0.1);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.bubbly-card:hover {
  border-color: #E2E8F0;
  box-shadow: 0 16px 40px rgba(100, 116, 139, 0.16);
}

.bubbly-card-interactive:hover {
  transform: translateY(-6px) scale(1.015);
}

/* Glowing Star Badges */
.star-badge-glow {
  filter: drop-shadow(0 0 12px rgba(255, 217, 61, 0.7));
  animation: pulse-glow 2.5s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 8px rgba(255, 217, 61, 0.5));
  }
  50% {
    transform: scale(1.08);
    filter: drop-shadow(0 0 18px rgba(255, 217, 61, 0.9));
  }
}

/* Streak Flame Animation */
.streak-flame {
  animation: bounce-flame 1.4s infinite ease-in-out;
}

@keyframes bounce-flame {
  0%, 100% {
    transform: scale(1) rotate(0deg);
  }
  25% {
    transform: scale(1.1) rotate(-6deg);
  }
  75% {
    transform: scale(1.15) rotate(6deg);
  }
}

/* Big Letter/Choice Bubble */
.choice-bubble {
  border-radius: 24px;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  padding: 1.1rem 1.4rem;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 3px solid #E2E8F0;
  background: #FFFFFF;
  color: #334155;
  box-shadow: 0 6px 0 #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.choice-bubble:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: #93C5FD;
  box-shadow: 0 9px 0 #93C5FD;
}

.choice-bubble:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #CBD5E1;
}

.choice-bubble.selected-correct {
  background: linear-gradient(135deg, #6BCB77 0%, #38A169 100%) !important;
  color: #FFFFFF !important;
  border-color: #2F855A !important;
  box-shadow: 0 6px 0 #276749 !important;
  animation: celebrate-wiggle 0.5s ease-in-out;
}

.choice-bubble.selected-wrong {
  background: linear-gradient(135deg, #FEB2B2 0%, #FC8181 100%) !important;
  color: #742A2A !important;
  border-color: #E53E3E !important;
  box-shadow: 0 6px 0 #C53030 !important;
  animation: shake-wrong 0.4s ease-in-out;
}

@keyframes celebrate-wiggle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.12) rotate(-5deg); }
  50% { transform: scale(1.15) rotate(5deg); }
  75% { transform: scale(1.08) rotate(-2deg); }
}

@keyframes shake-wrong {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* Custom Rainbow Gradient Progress Bar */
.progress-rainbow {
  background: linear-gradient(90deg, #FF6B8B, #FFD93D, #6BCB77, #4D96FF, #9D4EDD);
  background-size: 200% 200%;
  animation: rainbow-shift 4s ease infinite;
}

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

/* Screen Time Bank Pill */
.screen-time-pill {
  background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);
  color: white;
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  font-family: 'Fredoka', cursive, sans-serif;
  animation: float-pill 3s infinite ease-in-out;
}

@keyframes float-pill {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Ten-Frame Math Dots */
.ten-frame-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 8px;
  background: #F8FAFC;
  padding: 12px;
  border-radius: 16px;
  border: 3px solid #CBD5E1;
}

.ten-frame-slot {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 2px dashed #94A3B8;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
}

.ten-frame-counter {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle, #FF6B8B 0%, #E11D48 100%);
  box-shadow: 0 4px 8px rgba(225, 29, 72, 0.3);
  animation: pop-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pop-in {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}
