.mines-body {
  background: #0d202b;
}

.mines-body .live-stats-drawer {
  padding: 1rem;
  min-width: 19rem;
}

.mines-body .live-stats-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2rem;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.mines-body .live-stats-header h2 {
  display: flex;
  min-width: 0;
  font-size: 1.05rem;
  line-height: 1.2;
  white-space: nowrap;
}

.mines-body .live-stats-header h2 span {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  font-size: 0.7rem;
}

.mines-body .live-stats-header .icon-button,
.mines-body .stats-filter-row .icon-button {
  flex: 0 0 auto;
  min-width: 2rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1rem;
}

.mines-body .stats-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2rem;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.mines-body .stats-filter-row select {
  width: 100%;
  min-width: 0;
}

.mines-body .live-stats-metrics {
  gap: 0;
  padding: 0.85rem;
  margin-bottom: 0.85rem;
}

.mines-body .live-stats-metrics > div {
  min-width: 0;
  min-height: 3.5rem;
  padding: 0.2rem 0.7rem;
}

.mines-body .live-stats-metrics strong {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.mines-body .credit-dot {
  display: inline-grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  margin-left: 0.25rem;
  font-size: 0.42rem;
  vertical-align: 0.12rem;
}

.mines-body .stats-chart {
  height: 13.75rem;
  padding: 0.8rem;
  margin-bottom: 0;
  overflow: hidden;
}

.mines-body .chart-fill {
  fill: rgba(20, 244, 106, 0.22);
}

.mines-body .chart-loss-fill {
  fill: rgba(255, 40, 84, 0.24);
}

.mines-stage {
  display: grid;
  gap: 0.9rem;
}

.mines-panel {
  display: grid;
  grid-template-columns: minmax(20rem, 28rem) minmax(10rem, 1fr);
  align-items: center;
  gap: 2rem;
  min-height: 33rem;
  padding: 2rem;
  background:
    radial-gradient(circle at 68% 20%, rgba(70, 117, 248, 0.14), transparent 30rem),
    #0b1c28;
  border: 0;
  box-shadow: none;
}

.mines-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 1fr;
  gap: 0.7rem;
  width: min(28rem, 100%);
  aspect-ratio: 1;
  align-self: center;
}

.mine-tile {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0.55rem;
  background: #2f5265;
  color: #fff;
  overflow: hidden;
  box-shadow: inset 0 -0.35rem 0 rgba(0, 0, 0, 0.18), 0 8px 18px rgba(0, 0, 0, 0.2);
  transition: transform 0.16s ease, background 0.16s ease;
}

.mine-tile:not(:disabled):hover,
.mine-tile:not(:disabled):focus {
  transform: translateY(-0.12rem);
  background: #416b81;
}

.mine-tile.safe {
  background: #18d777;
  color: #092014;
}

.mine-tile.safe::before {
  content: "";
  width: 42%;
  height: 42%;
  border-radius: 45% 55% 52% 48%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.85) 0 12%, transparent 13%),
    linear-gradient(135deg, #dbfff0 0%, #51f4a0 44%, #0cae60 100%);
  border: 0.16rem solid rgba(0, 78, 43, 0.28);
  box-shadow: 0 0.35rem 0 rgba(0, 80, 48, 0.22);
  transform: rotate(45deg);
}

.mine-tile.auto-selected {
  background: #4f7790;
  outline: 3px solid #4ea1ff;
  outline-offset: -3px;
}

.mine-tile.auto-selected::after {
  content: "";
  width: 26%;
  height: 26%;
  border-radius: 999px;
  background: #4ea1ff;
  box-shadow: 0 0 0 4px rgba(78, 161, 255, 0.18);
}

.mine-tile.mine {
  background: #ff2854;
}

.mine-tile.mine::before {
  content: "";
  width: 42%;
  height: 42%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.65) 0 10%, transparent 11%),
    #17212b;
  box-shadow:
    0 -0.45rem 0 -0.22rem #ffb21d,
    0.42rem -0.42rem 0 -0.2rem #ffb21d,
    0 0.35rem 0 rgba(0, 0, 0, 0.22);
}

.mine-tile.mine::after {
  content: "";
  position: absolute;
  width: 18%;
  height: 0.16rem;
  background: #ffb21d;
  transform: translate(40%, -125%) rotate(-35deg);
  transform-origin: left center;
}

.mine-tile.revealed {
  transform: none;
}

.mines-status {
  display: grid;
  gap: 0.75rem;
}

.mines-status > div,
.mines-profit-row > div {
  min-height: 4rem;
  padding: 0.75rem;
  border-radius: 0.45rem;
  background: #18303d;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.mines-status strong,
.mines-profit-row strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.1rem;
}

.mines-actions {
  display: grid;
  gap: 0.55rem;
}

.mines-actions .button {
  width: 100%;
  min-height: 2.65rem;
}

.auto-selection-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.2rem 0.75rem;
  align-items: center;
  min-height: 3.2rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.45rem;
  background: #102633;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auto-selection-summary .label {
  grid-column: 1 / 2;
}

.auto-selection-summary strong {
  grid-column: 1 / 2;
  color: #fff;
}

.auto-selection-summary .text-button {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
}

.mines-stake-row,
.mines-profit-row {
  margin-top: 0.8rem;
}

.mines-game-layout.stats-open {
  grid-template-columns: 19rem 18rem minmax(0, 1fr);
}

@media (max-width: 980px) {
  .mines-panel {
    grid-template-columns: 1fr;
    min-height: auto;
    justify-items: center;
  }

  .mines-board {
    width: min(24rem, 100%);
  }
}
