/* ==========================================================================
   Linus LetterPro - Toddler Playland Theme & Visual Delights
   Vibrant cartoon aesthetics, candy 3D cards, floating toys & playful mascot
   ========================================================================== */

:root {
  --toddler-sky: linear-gradient(180deg, #38BDF8 0%, #818CF8 60%, #C084FC 100%);
  --toddler-card-bg: #FFFFFF;
  --toddler-card-shadow: 0 8px 0 rgba(0, 0, 0, 0.18), 0 16px 30px rgba(0, 0, 0, 0.15);
}

/* Background Atmosphere */
body {
  background: radial-gradient(circle at 50% 20%, #1E3A8A 0%, #0F172A 70%, #090D16 100%) !important;
  color: #FFFFFF;
}

/* Floating Interactive Toys Background */
#floating-toys-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
}

.floating-toy {
  position: absolute;
  bottom: -60px;
  pointer-events: auto;
  cursor: pointer;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  animation: floatUp linear infinite;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-toy:hover {
  transform: scale(1.3) rotate(15deg);
}

.floating-toy.pop-burst {
  transform: scale(1.8);
  opacity: 0;
  filter: blur(4px);
  transition: all 0.25s ease-out;
}

.toy-spark-pop {
  position: fixed;
  font-size: 22px;
  font-weight: 900;
  color: #FDE047;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  animation: sparkFloat 0.8s ease-out forwards;
  z-index: 99;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.85;
  }
  90% {
    opacity: 0.85;
  }
  100% {
    transform: translateY(-110vh) rotate(360deg);
    opacity: 0;
  }
}

@keyframes sparkFloat {
  0% { transform: translateY(0) scale(0.8); opacity: 1; }
  100% { transform: translateY(-40px) scale(1.3); opacity: 0; }
}

/* Mascot Welcome Header */
.mascot-hero-container {
  width: 100%;
  max-width: 960px;
  min-height: 125px !important;
  flex-shrink: 0 !important;
  background: linear-gradient(135deg, #1E40AF 0%, #6B21A8 60%, #BE185D 100%);
  border: 4px solid #60A5FA;
  border-radius: 28px;
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 10px 0 #1E3A8A, 0 18px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.mascot-hero-container::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, transparent 70%);
  border-radius: 50%;
}

.mascot-left {
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 2;
}

.mascot-character {
  font-size: 64px;
  cursor: pointer;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.35));
  animation: mascotWiggle 3s infinite ease-in-out;
  transition: transform 0.2s ease;
}

.mascot-character:hover {
  transform: scale(1.15) rotate(8deg);
}

.mascot-character.bounce-wobble {
  animation: mascotJump 0.5s ease;
}

.speech-bubble {
  position: relative;
  background: #FFFFFF;
  color: #1E293B;
  border-radius: 18px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  max-width: 340px;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 8px 10px 8px 0;
  border-style: solid;
  border-color: transparent #FFFFFF transparent transparent;
}

.speech-bubble.pop-bubble {
  animation: bubblePop 0.35s ease;
}

/* ==========================================================================
   "Write My Name!" Card (Special Feature Card)
   ========================================================================== */

.name-studio-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #F59E0B 0%, #EC4899 50%, #8B5CF6 100%) !important;
  border: 4px solid #FDE047 !important;
  box-shadow: 0 8px 0 #B45309, 0 15px 30px rgba(0, 0, 0, 0.35) !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 22px 28px !important;
  border-radius: 26px !important;
}

.name-studio-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.name-studio-badge-icon {
  font-size: 48px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  padding: 10px;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.4);
}

.name-studio-title {
  font-size: 26px;
  font-weight: 900;
  color: #FFFFFF;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.name-letters-preview {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.name-pill-letter {
  background: #FFFFFF;
  color: #1E3A8A;
  font-size: 22px;
  font-weight: 900;
  padding: 4px 14px;
  border-radius: 12px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2);
}

.btn-start-name {
  background: #FFFFFF !important;
  color: #BE185D !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  padding: 14px 28px !important;
  border-radius: 20px !important;
  box-shadow: 0 6px 0 #CBD5E1, 0 10px 20px rgba(0, 0, 0, 0.25) !important;
}

.btn-start-name:hover {
  transform: translateY(-3px) scale(1.04);
}

/* ==========================================================================
   Chunky Candy Mode Cards
   ========================================================================== */

.modes-grid {
  gap: 22px !important;
}

.mode-card {
  border-radius: 26px !important;
  border-width: 3px !important;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.3), 0 16px 24px rgba(0, 0, 0, 0.25) !important;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.15s ease !important;
}

.mode-card:hover {
  transform: translateY(-6px) scale(1.02) !important;
  box-shadow: 0 12px 0 rgba(0, 0, 0, 0.3), 0 22px 30px rgba(0, 0, 0, 0.35) !important;
}

.mode-card:active {
  transform: translateY(3px) scale(0.97) !important;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3) !important;
}

.mode-icon-circle {
  width: 68px !important;
  height: 68px !important;
  font-size: 36px !important;
  border-radius: 22px !important;
  border: 3px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.mode-title {
  font-size: 21px !important;
  font-weight: 900 !important;
  letter-spacing: 0.3px;
}

.mode-desc {
  font-size: 14px !important;
  font-weight: 500;
  line-height: 1.45 !important;
}

/* ==========================================================================
   Name Mode Tracing HUD
   ========================================================================== */

#name-hud {
  display: none;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.3), rgba(139, 92, 246, 0.3));
  border: 2px solid #EC4899;
  padding: 6px 18px;
  border-radius: 24px;
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.25);
}

.name-hud-title-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.name-hud-tag {
  font-size: 10px;
  font-weight: 900;
  color: #F472B6;
  letter-spacing: 0.5px;
}

.name-hud-full-name {
  font-size: 16px;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: 1px;
}

#name-letters-track {
  display: flex;
  gap: 8px;
  align-items: center;
}

.name-letter-pill {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: #FFFFFF;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.name-letter-pill:hover {
  transform: scale(1.08);
}

.name-letter-pill.active {
  background: #FBBF24;
  color: #78350F;
  border-color: #FFFFFF;
  transform: scale(1.2);
  box-shadow: 0 0 16px #F59E0B;
}

.name-letter-pill.completed {
  background: #10B981;
  color: #FFFFFF;
  border-color: #34D399;
}

.pill-check {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 10px;
  background: #FFFFFF;
  color: #059669;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

/* Name Victory Modal */
.name-victory-card {
  text-align: center;
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 100%) !important;
  border: 4px solid #FBBF24 !important;
  max-width: 620px !important;
  padding: 32px 24px !important;
}

.confetti-burst-icon {
  font-size: 60px;
  animation: gentleBounce 1.5s infinite;
}

.name-victory-title {
  font-size: 36px;
  font-weight: 900;
  color: #FDE047;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  margin: 8px 0;
}

.name-victory-subtitle {
  font-size: 16px;
  font-weight: 800;
  color: #A5B4FC;
  letter-spacing: 2px;
}

.spelled-name-banner {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 24px 0;
}

.banner-letter-box {
  background: #FFFFFF;
  color: #312E81;
  font-size: 40px;
  font-weight: 900;
  width: 58px;
  height: 68px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 0 #CBD5E1, 0 10px 20px rgba(0, 0, 0, 0.35);
  animation: letterDrop 0.4s ease-out backwards;
}

.name-trophy-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(245, 158, 11, 0.15);
  border: 2px dashed #F59E0B;
  border-radius: 18px;
  padding: 12px 20px;
  margin-bottom: 24px;
}

.trophy-emoji {
  font-size: 38px;
}

/* Name Custom Input Dialog */
.name-input-card {
  text-align: center;
  max-width: 480px;
}

.name-input-field {
  width: 100%;
  font-size: 32px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 4px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 3px solid #3B82F6;
  background: rgba(15, 23, 42, 0.85);
  color: #FDE047;
  margin: 16px 0;
  outline: none;
}

.quick-names-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
}

.btn-pill-name {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-pill-name:hover {
  background: #3B82F6;
  transform: translateY(-2px);
}

/* Keyframe Animations */
@keyframes mascotWiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

@keyframes mascotJump {
  0% { transform: translateY(0); }
  50% { transform: translateY(-18px) scale(1.2); }
  100% { transform: translateY(0); }
}

@keyframes bubblePop {
  0% { transform: scale(0.7); opacity: 0; }
  70% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}

/* Spacer dot between words in Name Mode */
.name-space-spacer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 48px;
  color: #FDE047;
  font-size: 28px;
  font-weight: 900;
  opacity: 0.8;
  user-select: none;
}


@keyframes letterDrop {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
