/* Steel Target Simulator Styles */

.stats-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 20px 0;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  min-width: 120px;
}

.stat-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
  font-weight: 500;
}

.stat-value {
  font-size: 20px;
  font-weight: bold;
  color: #007bff;
  font-family: 'Courier New', monospace;
}

.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
}

.control-label {
  font-weight: 500;
  color: #333;
  margin-right: 5px;
}

.target-select {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.target-select:hover {
  border-color: #007bff;
}

.target-select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.canvas-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
  position: relative;
  width: 100%; /* Let canvas width track container/page width */
}

/* Fullscreen mode */
.canvas-container:fullscreen {
  background: #000;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.canvas-container:fullscreen #steelCanvas {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  border: none;
}

.canvas-container:fullscreen .quick-keys {
  display: none;
}

/* Webkit fullscreen support */
.canvas-container:-webkit-full-screen {
  background: #000;
  margin: 0;
  padding: 0;
}

.canvas-container:-webkit-full-screen #steelCanvas {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  border: none;
}

#steelCanvas {
  border: 1px solid #ddd;
  background: #f8f9fa;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  display: block;
}

/* Mobile Dial Controls - positioned below HUD area */
.dial-controls {
  position: absolute;
  top: 110px; /* Below the HUD elements */
  left: 10px;
  display: flex;
  gap: 6px;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  padding: 6px 10px;
  border-radius: 8px;
  z-index: 100;
}

.dial-group {
  display: flex;
  align-items: center;
  gap: 3px;
}

.dial-label {
  color: #aaa;
  font-size: 10px;
  font-weight: bold;
  margin-right: 2px;
}

.dial-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation; /* Prevent double-tap zoom */
  user-select: none;
  transition: background 0.15s;
}

.dial-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.dial-btn:active {
  background: rgba(255, 255, 255, 0.35);
}

.dial-reset {
  font-size: 18px;
  margin-left: 2px;
}

/* Responsive dial controls */
@media (max-width: 600px) {
  .dial-controls {
    top: 80px;
    padding: 4px 6px;
    gap: 4px;
  }
  .dial-btn {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  .dial-label {
    display: none; /* Hide labels on small screens */
  }
  .dial-reset {
    font-size: 14px;
  }
}

/* Fullscreen adjustments */
.canvas-container:fullscreen .dial-controls {
  top: 120px;
}

@media (max-height: 500px) {
  /* Landscape mobile - move to right side */
  .dial-controls {
    top: 10px;
    left: auto;
    right: 10px;
    flex-direction: column;
  }
  .dial-group {
    flex-direction: row;
  }
}

/* Quick key guide (displayed below canvas) */
.quick-keys {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 8px 8px;
  font-size: 13px;
  color: #333;
  flex-wrap: wrap;
}

.quick-keys-section {
  display: flex;
  align-items: center;
  gap: 6px;
}

.quick-keys kbd {
  display: inline-block;
  padding: 3px 6px;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  font-weight: bold;
  color: #333;
  background: linear-gradient(to bottom, #f9f9f9 0%, #e8e8e8 100%);
  border: 1px solid #aaa;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 0 #fff;
  white-space: nowrap;
  margin: 0 1px;
}

.error {
  background: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 4px;
  margin: 20px 0;
  border: 1px solid #f5c6cb;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .stats-container {
    gap: 15px;
  }
  
  .stat-item {
    min-width: 100px;
  }
  
  .stat-value {
    font-size: 16px;
  }
  
  #steelCanvas {
    max-height: 80vh;
  }
  
  .quick-keys {
    font-size: 11px;
    gap: 12px;
    padding: 8px;
  }
  
  .quick-keys kbd {
    padding: 2px 4px;
    font-size: 10px;
  }
}

