/* ==========================================================================
   Destiny Hub — «Судьбоносное Судоку» на сайте (games_sudoku.css)
   ========================================================================== */

.sudoku-guest-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(226, 184, 83, 0.06);
  border: 1px solid rgba(226, 184, 83, 0.15);
  border-radius: 16px;
  padding: 14px 18px;
  width: min(100%, 460px);
  margin: 0 0 4px;
  box-sizing: border-box;
}

.sudoku-guest-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.sudoku-guest-text {
  flex: 1;
  min-width: 160px;
}

#sudoku-stats {
  margin: 0;
  color: var(--text, #edf2f7);
  font-size: 0.82rem;
  line-height: 1.4;
}

.sudoku-guest-login {
  white-space: nowrap;
}

.sudoku-board-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 420px;
}

.sudoku-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  grid-template-rows: repeat(9, 1fr);
  gap: 2px;
  width: 100%;
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid var(--border, rgba(255, 255, 255, 0.22));
  border-radius: 12px;
  padding: 6px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 14px 34px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}

.sudoku-cell {
  background: rgba(255, 255, 255, 0.02);
  border: none;
  border-radius: 4px;
  color: var(--text, #edf2f7);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.1s ease;
  aspect-ratio: 1;
  padding: 0;
}

.sudoku-cell:nth-child(9n+3),
.sudoku-cell:nth-child(9n+6) {
  border-right: 2px solid var(--border, rgba(255, 255, 255, 0.22));
}

.sudoku-cell:nth-child(n+19):nth-child(-n+27),
.sudoku-cell:nth-child(n+46):nth-child(-n+54) {
  border-bottom: 2px solid var(--border, rgba(255, 255, 255, 0.22));
}

.sudoku-cell.is-fixed {
  color: var(--gold, #e2b853);
  cursor: default;
  font-weight: 800;
}

.sudoku-cell.is-selected {
  background: rgba(167, 139, 250, 0.25);
  box-shadow: inset 0 0 0 2px #a78bfa;
}

.sudoku-cell.is-related {
  background: rgba(167, 139, 250, 0.08);
}

.sudoku-cell.is-conflict {
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
}

.sudoku-cell:disabled {
  cursor: not-allowed;
  opacity: 0.85;
}

.sudoku-keypad {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 420px;
}

.sudoku-key {
  padding: 10px 0;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.22));
  background: rgba(255, 255, 255, 0.04);
  color: var(--text, #edf2f7);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sudoku-key:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-glow, rgba(255, 255, 255, 0.4));
}

.sudoku-key.is-active {
  background: linear-gradient(135deg, var(--purple, #a78bfa), var(--pink, #ec4899));
  color: #fff;
  border-color: transparent;
}

.sudoku-key:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.sudoku-key-erase {
  color: #f87171;
}

.sudoku-message {
  font-size: 0.85rem;
  color: var(--muted, rgba(255, 255, 255, 0.72));
  text-align: center;
  min-height: 1.2em;
  width: 100%;
  max-width: 420px;
}

@media (max-width: 480px) {
  .sudoku-guest-banner {
    padding: 12px 14px;
  }

  .sudoku-cell {
    font-size: 0.85rem;
  }

  .sudoku-keypad {
    gap: 6px;
  }

  .sudoku-key {
    padding: 8px 0;
    font-size: 0.9rem;
  }
}
