/* ==========================================================================
   main.css - Global Styles, Theme Variables & Reset
   Specifically tailored for children 5+ years with warm, accessible aesthetics
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Quicksand:wght@500;600;700;800&family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
  /* Bookshelf & Honey Oak Wood Palette */
  --wood-dark: #78350f;
  --wood-base: #92400e;
  --wood-mid: #b45309;
  --wood-light: #d97706;
  --wood-highlight: #f59e0b;
  --wood-gold: #fbbf24;
  --wood-shelf-top: #fde68a;
  --wood-shelf-face: #b45309;
  --wood-shelf-shadow: rgba(120, 53, 15, 0.35);

  /* Playful UI Palette matching mockup */
  --ui-primary: #3b82f6;
  --ui-success: #16a34a;
  --ui-warning: #f59e0b;
  --ui-danger: #ef4444;
  --ui-purple: #8b5cf6;
  --ui-pink: #ec4899;

  /* Fonts */
  --font-display: 'Fredoka', 'Quicksand', system-ui, sans-serif;
  --font-body: 'Quicksand', 'Nunito', sans-serif;

  /* Sizing & Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 9999px;

  /* Transitions */
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.25, 1, 0.5, 1);
}

/* Universal Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #fdfaf5;
  font-family: var(--font-body);
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   GLOBAL SCROLLBAR HIDING (Critical User Requirement)
   Scrollbars MUST NOT be visible anywhere on the application
   ========================================================================== */
*::-webkit-scrollbar,
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.no-scrollbar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

* {
  -ms-overflow-style: none !important;  /* IE and Edge */
  scrollbar-width: none !important;     /* Firefox */
}

/* Main App Wrapper */
#app-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 15%, #fefce8 0%, #fef3c7 30%, #ecfdf5 60%, #e0e7ff 100%);
}

/* Playful Floating Particles / Dust Motes Effect (Ambient Magic) */
.ambient-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background-image: 
    radial-gradient(circle at 20% 15%, rgba(254, 240, 138, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(254, 215, 170, 0.05) 0%, transparent 45%);
  z-index: 1;
}

/* Playful Clickable Elements Base */
button {
  font-family: var(--font-display);
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  touch-action: manipulation;
  transition: transform 0.15s var(--ease-bounce), filter 0.15s ease;
}

button:active {
  transform: scale(0.93) !important;
}

/* Screen Reader / Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Modal Backdrops */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 5, 2, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Kid-Friendly Toast Notification */
#toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 2px solid #f59e0b;
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(245, 158, 11, 0.3);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
  transition: transform 0.35s var(--ease-bounce), opacity 0.3s ease;
  opacity: 0;
}

#toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
