/* ============================================
   Tablo — Simon Says Styles
   ============================================ */

:root {
  --bg-dark: var(--bg-primary, #0f1923);
  --bg-panel: var(--bg-surface, #1a2332);
  --bg-input: var(--bg-surface, #1a2332);
  --accent-light: #5eead4;
  --font-primary: 'Nunito', sans-serif;
}

.game-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px 20px;
  gap: 24px;
}

.game-wrapper::before {
  content: '';
  display: block;
  height: 12px;
  flex-shrink: 0;
}

.game-stats {
  flex-shrink: 0;
  display: flex;
  gap: 24px;
  padding: 16px 24px;
  background: var(--bg-surface, #1a2332);
  border: 1px solid var(--border-color, #2a3441);
  border-radius: var(--radius-lg, 12px);
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 500px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 80px;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary, #8892a0);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent, #2dd4bf);
  font-family: 'Nunito', monospace;
}

.center-area {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.game-instruction {
  font-size: 14px;
  color: var(--text-secondary, #8892a0);
  text-align: center;
}

.simon-board {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 300px;
  width: 100%;
  padding: 16px;
  background: var(--bg-surface, #1a2332);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.simon-button {
  width: 130px;
  height: 130px;
  border-radius: 20px;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.15s ease;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

.simon-button.active {
  opacity: 1;
  transform: scale(1.05);
  box-shadow: 0 0 30px currentColor;
}

.simon-button.green {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: #2ecc71;
}

.simon-button.red {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #e74c3c;
}

.simon-button.yellow {
  background: linear-gradient(135deg, #f1c40f, #f39c12);
  color: #f1c40f;
}

.simon-button.blue {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: #3498db;
}

.start-button {
  background: var(--accent, #2dd4bf);
  color: #0f1923;
  padding: 16px 48px;
  border-radius: 30px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 4px 15px rgba(45,212,191,0.3);
  border: none;
  outline: none;
}

.start-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45,212,191,0.4);
}

.winner-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.winner-modal.visible {
  display: flex;
}

.winner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

.winner-content {
  position: relative;
  z-index: 1;
  background: var(--bg-panel, #1a2332);
  border: 2px solid var(--accent, #2dd4bf);
  border-radius: var(--radius-lg, 12px);
  padding: 32px 24px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5);
}

.winner-icon { font-size: 48px; margin-bottom: 16px; }

.winner-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

.winner-message {
  font-size: 14px;
  color: var(--text-secondary, #8892a0);
  margin-bottom: 24px;
}

.game-btn {
  background: var(--bg-surface, #1a2332);
  border: 1px solid var(--border-color, #2a3441);
  color: var(--text-primary, #e4e7eb);
  padding: 10px 20px;
  border-radius: var(--radius-md, 8px);
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.game-btn:hover {
  background: var(--bg-hover, #243044);
  border-color: var(--accent, #2dd4bf);
  color: var(--accent, #2dd4bf);
}

.game-btn.primary {
  background: var(--accent, #2dd4bf);
  border-color: var(--accent, #2dd4bf);
  color: #0f1923;
}

.game-btn.primary:hover {
  background: var(--accent-light, #5eead4);
  border-color: var(--accent-light, #5eead4);
}

.tablo-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-panel, #1a2332);
  border: 1px solid var(--border-color, #2a3441);
  color: var(--text-primary, #e4e7eb);
  padding: 12px 24px;
  border-radius: var(--radius-md, 8px);
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 10001;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.tablo-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
  .game-stats { gap: 16px; padding: 12px 16px; }
  .stat-value { font-size: 18px; }
  .simon-button { width: 100px; height: 100px; }
  .start-button { padding: 12px 36px; font-size: 16px; }
}

@media (max-width: 480px) {
  .game-wrapper { padding: 0 12px 12px; }
  .simon-board { gap: 12px; padding: 12px; }
  .center-area { gap: 16px; }
}