:root {
  --bg-cream: #FFF8F0;
  --bg-warm: #FFF0E0;
  --pink-soft: #FFB5C2;
  --pink-deep: #FF7B9C;
  --orange-warm: #FF9F5A;
  --yellow-warm: #FFD93D;
  --teal-accent: #4ECDC4;
  --teal-deep: #2AB7A9;
  --brown-warm: #8B6F5C;
  --brown-light: #C4A882;
  --green-health: #6BCB77;
  --red-danger: #FF6B6B;
  --purple-soft: #B197FC;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Fredoka', sans-serif;
  background: var(--bg-cream);
  overflow-x: hidden;
  min-height: 100vh;
}

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

@keyframes bobble {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-4px) rotate(-2deg); }
  75% { transform: translateY(-2px) rotate(2deg); }
}

@keyframes coinFloat {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-80px) scale(0.5); }
}

@keyframes heartFloat {
  0% { opacity: 1; transform: translateY(0) scale(0.5); }
  50% { opacity: 0.8; transform: translateY(-40px) scale(1.2); }
  100% { opacity: 0; transform: translateY(-80px) scale(0.3); }
}

@keyframes bounceIn {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(255, 107, 107, 0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

@keyframes confetti {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(200px) rotate(720deg); opacity: 0; }
}

@keyframes blink {
  0%, 45%, 55%, 100% { opacity: 1; }
  50% { opacity: 0.1; }
}

@keyframes tailWag {
  0%, 100% { transform: rotate(-15deg); }
  50% { transform: rotate(15deg); }
}

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

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes typewriter {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes sweepAnim {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(-20deg); }
  50% { transform: rotate(20deg); }
  75% { transform: rotate(-10deg); }
  100% { transform: rotate(0deg); }
}

@keyframes poopBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

@keyframes coinBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

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

@keyframes runAway {
  0% { transform: translateX(0) scaleX(1); opacity: 1; }
  30% { transform: translateX(0) scaleX(-1); opacity: 1; }
  100% { transform: translateX(300px) scaleX(-1); opacity: 0; }
}

@keyframes comeBack {
  0% { transform: translateX(-300px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

.coin-float {
  animation: coinFloat 1s ease-out forwards;
  pointer-events: none;
  position: absolute;
  font-weight: 700;
  z-index: 100;
}

.heart-float {
  animation: heartFloat 1.2s ease-out forwards;
  pointer-events: none;
  position: absolute;
  z-index: 100;
}

.confetti-piece {
  animation: confetti 1.5s ease-out forwards;
  pointer-events: none;
  position: fixed;
  z-index: 200;
  font-size: 24px;
}

.progress-bar {
  border-radius: 999px;
  overflow: hidden;
  height: 20px;
  background: #e8e0d8;
  position: relative;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease, background-color 0.5s ease;
}

.btn-action {
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.btn-action:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-action:active {
  transform: translateY(1px) scale(0.97);
}

.btn-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.5);
}

.btn-pulse {
  animation: pulse 1.5s infinite;
}

.shop-item {
  background: white;
  border-radius: 16px;
  padding: 16px;
  border: 2px solid #f0e8e0;
  transition: all 0.2s ease;
  cursor: pointer;
}

.shop-item:hover {
  border-color: var(--teal-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.shop-item.purchased {
  border-color: var(--green-health);
  background: #f0fff4;
}

.room-bg {
  background: linear-gradient(180deg, #FFE8D6 0%, #FFDBC2 40%, #D4A574 40%, #C49A6C 100%);
  position: relative;
}

.room-bg::before {
  content: '';
  position: absolute;
  top: 8%;
  left: 10%;
  width: 25%;
  height: 28%;
  background: linear-gradient(135deg, #87CEEB 0%, #B0E0E6 100%);
  border-radius: 8px;
  border: 6px solid var(--brown-warm);
  box-shadow: inset 0 0 20px rgba(255,255,255,0.3);
}

.room-bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: repeating-linear-gradient(
    90deg,
    #C49A6C 0px,
    #C49A6C 40px,
    #B8916A 40px,
    #B8916A 80px
  );
}

.tab-btn {
  padding: 10px 20px;
  border: none;
  background: transparent;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border-radius: 12px 12px 0 0;
  transition: all 0.2s;
  color: var(--brown-warm);
}

.tab-btn.active {
  background: white;
  color: var(--teal-deep);
  box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
}

.welcome-back-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  animation: fadeIn 0.3s ease;
}

.welcome-back-card {
  background: white;
  border-radius: 24px;
  padding: 32px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  animation: bounceIn 0.4s ease;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--brown-light);
  border-radius: 3px;
}