* {
  box-sizing: border-box;
}

body {
  font-family: "Comic Sans MS", "Segoe UI", Arial, sans-serif;
  background: linear-gradient(135deg, #2fceeb 0%, #0bd860 25%, #36eb09 50%, #03692a 75%, #065f46 100%);
  background-size: 300% 300%;
  animation: gradientShift 14s ease infinite;
  position: relative;
  overflow-x: hidden;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.card {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 24px;
  padding: 24px 20px 32px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 1;
}
h1 {
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 20px;
  background: linear-gradient(90deg, #770707, #63460c, #0c6862, #02186e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
#fireworks-canvas{position:fixed;top:0;left:0;width:100%;height:100%;z-index:999;pointer-events:none}

.levels {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.lvl-btn {
  flex: 1;
  padding: 12px 8px;
  border-radius: 14px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
}

.lvl-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}

#lvl-easy { background: #4ecdc4; }
#lvl-medium { background: #f7b733; }
#lvl-hard { background: #ff6b6b; }

.lvl-btn.active {
  outline: 4px solid #fff;
  outline-offset: -4px;
  transform: scale(1.05);
}


.stats {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.stat {
  flex: 1;
  border-radius: 16px;
  padding: 12px;
  text-align: center;
  color: #fff;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.1);
}

.stat-score { background: linear-gradient(135deg, #ff9a9e, #fecfef); }
.stat-streak { background: linear-gradient(135deg, #a1c4fd, #c2e9fb); }
.stat-round { background: linear-gradient(135deg, #fbc2eb, #a6c1ee); }
.stat .label {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.9;
}

.stat .value {
  font-size: 26px;
  font-weight: 800;
  margin-top: 2px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.stat span{display:block;font-size:.75rem;color:#6b7280}
.stat b{font-size:1.4rem}
.prompt{text-align:center;font-weight:700;font-size:1.15rem;margin:8px 0 14px}

.ooo-board{display:grid;gap:12px;max-width:420px;margin:0 auto}
.ooo-tile{aspect-ratio:1;border-color: #fecaca ;border-radius:18px;background:#fff;font-size:3rem;cursor:pointer;
  box-shadow:0 4px 0 rgba(0,0,0,.15);transition:transform .15s,opacity .3s}
.ooo-tile img.emoji{width:1em;height:1em}
.ooo-tile:hover:not(:disabled){transform:translateY(-3px)}
.ooo-tile.right{background:#bbf7d0;outline:4px solid #22c55e;transform:scale(1.06)}
.ooo-tile.wrong{background:#fecaca;outline:4px solid #ef4444;animation:oooshake .4s}
.ooo-tile.dim{opacity:.4}

#feedback{text-align:center;min-height:28px;margin:14px 0;font-weight:700}
.feedback-correct{color:#16a34a}.feedback-wrong{color:#dc2626}.feedback-info{color:#6b7280}
.restart-btn{display:block;margin:0 auto;padding:10px 24px;border:none;border-radius:20px;background:#0ea5e9;color:#fff;font-weight:700;cursor:pointer}