/* ============================================
   Tablo — Hexagon Puzzle Styles
   ============================================ */

.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, #1e293b);
  border: 1px solid var(--border-color, #334155);
  border-radius: var(--radius-lg, 12px);
  flex-wrap: wrap;
  justify-content: center;
  max-width: 400px;
  margin: 0 auto;
}

.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, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.hex-canvas-wrapper {
  background: #1e293b;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid #334155;
  margin: 0 auto 20px auto;
  display: flex;
  justify-content: center;
}

#hex-canvas {
  display: block;
  max-width: 100%;
  border-radius: 8px;
  cursor: pointer;
}

.hex-color-picker {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 0 auto 16px auto;
}

.color-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}
.color-btn:hover {
  transform: scale(1.15);
}
.color-btn.active {
  border-color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(255,255,255,0.3);
}

.game-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
}

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

.game-btn:hover {
  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);
}

.game-hint {
  font-size: 13px;
  color: var(--text-muted, #64748b);
  text-align: center;
  margin: 8px auto;
  max-width: 400px;
  line-height: 1.4;
}

.winner-modal {
  position: fixed;
  inset: 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);
  backdrop-filter: blur(6px);
}

.winner-content {
  position: relative;
  background: #1e293b;
  border: 2px solid #2dd4bf;
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.6);
}

.winner-icon { font-size: 48px; margin-bottom: 16px; }
.winner-title { font-size: 24px; font-weight: 700; margin-bottom: 12px; color: #e2e8f0; }
.winner-message { font-size: 14px; color: #94a3b8; margin-bottom: 24px; }

.tablo-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e293b;
  border: 1px solid #334155;
  color: #e2e8f0;
  padding: 12px 24px;
  border-radius: 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) {
  #hex-canvas { width: 320px; height: 305px; }
  .color-btn { width: 38px; height: 38px; }
}

@media (max-width: 480px) {
  .game-wrapper { padding: 0 12px 12px; }
  #hex-canvas { width: 280px; height: 267px; }
  .game-stats { gap: 16px; padding: 12px 16px; }
  .hex-color-picker { gap: 8px; }
  .color-btn { width: 34px; height: 34px; }
}