@import url('https://fonts.googleapis.com/css2?family=Bubblegum+Sans&display=swap');

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

body {
  font-family: 'Bubblegum Sans', 'Comic Sans MS', cursive;
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 50%, #d4fc79 100%);
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

h1 {
  text-align: center;
  font-size: 2.6rem;
  color: #fff;
  text-shadow: 3px 3px 0 #e84393, -1px -1px 0 #6c5ce7;
  padding: 10px 0 8px;
  background: linear-gradient(90deg, #6c5ce7, #e84393, #fd79a8, #fdcb6e, #00b894);
  letter-spacing: 2px;
  position: relative;
}

.back-btn {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  text-decoration: none;
  font-size: 2rem;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.3));
  transition: transform 0.15s;
}
.back-btn:hover { transform: translateY(-50%) scale(1.2); }

/* Layout shared by count.html and robot.html */
.container {
  display: flex;
  flex: 1;
  gap: 0;
  min-height: 0;
}

.right-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.ctrl-btn {
  font-family: inherit;
  font-size: 1.5rem;
  padding: 14px 40px;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.15s, box-shadow 0.15s;
  letter-spacing: 1px;
}
.ctrl-btn:hover { transform: scale(1.08); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.ctrl-btn:active { transform: scale(0.95); }

/* Confetti */
.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 9999;
  animation: confetti-fall 2.5s ease-out forwards;
}
@keyframes confetti-fall {
  0% { opacity: 1; transform: translateY(0) rotate(0deg); }
  100% { opacity: 0; transform: translateY(100vh) rotate(720deg); }
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 10px 0;
  line-height: 1.25;
  font-size: 1.1rem;
  color: #636e72;
  background: rgba(255,255,255,0.6);
  letter-spacing: 0.5px;
}
.site-footer .heart {
  color: #e84393;
}
.site-footer a {
  color: #6c5ce7;
  text-decoration: none;
  font-weight: bold;
}
.site-footer a:hover {
  text-decoration: underline;
}

/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {
  body {
    overflow: visible;
  }
  h1 {
    font-size: 1.6rem;
    padding: 8px 0 6px;
  }
  .back-btn {
    font-size: 1.5rem;
    left: 8px;
  }
  .container {
    flex-direction: column;
  }
  .right-panel {
    min-height: 320px;
    padding: 16px 0;
  }
}
