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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg, #1e3a5f 0%, #2a5c8a 100%);
  color: #fff;
  min-height: 100vh;
  overflow: hidden;
  user-select: none;
}

#app {
  position: relative;
  width: 100vw;
  height: 100vh;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px;
}

.hidden { display: none !important; }

h1 { font-size: 3.5rem; text-shadow: 3px 3px 0 #000; }
h2 { font-size: 2.5rem; text-shadow: 2px 2px 0 #000; }

.santa-big { font-size: 8rem; }
.santa-small {
  position: absolute;
  right: 20px;
  bottom: 20px;
  font-size: 4rem;
  pointer-events: none;
}

.btn-big {
  font-size: 2rem;
  padding: 15px 40px;
  background: #e8432d;
  color: #fff;
  border: 4px solid #fff;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
}
.btn-big:hover { background: #ff5a3f; }
.btn-big:active { transform: scale(0.96); }

.high-score { font-size: 1.2rem; opacity: 0.85; }
.warn { color: #ffcc44; font-weight: bold; }

.hud {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-around;
  padding: 15px;
  background: rgba(0,0,0,0.35);
  font-size: 1.5rem;
  z-index: 10;
}
.hud-item { font-weight: bold; }

#playfield, #bonus-field {
  position: absolute;
  top: 70px; left: 0; right: 0; bottom: 0;
  cursor: crosshair;
}

.cookie {
  position: absolute;
  width: 160px;
  height: 160px;
  font-size: 130px;
  line-height: 160px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.1s;
}
.cookie:active { transform: scale(0.92); }
.cookie.stage-0 { filter: none; }
.cookie.stage-1 { filter: brightness(0.85); }
.cookie.stage-2 { filter: brightness(0.7); transform: rotate(-8deg); }

.float-text {
  position: absolute;
  font-size: 2rem;
  font-weight: bold;
  pointer-events: none;
  animation: floatUp 0.8s ease-out forwards;
  text-shadow: 2px 2px 0 #000;
}
.float-text.plus { color: #6f6; }
.float-text.minus { color: #f66; }
@keyframes floatUp {
  0%   { transform: translateY(0);   opacity: 1; }
  100% { transform: translateY(-60px); opacity: 0; }
}

.shake { animation: shake 0.25s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.falling-cookie {
  position: absolute;
  width: 180px;
  height: 180px;
  font-size: 150px;
  line-height: 180px;
  text-align: center;
  cursor: pointer;
}

.bonus-lost-flash {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: #f44;
  background: rgba(0,0,0,0.4);
  text-shadow: 3px 3px 0 #000;
  animation: flashFade 0.9s forwards;
  pointer-events: none;
  z-index: 20;
  font-weight: bold;
}
@keyframes flashFade {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

.santa-bounce { animation: santaBounce 0.5s; }
@keyframes santaBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-20px) scale(1.1); }
}
