/* ─── Reset & Base ────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #1a1a2e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  font-family: 'Segoe UI', sans-serif;
  color: #eee;
  user-select: none;
}

/* ─── Title ───────────────────────────────────────────────────────── */
h1 {
  font-size: 2.5rem;
  letter-spacing: 6px;
  margin-bottom: 10px;
  color: #e0e0e0;
  text-transform: uppercase;
}

/* ─── Info message ────────────────────────────────────────────────── */
#info {
  font-size: 1rem;
  color: #aaa;
  margin-bottom: 30px;
  height: 24px;
  transition: color 0.3s;
}

#info.error {
  color: #ff6b6b;
}

/* ─── Score board ─────────────────────────────────────────────────── */
#score-board {
  display: flex;
  gap: 40px;
  margin-bottom: 30px;
  font-size: 1rem;
  color: #ccc;
}

#score-board span {
  font-size: 1.6rem;
  font-weight: bold;
  color: #fff;
}

/* ─── Simon board ─────────────────────────────────────────────────── */
#board {
  position: relative;
  width: 320px;
  height: 320px;
}

.btn {
  position: absolute;
  width: 148px;
  height: 148px;
  border: none;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.15s, filter 0.15s;
  outline: none;
}

.btn:hover {
  opacity: 0.7;
}

.btn.lit {
  opacity: 1;
  filter: brightness(1.8);
}

.btn.disabled {
  cursor: default;
  pointer-events: none;
}

/* ─── Button positions & colors ───────────────────────────────────── */
#btn-green {
  top: 0;
  left: 0;
  background: #27ae60;
  border-radius: 60% 5% 5% 5%;
}

#btn-red {
  top: 0;
  right: 0;
  background: #e74c3c;
  border-radius: 5% 60% 5% 5%;
}

#btn-yellow {
  bottom: 0;
  left: 0;
  background: #f1c40f;
  border-radius: 5% 5% 5% 60%;
}

#btn-blue {
  bottom: 0;
  right: 0;
  background: #2980b9;
  border-radius: 5% 5% 60% 5%;
}

/* ─── Center circle ───────────────────────────────────────────────── */
#center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: #1a1a2e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: #555;
  z-index: 10;
  border: 3px solid #333;
}

/* ─── Start button ────────────────────────────────────────────────── */
#start-btn {
  margin-top: 36px;
  padding: 12px 40px;
  font-size: 1rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  background: transparent;
  border: 2px solid #e0e0e0;
  color: #e0e0e0;
  border-radius: 30px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

#start-btn:hover {
  background: #e0e0e0;
  color: #1a1a2e;
}

#start-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

/* ─── Level selector ──────────────────────────────────────────────── */
#level-select {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}

.level-btn {
  padding: 6px 18px;
  border-radius: 20px;
  border: 2px solid #555;
  background: transparent;
  color: #aaa;
  cursor: pointer;
  font-size: 0.85rem;
  transition: border-color 0.2s, color 0.2s;
}

.level-btn.active {
  border-color: #e0e0e0;
  color: #fff;
}
