/* ============================================
   Lights Out — Game-specific styles
   ============================================ */

.lightsout-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

/* ---- SCORE BAR ---- */
.lightsout-container .score-board {
  display: flex;
  gap: var(--space-lg);
  font-family: 'Space Mono', monospace;
}

.lightsout-container .score-box {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-lg);
  text-align: center;
  min-width: 110px;
}

.lightsout-container .score-box .label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.lightsout-container .score-box .value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-secondary);
}

/* ---- DIFFICULTY PICKER ---- */
.difficulty-picker {
  display: flex;
  gap: var(--space-sm);
}

.diff-btn {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: var(--space-xs) var(--space-md);
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--surface-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.diff-btn:hover {
  color: var(--accent-secondary);
  border-color: var(--accent-secondary);
}

.diff-btn.active {
  background: rgba(123, 97, 255, 0.15);
  color: var(--accent-secondary);
  border-color: var(--accent-secondary);
  box-shadow: 0 0 12px rgba(123, 97, 255, 0.2);
}

/* ---- GRID ---- */
.grid-wrap {
  position: relative;
}

.lo-grid {
  display: grid;
  gap: 8px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lo-cell {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  position: relative;
  transition: transform 80ms ease, background 150ms ease, box-shadow 150ms ease;
  background: var(--bg-card);
  outline: none;
}

.lo-cell::after {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 6px;
  background: var(--surface-light);
  transition: background 150ms ease, box-shadow 150ms ease;
}

.lo-cell.on {
  background: rgba(123, 97, 255, 0.08);
}

.lo-cell.on::after {
  background: var(--accent-secondary);
  box-shadow:
    0 0 8px rgba(123, 97, 255, 0.9),
    0 0 20px rgba(123, 97, 255, 0.5),
    0 0 40px rgba(123, 97, 255, 0.2);
}

.lo-cell:hover {
  transform: scale(1.06);
}

.lo-cell:active {
  transform: scale(0.95);
}

/* Highlight adjacent cells on hover */
.lo-cell.adjacent-hint::after {
  background: rgba(123, 97, 255, 0.25);
}

/* ---- WIN OVERLAY ---- */
.lo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.88);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  transition: var(--transition-normal);
}

.lo-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.lo-overlay h2 {
  font-family: 'Space Mono', monospace;
  font-size: 1.8rem;
  color: var(--accent-secondary);
  text-shadow: 0 0 20px rgba(123, 97, 255, 0.7);
  letter-spacing: 0.1em;
}

.lo-overlay p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.8;
}

.lo-overlay .win-stats {
  font-family: 'Space Mono', monospace;
  font-size: 0.95rem;
  color: var(--accent-secondary);
}

/* ---- CONTROLS ---- */
.game-controls {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

/* ---- HINT ---- */
.hint-text {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 480px) {
  .lo-cell {
    width: 54px;
    height: 54px;
  }

  .lo-grid {
    gap: 6px;
    padding: 12px;
  }

  .lightsout-container .score-box {
    min-width: 80px;
    padding: var(--space-sm) var(--space-md);
  }

  .lightsout-container .score-box .value {
    font-size: 1.3rem;
  }
}
