/**
 * Pocket Pals World - Modern Candy Theme CSS
 * Glossy, tactile, bouncy, and ultra-vibrant 2026 kids aesthetics
 */

:root {
  --primary-purple: #6C5CE7;
  --primary-light: #A29BFE;
  --candy-pink: #FF6584;
  --candy-cyan: #00CEC9;
  --candy-yellow: #FECA57;
  --candy-green: #2ED573;
  --candy-orange: #FFA502;
  --card-bg: rgba(255, 255, 255, 0.92);
  --card-border: rgba(255, 255, 255, 0.98);
  --shadow-soft: 0 8px 24px rgba(108, 92, 231, 0.22);
  --font-family: system-ui, -apple-system, 'Comic Neue', 'Fredoka', 'Nunito', 'Quicksand', sans-serif;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-family);
  background: radial-gradient(circle at 50% 20%, #A29BFE 0%, #6C5CE7 100%);
  color: #2D3436;
}

#app-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Background floating sparkles */
.bg-sparkles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.sparkle-dot {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0.6;
  animation: floatSparkle 5s infinite ease-in-out;
}

@keyframes floatSparkle {
  0%, 100% { transform: translateY(0) scale(0.8); opacity: 0.3; }
  50% { transform: translateY(-25px) scale(1.2); opacity: 0.8; }
}

/* Top App Header */
#top-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-icon {
  font-size: 26px;
  animation: bounceLogo 2s infinite ease-in-out;
}

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

.brand-title {
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, #FF6584, #6C5CE7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.install-pwa-btn {
  background: linear-gradient(135deg, #FF6584, #FFA502);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 3px 0 #D63056;
  transition: transform 0.1s, box-shadow 0.1s;
}

.install-pwa-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #D63056;
}

@media (max-width: 420px) {
  .install-btn-text {
    display: none;
  }
  .install-pwa-btn {
    padding: 6px 10px;
  }
}

.header-btn {
  background: #FFF;
  border: 2px solid #DFE6E9;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 0 #B2BEC3;
  transition: transform 0.1s, box-shadow 0.1s;
}

.header-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #B2BEC3;
}

/* Main 3D Canvas Stage */
#canvas-container {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 5;
}

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

/* 3D Pal Info Badge Overlay */
.pal-info-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 10;
  background: var(--card-bg);
  padding: 8px 16px;
  border-radius: 20px;
  border: 2px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pal-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pal-badge-name {
  font-size: 18px;
  font-weight: 900;
  color: #2D3436;
}

.pal-rarity-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  color: white;
  text-transform: uppercase;
}

.rarity-common { background: #2ED573; }
.rarity-rare { background: #0984E3; }
.rarity-epic { background: #9B59B6; }
.rarity-legendary { background: linear-gradient(45deg, #FFA502, #FF4757); }

.pal-stage-text {
  font-size: 12px;
  font-weight: 700;
  color: #636E72;
}

.xp-bar-bg {
  width: 130px;
  height: 8px;
  background: #DFE6E9;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 2px;
}

.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00CEC9, #2ED573);
  border-radius: 4px;
  transition: width 0.3s;
}

/* Orbit Hint Overlay */
.orbit-hint {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.8);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  color: #636E72;
  pointer-events: none;
}

/* Pal Floating Action Dock (Feed, Wash, Play, Sleep, Love) */
.pal-action-dock {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.92);
  padding: 8px 12px;
  border-radius: 28px;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.action-dock-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 20px;
  border: none;
  background: #F1F2F6;
  cursor: pointer;
  box-shadow: 0 4px 0 #CED6E0;
  transition: transform 0.1s, box-shadow 0.1s, background 0.15s;
}

.action-dock-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #CED6E0;
}

.action-icon {
  font-size: 24px;
}

.action-label {
  font-size: 11px;
  font-weight: 800;
  color: #2F3542;
  margin-top: 1px;
}

.action-price {
  font-size: 10px;
  font-weight: 900;
  color: #27AE60;
  background: #E8F8F0;
  border-radius: 8px;
  padding: 1px 6px;
  margin-top: 2px;
}

.btn-feed:active, .btn-feed.active { background: #FFD2D2; }
.btn-wash:active, .btn-wash.active { background: #D2EEFF; }
.btn-play:active, .btn-play.active { background: #FFF4D2; }
.btn-pet:active, .btn-pet.active { background: #FFD2F2; }

/* Sub-trays (Food selection, etc.) */
.sub-tray {
  position: absolute;
  bottom: 86px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 16;
  background: rgba(255, 255, 255, 0.96);
  padding: 10px 16px;
  border-radius: 24px;
  border: 3px solid #FFF;
  box-shadow: var(--shadow-soft);
  display: none;
  gap: 12px;
  animation: popUp 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sub-tray.show {
  display: flex;
}

@keyframes popUp {
  0% { transform: translateX(-50%) scale(0.6); opacity: 0; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

.tray-item-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px;
  background: #FFF;
  border: 2px solid #E4E7EB;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 4px 0 #CBD5E1;
  font-size: 28px;
}

.tray-item-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #CBD5E1;
}

.tray-item-name {
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  margin-top: 4px;
}

.tray-item-price {
  font-size: 11px;
  font-weight: 900;
  color: #27AE60;
  background: #E8F8F0;
  border-radius: 8px;
  padding: 1px 7px;
  margin-top: 3px;
}

.wardrobe-price {
  font-size: 11px;
  font-weight: 900;
  color: #27AE60;
  background: #E8F8F0;
  border-radius: 8px;
  padding: 2px 8px;
  margin-top: 4px;
}

/* Bottom Navigation Bar (Tabs) */
#bottom-nav {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 10px 12px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-top: 3px solid rgba(255, 255, 255, 0.98);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.08);
}

.nav-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 14px;
  transition: transform 0.15s;
}

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

.nav-tab-btn.active {
  background: #F1F2F6;
}

.nav-tab-icon {
  font-size: 24px;
}

.nav-tab-label {
  font-size: 11px;
  font-weight: 800;
  color: #747D8C;
  margin-top: 2px;
}

.nav-tab-btn.active .nav-tab-label {
  color: var(--primary-purple);
}

/* Modals & Fullscreen Overlays */
.fullscreen-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  background: rgba(45, 52, 54, 0.65);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.fullscreen-modal.active {
  display: flex;
}

.modal-content-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  background: var(--card-bg);
  border-radius: 28px;
  border: 4px solid var(--card-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: cardZoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes cardZoomIn {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #F8F9FA;
  border-bottom: 2px solid #EDF2F7;
}

.modal-title-text {
  font-size: 20px;
  font-weight: 900;
  color: #2D3436;
}

.close-modal-btn {
  background: #FF6584;
  border: none;
  color: white;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 3px 0 #C23616;
}

.close-modal-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #C23616;
}

.modal-body-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Hatch Nursery Screen */
.hatch-egg-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
}

.egg-choice-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  width: 100%;
  padding: 8px 4px;
}

.egg-card {
  flex: 0 0 120px;
  background: white;
  border: 3px solid #E2E8F0;
  border-radius: 20px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 0 #CBD5E1;
  transition: transform 0.1s;
}

.egg-card.selected {
  border-color: #6C5CE7;
  background: #F3F0FF;
  transform: translateY(-4px);
  box-shadow: 0 8px 0 #6C5CE7;
}

.egg-card-icon {
  font-size: 42px;
}

.egg-card-title {
  font-size: 14px;
  font-weight: 800;
  margin-top: 6px;
  text-align: center;
}

.egg-card-cost {
  font-size: 13px;
  font-weight: 800;
  color: #D35400;
  margin-top: 4px;
}

.interactive-egg-stage {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.interactive-egg-emoji {
  font-size: 110px;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.2));
  transition: transform 0.1s;
}

.interactive-egg-stage:active .interactive-egg-emoji {
  transform: scale(0.92);
}

.egg-shake {
  animation: eggWobble 0.35s ease-in-out;
}

@keyframes eggWobble {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(-12deg) scale(1.05); }
  50% { transform: rotate(12deg) scale(1.08); }
  75% { transform: rotate(-8deg) scale(1.05); }
  100% { transform: rotate(0deg); }
}

.hatch-tap-hint {
  font-size: 16px;
  font-weight: 800;
  color: #6C5CE7;
  animation: pulseHint 1.2s infinite ease-in-out;
}

@keyframes pulseHint {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* Primary Action Buttons */
.bouncy-action-btn {
  background: #2ED573;
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 24px;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 6px 0 #26AF5F;
  text-align: center;
  transition: transform 0.1s, box-shadow 0.1s;
}

.bouncy-action-btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #26AF5F;
}

.bouncy-action-btn.btn-pink {
  background: #FF6584;
  box-shadow: 0 6px 0 #D63056;
}

.bouncy-action-btn.btn-pink:active {
  box-shadow: 0 2px 0 #D63056;
}

.bouncy-action-btn.btn-purple {
  background: #6C5CE7;
  box-shadow: 0 6px 0 #5444C9;
}

.bouncy-action-btn.btn-purple:active {
  box-shadow: 0 2px 0 #5444C9;
}

/* Mini-Games Hub Cards */
.arcade-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.game-hub-card {
  background: white;
  border: 3px solid #EDF2F7;
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 5px 0 #CBD5E1;
  transition: transform 0.1s;
}

.game-hub-card:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #CBD5E1;
}

.game-hub-icon {
  font-size: 44px;
  margin-bottom: 8px;
}

.game-hub-title {
  font-size: 16px;
  font-weight: 900;
  color: #2D3436;
}

.game-hub-desc {
  font-size: 12px;
  font-weight: 700;
  color: #747D8C;
  margin-top: 4px;
}

.game-reward-badge {
  font-size: 12px;
  font-weight: 800;
  background: #FFEAA7;
  color: #D35400;
  padding: 3px 8px;
  border-radius: 10px;
  margin-top: 8px;
}

/* In-Game Arena Canvas Containers */
.mini-game-arena {
  position: relative;
  width: 100%;
  height: 380px;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

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

/* Memory Match Styles */
.memory-header {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: #F1F2F6;
  border-radius: 14px;
  font-weight: 800;
  font-size: 15px;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.memory-card {
  aspect-ratio: 1;
  perspective: 600px;
  cursor: pointer;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.4s;
  transform-style: preserve-3d;
}

.memory-card.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 0 #CBD5E1;
}

.card-front {
  background: #6C5CE7;
  color: white;
  font-size: 26px;
  font-weight: 900;
}

.card-back {
  transform: rotateY(180deg);
  border: 2px solid #FFF;
}

.card-emoji {
  font-size: 28px;
}

.card-name {
  font-size: 10px;
  font-weight: 800;
  color: #2D3436;
}

/* Dance Party Styles */
.dance-header {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: #F1F2F6;
  border-radius: 14px;
  font-weight: 800;
}

.dance-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  gap: 16px;
}

.dance-feedback {
  font-size: 22px;
  font-weight: 900;
  color: #6C5CE7;
  height: 32px;
}

.dance-feedback.hit {
  color: #2ED573;
  animation: pulseHint 0.3s;
}

.dance-feedback.miss {
  color: #FF4757;
}

.dance-pads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  max-width: 320px;
}

.dance-pad {
  height: 80px;
  border-radius: 20px;
  border: none;
  font-size: 24px;
  font-weight: 900;
  color: white;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

.dance-pad:active {
  transform: scale(0.95);
}

.pad-left { background: #FF6584; box-shadow: 0 6px 0 #C23616; }
.pad-down { background: #00CEC9; box-shadow: 0 6px 0 #009893; }
.pad-up { background: #FFA502; box-shadow: 0 6px 0 #C47900; }
.pad-right { background: #6C5CE7; box-shadow: 0 6px 0 #4B38C2; }

.dance-pad.active-target {
  filter: brightness(1.35);
  transform: scale(1.06);
  border: 4px solid white;
}

/* Collection Album Grid */
.album-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.album-pal-card {
  background: white;
  border: 3px solid #EDF2F7;
  border-radius: 18px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 0 #CBD5E1;
}

.album-pal-card.locked {
  filter: grayscale(1);
  opacity: 0.65;
}

.album-pal-card.active-pal {
  border-color: #6C5CE7;
  background: #F8F5FF;
}

.album-avatar {
  font-size: 34px;
  margin-bottom: 4px;
}

.album-pal-name {
  font-size: 13px;
  font-weight: 900;
  color: #2D3436;
}

.album-pal-rarity {
  font-size: 10px;
  font-weight: 800;
  margin-top: 2px;
}

/* Dress-Up Wardrobe */
.wardrobe-sections {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wardrobe-category-title {
  font-size: 15px;
  font-weight: 900;
  color: #636E72;
}

.wardrobe-item-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px;
}

.wardrobe-item-card {
  flex: 0 0 95px;
  background: white;
  border: 3px solid #E2E8F0;
  border-radius: 16px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 0 #CBD5E1;
}

.wardrobe-item-card.equipped {
  border-color: #2ED573;
  background: #E8F8F0;
}

.wardrobe-icon {
  font-size: 32px;
}

.wardrobe-name {
  font-size: 11px;
  font-weight: 800;
  margin-top: 4px;
  text-align: center;
}

.wardrobe-buy-btn {
  font-size: 10px;
  font-weight: 800;
  background: #FFEAA7;
  color: #D35400;
  padding: 3px 6px;
  border-radius: 8px;
  margin-top: 4px;
  border: none;
}

/* Creative Studio */
.studio-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.studio-tab-btn {
  flex: 1;
  padding: 10px;
  border-radius: 16px;
  border: none;
  font-size: 14px;
  font-weight: 900;
  background: #EDF2F7;
  color: #718096;
  cursor: pointer;
}

.studio-tab-btn.active {
  background: #6C5CE7;
  color: white;
}

.coloring-canvas-wrap {
  position: relative;
  width: 100%;
  height: 280px;
  background: white;
  border: 3px solid #CBD5E1;
  border-radius: 16px;
  overflow: hidden;
}

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

.coloring-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.color-swatch.selected {
  transform: scale(1.2);
  border-color: #2D3436;
}

.studio-tool-btn {
  padding: 8px 12px;
  border-radius: 14px;
  border: 2px solid #E2E8F0;
  background: white;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 0 #CBD5E1;
}

/* Parent Gate Modal */
.parent-gate-card {
  text-align: center;
  padding: 10px;
}

.parent-shield-icon {
  font-size: 54px;
  margin-bottom: 8px;
}

.parent-math-box {
  background: #FFEAA7;
  padding: 16px;
  border-radius: 18px;
  font-size: 26px;
  font-weight: 900;
  color: #D35400;
  margin: 14px 0;
  letter-spacing: 2px;
}

.parent-input-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 14px;
}

.parent-input {
  width: 110px;
  height: 52px;
  text-align: center;
  font-size: 24px;
  font-weight: 900;
  border-radius: 16px;
  border: 3px solid #6C5CE7;
  outline: none;
}

/* Word of the Day Card */
.word-banner {
  background: linear-gradient(135deg, #FF9FF3, #FECA57);
  border-radius: 20px;
  padding: 16px;
  color: #2D3436;
  text-align: center;
}

.word-term {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 1px;
}

.word-phonetic {
  font-size: 13px;
  font-weight: 700;
  color: #485460;
  margin-top: 2px;
}

.word-meaning {
  font-size: 15px;
  font-weight: 700;
  margin: 10px 0;
  line-height: 1.4;
}

.word-sample {
  font-size: 13px;
  font-style: italic;
  color: #2F3542;
}

/* Confetti overlay */
#confetti-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

/* Mood System & Care Drawer */
.mood-speech-bubble {
  position: absolute;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.96);
  border: 3px solid #6C5CE7;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 800;
  color: #2D3436;
  box-shadow: 0 6px 18px rgba(108, 92, 231, 0.25);
  z-index: 12;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
}

.mood-speech-bubble.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-6px);
}

.mood-status-pill {
  position: absolute;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border: 3px solid #FFF;
  border-radius: 20px;
  padding: 5px 14px;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.mood-status-pill:active {
  transform: translateX(-50%) scale(0.94);
}

.mood-emoji {
  font-size: 20px;
}

.mood-text {
  font-size: 13px;
  font-weight: 900;
  color: #2D3436;
}

.mood-sparkle {
  font-size: 13px;
  animation: pulseHint 1s infinite ease-in-out;
}

.shapeshift-badge {
  position: absolute;
  top: 86px;
  right: 14px;
  background: #FFEAA7;
  border: 2px solid #FDCB6E;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 900;
  color: #D35400;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 3px 0 #E1B12C;
  z-index: 12;
}

.shapeshift-badge button {
  background: #FF6584;
  border: none;
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.care-stats-drawer {
  position: absolute;
  bottom: 86px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 360px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 24px;
  border: 3px solid #FFF;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  padding: 14px;
  z-index: 18;
  display: none;
  flex-direction: column;
  gap: 10px;
  animation: popUp 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.care-stats-drawer.show {
  display: flex;
}

.care-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.care-drawer-close {
  background: #DFE6E9;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-weight: 900;
  cursor: pointer;
}

.care-meters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.care-meter-item {
  background: #F8F9FA;
  padding: 8px;
  border-radius: 12px;
}

.care-meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  color: #636E72;
  margin-bottom: 4px;
}

.meter-bar-bg {
  width: 100%;
  height: 8px;
  background: #EDF2F7;
  border-radius: 4px;
  overflow: hidden;
}

.meter-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
}

.fill-hunger { background: linear-gradient(90deg, #FFA502, #FF4757); }
.fill-happiness { background: linear-gradient(90deg, #FF9FF3, #FECA57); }
.fill-clean { background: linear-gradient(90deg, #74B9FF, #00CEC9); }
.fill-energy { background: linear-gradient(90deg, #A29BFE, #6C5CE7); }

.care-mood-buttons {
  display: flex;
  gap: 6px;
  justify-content: space-between;
  margin-top: 4px;
}

.mood-chip-btn {
  flex: 1;
  padding: 6px 2px;
  border-radius: 12px;
  border: 2px solid #E2E8F0;
  background: #FFF;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 0 #CBD5E1;
}

.mood-chip-btn.active {
  background: #F3F0FF;
  border-color: #6C5CE7;
  color: #6C5CE7;
  box-shadow: 0 2px 0 #6C5CE7;
}

/* Head Shapeshifter Modal Styles */
.shapeshift-preview-frame {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 12px auto;
  border-radius: 50%;
  border: 5px solid #FECA57;
  box-shadow: 0 0 24px rgba(254, 202, 87, 0.6);
  overflow: hidden;
  background: radial-gradient(circle, #FFF 40%, #FFEAA7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.shapeshift-presets-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
  margin: 8px 0;
}

.preset-btn {
  background: white;
  border: 2px solid #E2E8F0;
  border-radius: 14px;
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 0 #CBD5E1;
  line-height: 1.3;
}

.preset-btn.selected {
  border-color: #6C5CE7;
  background: #F3F0FF;
  box-shadow: 0 3px 0 #6C5CE7;
  transform: translateY(-2px);
}

.filter-chip-btn {
  padding: 6px 12px;
  border-radius: 14px;
  border: 2px solid #E2E8F0;
  background: white;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.filter-chip-btn.active {
  background: #FFEAA7;
  border-color: #FECA57;
  color: #D35400;
}

/* Sign-Up Modal */
.signup-input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  margin-top: 6px;
  font-size: 17px;
  font-weight: 700;
  border-radius: 16px;
  border: 3px solid #6C5CE7;
  outline: none;
  color: #2D3436;
  background: #FFF;
}

/* Pay Screen */
.pay-price-tag {
  font-size: 44px;
  font-weight: 900;
  color: #27AE60;
  background: #E8F8F0;
  border: 3px solid #2ED573;
  border-radius: 22px;
  padding: 8px 28px;
}
