/* Game container */
.game-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.game-header .game-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.game-header .game-mode {
  font-size: 0.8rem;
}

.game-board-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Shared grid styles */
.game-grid {
  border-collapse: collapse;
  user-select: none;
  -webkit-user-select: none;
}

.game-grid td {
  width: var(--cell-size);
  height: var(--cell-size);
  text-align: center;
  vertical-align: middle;
  font-size: calc(var(--cell-size) * 0.45);
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}

.game-grid td:active {
  background: rgba(108, 92, 231, 0.3);
}

.game-grid td.selected {
  background: rgba(108, 92, 231, 0.25);
  box-shadow: inset 0 0 0 2px var(--primary);
}

.game-grid td.prefilled {
  color: var(--text-muted);
  cursor: default;
}

.game-grid td.error {
  background: rgba(255, 107, 107, 0.2);
  box-shadow: inset 0 0 0 2px var(--danger);
}

.game-grid td.correct {
  color: var(--accent);
}

.game-grid td.other-player {
  animation: pop 0.3s ease;
}

/* Sudoku specific */
.sudoku-grid td.region-right {
  border-right: 2px solid var(--primary-light);
}

.sudoku-grid td.region-bottom {
  border-bottom: 2px solid var(--primary-light);
}

.number-pad {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 12px 0;
}

.number-pad button {
  width: 48px;
  height: 48px;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.number-pad button:active, .number-pad button.active {
  background: var(--primary);
  transform: scale(0.95);
}

.number-pad button.erase {
  border-color: var(--danger);
  color: var(--danger);
  font-size: 0.9rem;
}

/* Queens specific */
.queens-grid td {
  font-size: calc(var(--cell-size) * 0.55);
}

.queens-grid td .queen {
  color: var(--warning);
}

.queens-grid td .queen-mark {
  color: rgba(255, 255, 255, 0.15);
  font-size: calc(var(--cell-size) * 0.3);
}

/* Tango specific */
.tango-grid td .sun {
  color: var(--warning);
  font-size: calc(var(--cell-size) * 0.55);
}

.tango-grid td .moon {
  color: var(--primary-light);
  font-size: calc(var(--cell-size) * 0.55);
}

.tango-constraint {
  position: absolute;
  font-size: calc(var(--cell-size) * 0.25);
  color: var(--text);
  background: var(--bg);
  border-radius: 50%;
  width: calc(var(--cell-size) * 0.35);
  height: calc(var(--cell-size) * 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tango-constraint.h-constraint {
  right: calc(var(--cell-size) * -0.175);
  top: 50%;
  transform: translateY(-50%);
}

.tango-constraint.v-constraint {
  bottom: calc(var(--cell-size) * -0.175);
  left: 50%;
  transform: translateX(-50%);
}

/* Zip specific */
.zip-grid td.path-cell {
  background: rgba(0, 206, 201, 0.2);
}

.zip-grid td.path-cell::after {
  content: '';
  position: absolute;
  inset: 15%;
  background: var(--accent);
  border-radius: 50%;
}

.zip-grid td.anchor {
  color: var(--warning);
  font-weight: 900;
}

.zip-grid td.anchor.path-cell::after {
  display: none;
}

.zip-path-line {
  position: absolute;
  background: var(--accent);
  opacity: 0.4;
  z-index: 1;
}

/* Patches specific */
.patches-grid td {
  position: relative;
}

.patches-grid td.patch-placed {
  opacity: 0.9;
}

.patch-clue {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  gap: 1px;
  pointer-events: none;
}

.patch-shape-icon {
  font-size: calc(var(--cell-size) * 0.3);
  color: var(--text-muted);
  opacity: 0.7;
}

.patch-count {
  font-size: calc(var(--cell-size) * 0.35);
  font-weight: 800;
  color: var(--text);
}

/* Submit button */
.submit-row {
  width: 100%;
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* Results */
.results-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding-top: 40px;
  width: 100%;
  text-align: center;
}

.results-view .trophy {
  font-size: 4rem;
  animation: pop 0.5s ease;
}

.results-view .result-text {
  font-size: 1.4rem;
  font-weight: 700;
}

.results-view .result-time {
  font-size: 1.1rem;
  color: var(--accent);
}

.results-view .result-details {
  width: 100%;
}

.results-view .result-details li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
