/* ========================================
   Spoken - Visual Style Guidelines
   Color Palette: Teal, Coral, Sunshine Yellow (pastels)
   Typography: Poppins/Muli for parents, Baloo for kids
   ======================================== */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Muli:wght@300;400;500;600;700&family=Baloo+2:wght@400;500;600;700;800&display=swap');

/* Root Variables */
:root {
  /* Color Palette - Bright Pastels */
  --teal-primary: #5DCED0;
  --teal-light: #A8E8E9;
  --teal-dark: #3BA5A7;
  --teal-bg: #E8F8F8;
  
  --coral-primary: #FF8B94;
  --coral-light: #FFBFC5;
  --coral-dark: #E96570;
  --coral-bg: #FFF0F1;
  
  --yellow-primary: #FFD93D;
  --yellow-light: #FFEB8C;
  --yellow-dark: #F4C430;
  --yellow-bg: #FFFBEB;
  
  /* Neutral Colors */
  --white: #FFFFFF;
  --gray-light: #F8F9FA;
  --gray-medium: #6C757D;
  --gray-dark: #2C3E50;
  
  /* Success/Error/Info */
  --success: #6BCB77;
  --error: #FF6B6B;
  --info: #4D96FF;
  
  /* Typography */
  --font-parent: 'Poppins', 'Muli', sans-serif;
  --font-kid: 'Baloo 2', cursive;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-xl: 0 12px 36px rgba(0,0,0,0.15);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-parent);
  color: var(--gray-dark);
  line-height: 1.6;
  background: linear-gradient(135deg, var(--teal-bg) 0%, var(--yellow-bg) 50%, var(--coral-bg) 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Hide scrollbar globally for all devices */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

html,
body {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

/* Ensure no horizontal scroll on mobile */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
  }
}

/* Typography - Parent Sections */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-parent);
  font-weight: 600;
  color: var(--gray-dark);
  margin-bottom: var(--space-md);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

/* Typography - Kid Sections */
.kid-mode h1,
.kid-mode h2,
.kid-mode h3,
.kid-heading {
  font-family: var(--font-kid);
  font-weight: 700;
  color: var(--teal-dark);
}

.kid-mode h1 { font-size: 3rem; }
.kid-mode h2 { font-size: 2.5rem; }
.kid-mode h3 { font-size: 2rem; }

/* Navigation Bar */
.navbar {
  background: #FAFAFA;
  padding: var(--space-md) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid transparent;
  transition: border-bottom-color 0.3s ease;
}

.navbar.scrolled {
  border-bottom-color: #e5e7eb;
}

.navbar-brand {
  font-family: var(--font-parent);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0;
  transition: opacity 0.2s ease;
}

@media (min-width: 640px) {
  .navbar-brand {
    font-size: 1.8rem;
  }
}

.navbar-brand:hover {
  opacity: 0.8;
}

.navbar-brand span {
  color: var(--teal-dark);
  font-weight: 700;
  font-family: var(--font-kid);
}

/* Buttons */
.btn {
  font-family: var(--font-parent);
  font-weight: 500;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--teal-primary), var(--teal-dark));
  color: var(--white);
  box-shadow: 0 4px 12px rgba(93, 206, 208, 0.3);
}

.btn-primary:hover {
  filter: brightness(0.95);
  box-shadow: 0 4px 12px rgba(93, 206, 208, 0.25);
}

.btn-coral {
  background: linear-gradient(135deg, var(--coral-primary), var(--coral-dark));
  color: var(--white);
  box-shadow: 0 4px 12px rgba(255, 139, 148, 0.3);
}

.btn-coral:hover {
  filter: brightness(0.95);
  box-shadow: 0 4px 12px rgba(255, 139, 148, 0.25);
}

.btn-yellow {
  background: linear-gradient(135deg, var(--yellow-primary), var(--yellow-dark));
  color: var(--gray-dark);
  box-shadow: 0 4px 12px rgba(255, 217, 61, 0.3);
}

.btn-yellow:hover {
  filter: brightness(0.95);
  box-shadow: 0 4px 12px rgba(255, 217, 61, 0.25);
}

.btn-lg {
  padding: var(--space-lg) var(--space-xl);
  font-size: 1.1rem;
}

.btn-kid {
  font-family: var(--font-kid);
  font-size: 1.1rem;
  padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-full);
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.card:hover {
  /* Shadow removed for cleaner hover state */
}

.feature-card {
  text-align: center;
  padding: var(--space-xl);
  background: linear-gradient(135deg, var(--white), var(--gray-light));
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  display: inline-block;
}

/* Hero Section */
.hero {
  padding: var(--space-2xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-title {
  font-family: var(--font-kid);
  font-size: 4rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: var(--space-lg);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2rem;
    white-space: normal;
  }
}

@media (max-width: 500px) {
  .hero-title {
    font-size: 3.5rem;
    white-space: normal;
    line-height: 1.2;
  }
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--gray-medium);
  margin-bottom: var(--space-xl);
  font-weight: 400;
}

/* Ty Mascot */
.ty-mascot {
  width: 150px;
  height: 150px;
  display: inline-block;
  position: relative;
}

/* Speech bubble for mascot */
.ty-bubble {
  background: var(--white);
  border: 3px solid var(--teal-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  position: relative;
  font-family: var(--font-kid);
  font-size: 1.2rem;
  color: var(--teal-dark);
  display: inline-block;
  margin: var(--space-md);
  box-shadow: var(--shadow-md);
}

.ty-bubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 30px;
  width: 20px;
  height: 20px;
  background: var(--white);
  border-right: 3px solid var(--teal-primary);
  border-bottom: 3px solid var(--teal-primary);
  transform: rotate(45deg);
  z-index: -1;
}

/* Progress Bars */
.progress-container {
  background: var(--gray-light);
  border-radius: var(--radius-full);
  height: 30px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--teal-primary), var(--coral-primary));
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Kid Dashboard */
.kid-dashboard {
  background: var(--yellow-bg);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
}

.game-button {
  background: linear-gradient(135deg, var(--coral-light), var(--coral-primary));
  border: none;
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.game-button:hover {
  box-shadow: var(--shadow-xl);
}

.game-button::before {
  content: '✨';
  position: absolute;
  font-size: 2rem;
  animation: sparkle 1.5s infinite;
  top: 10px;
  right: 10px;
}

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1); }
}

/* Coins Display */
.coins-display {
  background: linear-gradient(135deg, var(--yellow-light), var(--yellow-primary));
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-family: var(--font-kid);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-dark);
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  box-shadow: var(--shadow-md);
}

.coins-display .coin-icon {
  transition: transform 0.3s ease;
}

.coins-display:hover .coin-icon {
  transform: rotate(15deg);
}

/* Toast Notifications */
.toast {
  position: fixed;
  top: 80px;
  right: 20px;
  background: var(--white);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--teal-primary);
  animation: slideInRight 0.3s ease-out;
  z-index: 2000;
  max-width: 350px;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--error); }
.toast.info { border-left-color: var(--info); }

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 1.1rem; }
  
  .btn-lg {
    padding: var(--space-sm) var(--space-md);
    font-size: 1rem;
  }
  
  .feature-card {
    padding: var(--space-md);
  }
  
  .ty-mascot {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 640px) {
  .navbar {
    padding: var(--space-sm) 0;
  }
  
  .btn {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
  }
  
  .btn-lg, .btn-kid {
    padding: var(--space-md) var(--space-lg);
  }
  
  .coins-display {
    padding: var(--space-xs) var(--space-sm);
    font-size: 1rem;
  }
}

/* Confetti Animation */
.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  background: var(--coral-primary);
  animation: fall 3s linear infinite;
}

@keyframes fall {
  to { transform: translateY(100vh) rotate(360deg); }
}

/* Star Burst Effect */
.star-burst {
  position: absolute;
  width: 30px;
  height: 30px;
  animation: burst 0.5s ease-out forwards;
}

@keyframes burst {
  0% { transform: scale(0) rotate(0deg); opacity: 1; }
  100% { transform: scale(3) rotate(180deg); opacity: 0; }
}

/* Badge Styles */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  background: var(--teal-light);
  color: var(--teal-dark);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
}

.badge-success { background: var(--success); color: var(--white); }
.badge-coral { background: var(--coral-light); color: var(--coral-dark); }
.badge-yellow { background: var(--yellow-light); color: var(--yellow-dark); }

/* Trust Signals Section */
.trust-signals {
  background: var(--white);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  text-align: center;
  margin: var(--space-2xl) 0;
  box-shadow: var(--shadow-md);
}

.trust-badge {
  display: inline-block;
  margin: 0 var(--space-md);
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.trust-badge:hover {
  opacity: 1;
}

/* Sound Pills */
.sound-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-full);
  font-family: var(--font-kid);
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: var(--space-sm);
}

.sound-pill.r-sound {
  background: linear-gradient(135deg, var(--coral-light), var(--coral-primary));
  color: var(--white);
}

.sound-pill.s-sound {
  background: linear-gradient(135deg, var(--teal-light), var(--teal-primary));
  color: var(--white);
}

.sound-pill.th-sound {
  background: linear-gradient(135deg, var(--yellow-light), var(--yellow-primary));
  color: var(--gray-dark);
}

.sound-pill:hover {
  box-shadow: var(--shadow-lg);
  opacity: 0.9;
}

.sound-pill.active {
  animation: bounce 0.5s;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}