/* ====================================================
   BASE STYLES, RESET & RESPONSIVE LAYOUT
   ==================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

input, textarea, select {
  user-select: text;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 48px);
  transition: background-color 0.25s ease, color 0.25s ease;
  -webkit-font-smoothing: antialiased;
}

/* Responsive App Shell Container */
#app {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg) calc(var(--space-2xl) + 16px) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  #app {
    padding: var(--space-xl) var(--space-2xl);
    max-width: 620px;
  }
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-white);
  line-height: 1.25;
}

p {
  color: var(--text-secondary);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes slideUpDrawer {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 16px var(--orange-glow); }
  50% { box-shadow: 0 0 28px var(--orange-glow); }
}

.animate-fade-in {
  animation: fadeIn 0.25s ease forwards;
}

/* Hidden Utility */
.hidden {
  display: none !important;
}

/* Canvas Confetti */
#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}
