:root {
  --coral: #FF6B6B;
  --yellow: #FFE66D;
  --mint: #4ECDC4;
  --cream: #FFF9F0;
  --pink: #FF8E72;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--cream);
}

.bg-cream { background-color: var(--cream); }
.bg-coral { background-color: var(--coral); }
.bg-mint { background-color: var(--mint); }
.text-coral { color: var(--coral); }
.text-mint { color: var(--mint); }
.from-coral { --tw-gradient-from: var(--coral); }
.to-yellow { --tw-gradient-to: var(--yellow); }

.header-gradient {
  background: linear-gradient(135deg, var(--coral) 0%, var(--pink) 100%);
  padding-bottom: 2rem;
}

.bone-decoration {
  position: absolute;
  width: 40px;
  height: 16px;
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
}

.bone-decoration::before,
.bone-decoration::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  top: 0;
}

.bone-decoration::before { left: -6px; }
.bone-decoration::after { right: -6px; }

.bone-1 { top: 20px; right: 20px; transform: rotate(25deg); }
.bone-2 { bottom: 40px; left: 15px; transform: rotate(-15deg); }

.coin-bounce {
  animation: coinBounce 2s ease-in-out infinite;
}

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

/* Savings Jar */
.savings-jar {
  width: 80px;
  height: 100px;
  position: relative;
  flex-shrink: 0;
}

.jar-body {
  width: 70px;
  height: 80px;
  background: linear-gradient(135deg, #FFD93D 0%, #FF9F1C 100%);
  border-radius: 35px 35px 20px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 -10px 20px rgba(0,0,0,0.1);
  margin: 0 auto;
}

.jar-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--mint) 0%, #2ECC71 100%);
  transition: height 0.5s ease-out;
  border-radius: 0 0 18px 18px;
}

.jar-face {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.jar-eyes {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.jar-eye {
  width: 8px;
  height: 8px;
  background: #333;
  border-radius: 50%;
  animation: blink 3s infinite;
}

@keyframes blink {
  0%, 90%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

.jar-nose {
  width: 14px;
  height: 10px;
  background: #333;
  border-radius: 50%;
  margin: 6px auto 4px;
}

.jar-mouth {
  width: 20px;
  height: 6px;
  border: 2px solid #333;
  border-top: none;
  border-radius: 0 0 10px 10px;
  margin: 0 auto;
}

.jar-ears {
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
}

.jar-ear {
  position: absolute;
  width: 20px;
  height: 25px;
  background: #FF9F1C;
  border-radius: 10px 10px 0 0;
}

.jar-ear.left { left: 5px; transform: rotate(-15deg); }
.jar-ear.right { right: 5px; transform: rotate(15deg); }

.jar-wiggle {
  animation: wiggle 0.6s ease-in-out;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

.jar-dance {
  animation: dance 1s ease-in-out infinite;
}

@keyframes dance {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-5px) rotate(-3deg); }
  50% { transform: translateY(0) rotate(0deg); }
  75% { transform: translateY(-5px) rotate(3deg); }
}

/* Progress bar */
.progress-bar {
  height: 12px;
  background: #E8E8E8;
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--coral) 0%, var(--yellow) 100%);
  border-radius: 6px;
  transition: width 0.5s ease-out;
}

/* Inputs */
.input-field {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #E8E8E8;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  transition: all 0.2s;
  background: white;
}

.input-field:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255,107,107,0.1);
}

/* Submit button */
.submit-btn {
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--coral) 0%, var(--pink) 100%);
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(255,107,107,0.3);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,107,107,0.4);
}

.submit-btn:active {
  transform: translateY(0) scale(0.98);
}

/* Category cards */
.category-card {
  padding: 12px;
  background: var(--cream);
  border-radius: 12px;
}

/* Badge cards */
.badge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  border-radius: 16px;
  transition: all 0.2s;
}

.badge-card.earned {
  background: linear-gradient(135deg, var(--yellow) 0%, #FFC107 100%);
  box-shadow: 0 4px 12px rgba(255,193,7,0.3);
}

.badge-card.locked {
  background: #E8E8E8;
  filter: grayscale(100%);
  opacity: 0.6;
}

.badge-popup {
  animation: popIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

/* History items */
.history-item {
  padding: 12px;
  border-radius: 12px;
  transition: all 0.2s;
}

.history-item:hover {
  background: var(--cream) !important;
}

/* Encouragement toast */
.encouragement-toast {
  margin-top: 12px;
  padding: 12px;
  background: linear-gradient(135deg, var(--mint) 0%, #2ECC71 100%);
  color: white;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Confetti */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  pointer-events: none;
  overflow: hidden;
  z-index: 100;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* Responsive */
@media (max-width: 480px) {
  .header-gradient {
    padding-top: 1rem;
  }
  
  h1 {
    font-size: 1.75rem !important;
  }
}