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

body {
  background: linear-gradient(135deg, #ffe0ec 0%, #ffd6b3 50%, #ffe0ec 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', system-ui, sans-serif;
  overflow: hidden;
}

#rain-container {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
}

.rain-butt {
  position: absolute;
  top: -3rem;
  font-size: 1.5rem;
  animation: fall linear forwards;
  user-select: none;
}

@keyframes fall {
  to { transform: translateY(110vh) rotate(360deg); opacity: 0.2; }
}

#app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 1.5rem;
  max-width: 600px;
  width: 100%;
}

header {
  text-align: center;
}

header h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: #c0392b;
  text-shadow: 3px 3px 0 #e8a0a0, 6px 6px 0 rgba(0,0,0,0.1);
  letter-spacing: 0.05em;
}

.subtitle {
  color: #a04060;
  font-size: clamp(0.7rem, 2vw, 0.95rem);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 0.25rem;
}

#counter-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

#big-butt {
  font-size: clamp(4rem, 15vw, 8rem);
  cursor: pointer;
  user-select: none;
  transition: transform 0.08s ease;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
  line-height: 1;
}

#big-butt:active {
  transform: scale(0.85);
}

#big-butt.pop {
  animation: pop 0.15s ease;
}

@keyframes pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.3) rotate(-5deg); }
  70%  { transform: scale(0.9) rotate(3deg); }
  100% { transform: scale(1); }
}

#counter-display {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#count {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 900;
  color: #c0392b;
  font-variant-numeric: tabular-nums;
}

#count-label {
  font-size: 0.8rem;
  color: #a04060;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

#butt-rate {
  font-size: 0.75rem;
  color: #a04060;
  min-height: 1.2em;
}

#milestones {
  min-height: 1.5rem;
  font-size: 0.9rem;
  color: #7d2040;
  font-weight: 600;
  text-align: center;
  animation: fadein 0.3s ease;
}

@keyframes fadein {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

#fact-box {
  background: rgba(255,255,255,0.7);
  border: 2px solid #f0a0b8;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  backdrop-filter: blur(4px);
}

#fact-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #c0392b;
  font-weight: 700;
}

#fact-text {
  font-size: clamp(0.8rem, 2.2vw, 0.95rem);
  color: #5a2030;
  line-height: 1.5;
  min-height: 2.5em;
}

.fact-buttons {
  display: flex;
  justify-content: space-between;
}

#prev-fact,
#next-fact {
  background: none;
  border: 1.5px solid #e0a0b0;
  border-radius: 0.5rem;
  padding: 0.3rem 0.75rem;
  color: #a04060;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.15s, color 0.15s;
}

#prev-fact:hover,
#next-fact:hover {
  background: #f0a0b8;
  color: #fff;
  border-color: #f0a0b8;
}

#ascii-section {
  background: rgba(255,255,255,0.6);
  border: 2px solid #f0a0b8;
  border-radius: 1rem;
  padding: 0.75rem 1.25rem;
  backdrop-filter: blur(4px);
}

#ascii-butt {
  font-size: clamp(0.55rem, 1.5vw, 0.75rem);
  color: #a04060;
  line-height: 1.2;
  font-family: 'Courier New', monospace;
  text-align: center;
  white-space: pre;
}
