/* ===============================
   CHILL GRID
================================= */
.chill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2x2 Grid */
  gap: 12px;
  margin-bottom: 25px;
}

.chill-card {
  background: var(--card);
  padding: 16px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.2s, border 0.2s;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.chill-card:active { transform: scale(0.98); }
.chill-card.active-mode { border-color: var(--primary); background: rgba(108, 99, 255, 0.05); }

.icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  margin-bottom: 4px;
}

/* Gradients */
.icon-box.purple { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); }
.icon-box.blue { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%); }
.icon-box.pink { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%); }
.icon-box.orange { background: linear-gradient(135deg, #f6d365 0%, #fda085 100%); }

.card-info h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.card-info p { margin: 0; font-size: 12px; color: var(--subtext); }

/* Music Visualizer Waves */
.music-waves {
  display: flex;
  gap: 3px;
  height: 15px;
  align-items: flex-end;
  opacity: 0;
  transition: opacity 0.3s;
  position: absolute;
  top: 16px;
  right: 16px;
}
.playing .music-waves { opacity: 1; }

.music-waves span {
  width: 3px;
  background: var(--primary);
  border-radius: 4px;
  animation: wave 1s infinite ease-in-out;
}
.music-waves span:nth-child(2) { animation-delay: 0.2s; height: 60%; }
.music-waves span:nth-child(3) { animation-delay: 0.4s; height: 30%; }

@keyframes wave {
  0%, 100% { height: 20%; }
  50% { height: 100%; }
}

/* ===============================
   ACTIVE ZONE UI
================================= */
.active-zone {
  background: var(--card);
  border-radius: 24px;
  padding: 40px 20px;
  box-shadow: var(--shadow);
  min-height: 350px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* 1. BREATHING UI */
.breathe-circle {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: conic-gradient(#a18cd1, #fbc2eb);
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 0 30px rgba(161, 140, 209, 0.4);
  animation: breatheAnim 8s infinite ease-in-out;
  position: relative;
}

.breathe-circle::before {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  border: 2px solid rgba(161, 140, 209, 0.3);
  animation: ripple 8s infinite ease-out;
}

@keyframes breatheAnim {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.3); } /* Hold */
  60% { transform: scale(1.3); } /* Exhale starts */
}

@keyframes ripple {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}

.instruction { margin-top: 30px; color: var(--subtext); }

/* 2. BUBBLE WRAP UI */
.bubble-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.bubble {
  width: 45px;
  height: 45px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.8), rgba(255,255,255,0.1));
  background-color: #89f7fe;
  border-radius: 50%;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.1), 0 5px 10px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.1s;
}

.bubble:active { transform: scale(0.9); }
.bubble.popped {
  background-color: #ddd;
  box-shadow: inset 2px 2px 5px rgba(0,0,0,0.1);
  transform: scale(0.95);
  pointer-events: none;
}

.text-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  margin-top: 15px;
}

/* 3. FIRE UI */
.fire-container {
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-bottom: 20px;
}

.fire-animation {
  position: relative;
  width: 60px;
  height: 60px;
}

.flame {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 20px;
  height: 20px;
  background: rgba(255, 165, 0, 0.7);
  border-radius: 50% 50% 20% 20%;
  transform: translateX(-50%) rotate(45deg);
  animation: flicker 1s infinite ease-in-out;
  box-shadow: 0 0 20px #ff4500;
}

.flame:nth-child(1) { height: 30px; width: 30px; animation-delay: 0s; background: #ff4500; }
.flame:nth-child(2) { height: 20px; width: 20px; animation-delay: 0.2s; background: #ffa500; bottom: 5px; }
.flame:nth-child(3) { height: 15px; width: 15px; animation-delay: 0.4s; background: #ffff00; bottom: 10px; }

@keyframes flicker {
  0%, 100% { transform: translateX(-50%) scale(1) rotate(45deg); opacity: 0.8; }
  50% { transform: translateX(-50%) scale(1.1) rotate(43deg); opacity: 1; }
}

.vent-input {
  width: 100%;
  max-width: 300px;
  height: 100px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.1);
  background: var(--input);
  color: var(--text);
  resize: none;
  font-family: inherit;
  margin-bottom: 12px;
  transition: all 0.5s ease;
}

.fire-btn {
  background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px rgba(253, 160, 133, 0.4);
  width: 100%;
}

.burning {
  transform: translateY(-50px) scale(0);
  opacity: 0;
  filter: blur(10px);
  background: #ff4500;
  color: transparent;
}

.wisdom-text {
  font-size: 18px;
  font-style: italic;
  color: var(--primary);
  animation: fadeIn 1s ease;
}

@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
/* Update your existing .bubble class to align text */
.bubble {
  /* Keep your existing gradients/sizes... */
  display: flex;             /* NEW: Centers the emoji */
  align-items: center;       /* NEW */
  justify-content: center;   /* NEW */
  font-size: 20px;           /* NEW: Emoji size */
  user-select: none;         /* NEW: Prevents highlighting text */
}

/* 🆕 The Emoji (Hidden by default) */
.pop-content {
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy effect */
}

/* 🆕 When Popped: Reveal Emoji */
.bubble.popped .pop-content {
  opacity: 1;
  transform: scale(1);
}

/* Optional: Make the popped background slightly darker/cleaner to read emoji */
.bubble.popped {
  background: #e0e0e0; /* Simpler grey background when popped */
  box-shadow: inset 2px 2px 5px rgba(0,0,0,0.1);
}