/* === CONNECTIONS STYLES === */

:root {
  /* Difficulty Colors (Standard Connections Palette) */
  --cat-1: #facc15; /* Yellow */
  --cat-2: #4ade80; /* Green */
  --cat-3: #60a5fa; /* Blue */
  --cat-4: #a78bfa; /* Purple */
}

#game-screen {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

#connections-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

/* TILES */
.tile {
  background: var(--panel);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  
  aspect-ratio: 1.5;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4px;
  
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  transition: all 0.1s ease;
}

.tile:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}

.tile.selected {
  background: rgba(45, 212, 191, 0.15);
  border-color: var(--brand);
  color: var(--text);
}

/* SOLVED ROWS */
.category-row {
  grid-column: span 4; /* Full width */
  padding: 16px;
  border-radius: var(--radius);
  text-align: center;
  color: #0f172a; /* Dark text for contrast */
  animation: slideUp 0.3s ease;
}

/* Specific Colors */
.category-row.cat-1 { background: var(--cat-1); }
.category-row.cat-2 { background: var(--cat-2); }
.category-row.cat-3 { background: var(--cat-3); }
.category-row.cat-4 { background: var(--cat-4); }

.category-row strong {
  display: block;
  font-size: 1rem;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.category-row small { font-weight: 600; opacity: 0.9; }

/* CONTROLS */
.mistake-dot {
  width: 12px; height: 12px; 
  background: var(--text); 
  border-radius: 50%;
  transition: opacity 0.2s;
}
.mistake-dot.used { opacity: 0.2; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .tile { font-size: 0.7rem; aspect-ratio: 1.2; }
  #connections-board { gap: 8px; }
}