*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: "Comic Sans MS", "Trebuchet MS", sans-serif;
  margin: 0;
  background: linear-gradient(135deg, #ffe29f, #ffa99f, #a0e9ff);
  color: #222;
  text-align: center;
}

/* 📝 SIGN-UP SCREEN */
#signup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6a3aff, #ff5e7e, #ffa94d);
  padding: 20px;
}

.signup-card {
  background: #fff;
  border-radius: 24px;
  padding: 28px 24px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

.signup-card h1 {
  font-size: 1.8rem;
  margin: 0 0 6px 0;
}

.su-tag {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 18px;
}

.signup-card label {
  display: block;
  text-align: left;
  font-weight: bold;
  font-size: 1.05rem;
  margin: 12px 0 5px 4px;
}

.signup-card input {
  width: 100%;
  font-family: inherit;
  font-size: 1.1rem;
  padding: 12px 14px;
  border: 3px solid #6c63ff;
  border-radius: 14px;
  outline: none;
}

.signup-card input:focus { border-color: #ff5e7e; }

.su-error {
  color: #d63031;
  font-weight: bold;
  min-height: 22px;
  margin: 8px 0;
}

#su-go {
  width: 100%;
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: bold;
  padding: 14px;
  margin-top: 6px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(90deg, #18a558, #2ecc71);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 5px 0 #0e6e3a;
}

#su-go:active { transform: translateY(4px); box-shadow: none; }

.su-fine {
  font-size: 0.85rem;
  color: #888;
  margin-top: 14px;
}

#welcome-banner {
  margin-top: 10px;
  font-size: 1.15rem;
  font-weight: bold;
  color: #222;
}

#welcome-banner button {
  font-family: inherit;
  font-size: 0.85rem;
  margin-left: 8px;
  padding: 5px 12px;
  border: none;
  border-radius: 10px;
  background: #ffffffaa;
  color: #555;
  cursor: pointer;
  box-shadow: 0 3px 0 #ccc;
}

header {
  padding: 30px 20px;
}

h1 {
  font-size: 2.5rem;
  margin: 0;
  text-shadow: 2px 2px 0 #fff;
}

.subtitle {
  font-size: 1.2rem;
  font-weight: bold;
}

main {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px;
}

.card {
  background: #ffffff;
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.15);
  max-width: 320px;
}

button {
  font-family: inherit;
  font-size: 1rem;
  margin: 6px;
  padding: 12px 18px;
  border: none;
  border-radius: 15px;
  background: #6c63ff;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 0 #4b44cc;
  transition: transform 0.1s;
}

button:hover {
  transform: scale(1.08);
}

button:active {
  transform: translateY(4px);
  box-shadow: none;
}

#message {
  font-size: 1.3rem;
  font-weight: bold;
  margin-top: 15px;
  min-height: 30px;
}

.big-3d {
  display: block;
  width: 90%;
  margin: 10px auto 0 auto;
  font-size: 1.2rem;
  background: linear-gradient(90deg, #0a84ff, #00e5ff);
  box-shadow: 0 5px 0 #0560c0;
  color: #fff;
}

.green-3d {
  background: linear-gradient(90deg, #1e8e4a, #7ed957);
  box-shadow: 0 5px 0 #146635;
}

.iron-3d {
  background: linear-gradient(90deg, #c62828, #ffca28);
  box-shadow: 0 5px 0 #8e1f1f;
}

.venom-3d {
  background: linear-gradient(90deg, #1a1a1a, #7a3abf);
  box-shadow: 0 5px 0 #3a1a5a;
}

.sniper-3d {
  background: linear-gradient(90deg, #18a558, #1f6f4a);
  box-shadow: 0 5px 0 #0e6e3a;
}

ul {
  list-style: none;
  padding: 0;
  font-size: 1.2rem;
  line-height: 1.8;
}

.hint {
  font-size: 0.9rem;
  color: #555;
}

.game-btn {
  font-size: 1.2rem;
  background: #ff6584;
  box-shadow: 0 4px 0 #cc3f5c;
}

#game-list {
  margin-top: 15px;
}

.games {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-height: 240px;
  overflow-y: auto;
  padding: 10px;
}

.game-pill {
  background: #6c63ff;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.1s;
}

.game-pill:hover {
  transform: scale(1.15);
}

.game-pill:active {
  transform: scale(0.9);
}

.game-pill:nth-child(even) {
  background: #ff6584;
}

#game-canvas, #robot-canvas {
  border: 4px solid #333;
  border-radius: 12px;
  background: #bfe3ff;
  display: block;
  margin: 0 auto;
  touch-action: none;
}

#robot-preview {
  border: 3px solid #333;
  border-radius: 12px;
  display: block;
  margin: 0 auto 10px auto;
}

.swatch {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 3px 0 rgba(0,0,0,0.2);
  padding: 0;
  cursor: pointer;
}

.start-battle {
  font-size: 1.3rem;
  background: #d63031;
  box-shadow: 0 5px 0 #a32020;
  margin-top: 14px;
}

#controls {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.ctrl {
  font-size: 1.1rem;
  background: #6c63ff;
  box-shadow: 0 4px 0 #4b44cc;
  user-select: none;
}

.ctrl.shoot {
  background: #d63031;
  box-shadow: 0 4px 0 #a32020;
}

.play-again {
  font-size: 1rem;
  background: #00b894;
  box-shadow: 0 4px 0 #00876a;
  margin-top: 10px;
}

.search-btn {
  font-size: 1.2rem;
  background: #0984e3;
  box-shadow: 0 4px 0 #0667b0;
}

.weapon-bag {
  font-size: 1.4rem;
  background: #eef3ff;
  border-radius: 12px;
  padding: 10px;
  font-weight: bold;
}

.monster-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff3cd;
  border-radius: 12px;
  padding: 8px 12px;
  margin: 6px 0;
  font-size: 1.1rem;
  font-weight: bold;
}

.monster-row.done {
  background: #d6f5d6;
  justify-content: center;
}

.attack-btn {
  font-size: 1rem;
  background: #d63031;
  box-shadow: 0 3px 0 #a32020;
  margin: 0;
}

#battle-msg {
  font-size: 1.2rem;
  font-weight: bold;
  min-height: 30px;
}

.pizza-btn {
  font-size: 1.2rem;
  background: #e84393;
  box-shadow: 0 4px 0 #b82f73;
}

.topping-btn {
  font-size: 1.6rem;
  padding: 8px 12px;
  background: #fff3cd;
  color: #222;
  box-shadow: 0 3px 0 #e0d4a0;
}

.pizza-base {
  font-size: 4rem;
  margin: 10px 0;
}

.clear-btn {
  font-size: 1rem;
  background: #b2bec3;
  color: #222;
  box-shadow: 0 4px 0 #8b9799;
}

.eat-btn {
  font-size: 1.3rem;
  background: #e17055;
  box-shadow: 0 5px 0 #b5543f;
}

#pizza-status {
  font-size: 1.2rem;
  font-weight: bold;
  min-height: 30px;
  margin-top: 12px;
}

.dog-btn {
  font-size: 1.2rem;
  background: #e17055;
  box-shadow: 0 4px 0 #b5543f;
}

#dog-path {
  font-size: 2rem;
  letter-spacing: 4px;
  background: #d6f5d6;
  border-radius: 15px;
  padding: 12px;
  margin-bottom: 12px;
  white-space: nowrap;
  overflow-x: auto;
}

.walk-btn {
  font-size: 1.2rem;
  background: #0984e3;
  box-shadow: 0 4px 0 #0667b0;
}

.treat-btn {
  font-size: 1.2rem;
  background: #fdcb6e;
  color: #222;
  box-shadow: 0 4px 0 #d4a843;
}

#dog-status {
  font-size: 1.2rem;
  font-weight: bold;
  margin-top: 12px;
}

.robot-btn {
  font-size: 1.2rem;
  background: #00b894;
  box-shadow: 0 4px 0 #00876a;
}

.picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 10px;
}

.part-btn {
  font-size: 1.6rem;
  padding: 8px 12px;
  background: #f1f1f1;
  color: #222;
  box-shadow: 0 3px 0 #ccc;
}

.power-btn {
  font-size: 0.9rem;
  background: #fdcb6e;
  color: #222;
  box-shadow: 0 3px 0 #d4a843;
}

.robot-show {
  font-size: 3rem;
  line-height: 1.1;
  margin: 10px 0;
}

.fight-btn {
  font-size: 1.3rem;
  background: #d63031;
  box-shadow: 0 5px 0 #a32020;
  margin-top: 10px;
}

#battle {
  font-size: 1.2rem;
  font-weight: bold;
  min-height: 30px;
}

footer {
  padding: 20px;
  font-size: 1.1rem;
  font-weight: bold;
}
