.mines-page .game-panel {
  display: grid;
  gap: 1rem;
}

.mines-ui {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem;
  background:
    radial-gradient(circle at 12% 0%, rgba(42, 209, 201, 0.14), transparent 30%),
    linear-gradient(165deg, rgba(8, 25, 39, 0.96), rgba(11, 20, 33, 0.88));
}

.mines-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.difficulty-group {
  display: inline-flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}


.mines-stats {
  margin-top: 0.9rem;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  color: #d9e8f3;
  font-size: 0.9rem;
}

.mines-hint {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.board-scroll {
  margin-top: 0.9rem;
  overflow: auto;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
}

.mines-board {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  --cell-size: 36px;
  padding: 0.7rem;
  display: grid;
  gap: 4px;
  width: max-content;
  min-width: 100%;
}

.mine-cell {
  width: var(--cell-size);
  height: var(--cell-size);
  border-radius: 0.5rem;
  border: 1px solid rgba(154, 191, 224, 0.38);
  background: linear-gradient(160deg, rgba(64, 95, 124, 0.98), rgba(28, 48, 67, 0.98));
  color: #eaf5ff;
  display: grid;
  place-content: center;
  font-family: "Sora", system-ui, sans-serif;
  font-size: clamp(0.8rem, 2vw, 1rem);
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.24) inset,
    0 -1px 0 rgba(0, 0, 0, 0.34) inset,
    0 4px 12px rgba(0, 0, 0, 0.26);
}

.mine-cell--open {
  border-color: rgba(214, 235, 252, 0.72);
  background: linear-gradient(165deg, rgba(228, 241, 252, 0.95), rgba(191, 220, 244, 0.93));
  color: #10293d;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 0 0 1px rgba(13, 34, 52, 0.08) inset;
}

.mine-cell--closed:hover {
  filter: brightness(1.08);
}

.mine-cell--flagged {
  color: #ffd38d;
}

.mine-cell--mine {
  background: linear-gradient(145deg, rgba(116, 34, 34, 0.8), rgba(56, 10, 10, 0.88));
}

.mine-cell--exploded {
  border-color: rgba(255, 92, 92, 0.7);
  box-shadow: 0 0 0 2px rgba(255, 92, 92, 0.3) inset;
}

.mine-cell--n1 {
  color: #0f4da1;
}

.mine-cell--n2 {
  color: #0f6b3f;
}

.mine-cell--n3 {
  color: #a53a18;
}

.mine-cell--n4 {
  color: #3f2e8f;
}

.mine-cell--n5 {
  color: #8e1f39;
}

.mine-cell--n6 {
  color: #1b6f74;
}

.mine-cell--n7 {
  color: #1f2937;
}

.mine-cell--n8 {
  color: #6b3f0c;
}

.mines-message {
  margin: 0.9rem 0 0;
  color: #d9e8f3;
  font-size: 0.92rem;
  min-height: 1.4rem;
}

@media (max-width: 980px) {
  .mines-page .game-panel {
    padding: 0.8rem;
  }
}

@media (max-width: 720px) {
  .mine-cell {
    border-radius: 0.4rem;
  }

  .mines-stats {
    font-size: 0.85rem;
  }

  .mines-hint {
    font-size: 0.82rem;
  }
}
