.game-shell[data-theme="mastermind"] {
  --game-accent: #8fdcff;
  --game-accent-2: #ff9a77;
  --game-accent-soft: rgba(143, 220, 255, 0.2);
  --game-accent-deep: rgba(255, 154, 119, 0.12);
}

.mastermind-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  gap: 16px;
}

.mastermind-main,
.mastermind-history {
  display: grid;
  gap: 12px;
}

.mastermind-card,
.mastermind-row,
.mastermind-history {
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(10, 14, 25, 0.72);
}

.mastermind-card span,
.mastermind-row-index {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.52);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 10px;
  font-weight: 800;
}

.mastermind-code-preview,
.mastermind-slots,
.mastermind-row-code {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mastermind-hidden,
.mastermind-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
}

.mastermind-hidden {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.42);
}

.mastermind-dot {
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.18),
    0 10px 18px rgba(0, 0, 0, 0.22);
}

.mastermind-dot.is-ruby { background: radial-gradient(circle at 30% 30%, #ffd2da, #ff6f84 58%, #c93b54 100%); }
.mastermind-dot.is-amber { background: radial-gradient(circle at 30% 30%, #fff2c7, #ffca63 58%, #cb7c1f 100%); }
.mastermind-dot.is-mint { background: radial-gradient(circle at 30% 30%, #dcfff3, #76f0b6 58%, #1f9d6a 100%); }
.mastermind-dot.is-cyan { background: radial-gradient(circle at 30% 30%, #d9fbff, #69d7ff 58%, #1d88b8 100%); }
.mastermind-dot.is-violet { background: radial-gradient(circle at 30% 30%, #ece2ff, #a684ff 58%, #6940d8 100%); }
.mastermind-dot.is-pearl { background: radial-gradient(circle at 30% 30%, #ffffff, #e4ecff 58%, #96a2c7 100%); }

.mastermind-builder {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.mastermind-slot {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

.mastermind-slot.is-active {
  border-color: rgba(143, 220, 255, 0.34);
  box-shadow: 0 0 0 2px rgba(143, 220, 255, 0.1);
}

.mastermind-palette {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mastermind-color {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 12px 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: #edf4ff;
}

.mastermind-color small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
}

.mastermind-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mastermind-rows {
  display: grid;
  gap: 10px;
}

.mastermind-row {
  display: grid;
  gap: 10px;
}

.mastermind-clues {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mastermind-clues span {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.mastermind-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
}

@media (max-width: 860px) {
  .mastermind-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .mastermind-palette {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
