/**
 * Shared Panel Styles
 * 
 * Common styles for all UI overlay panels to maintain consistency.
 * Import this file in each panel component.
 */

/* Base Panel Styles */
.panel {
  position: absolute;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border-radius: 8px;
  pointer-events: auto;
  z-index: 15;
  transition: all 0.3s ease;
}

/* Panel Header */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.panel-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #4CAF50;
}

/* Toggle Button */
.toggle-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: background-color 0.2s ease;
}

.toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Panel Content */
.panel-content {
  padding: 15px;
}

/* Debug Panel Specific Styles */
.debug-panel {
  top: 20px;
  left: 20px;
  width: 350px;
}

.debug-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #ccc;
}

.debug-info span {
  font-family: 'Courier New', monospace;
}

/* Game Loop Stats Panel Specific Styles */
.stats-panel {
  top: 20px;
  left: 390px;
  width: 350px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.85rem;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-item .label {
  color: #ccc;
}

.stat-item .value {
  font-family: 'Courier New', monospace;
  font-weight: bold;
}

.stat-item .value.running {
  color: #4CAF50;
}

.stat-item .value.paused {
  color: #FF9800;
}

/* Controls */
.controls {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.controls button {
  flex: 1;
  padding: 6px 12px;
  background: #333;
  color: white;
  border: 1px solid #555;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.controls button:hover:not(:disabled) {
  background: #444;
  border-color: #666;
}

.controls button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* FPS Control */
.fps-control {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
}

.fps-control label {
  color: #ccc;
  white-space: nowrap;
}

.fps-control input[type="range"] {
  flex: 1;
  height: 4px;
  background: #333;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.fps-control input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  background: #4CAF50;
  border-radius: 50%;
  cursor: pointer;
}

.fps-control input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #4CAF50;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

.fps-control span {
  color: #4CAF50;
  font-weight: bold;
  min-width: 30px;
  text-align: right;
}

/* Controls Panel Specific Styles */
.controls-panel {
  top: 20px;
  right: 20px;
  width: 200px;
}

.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.control-btn {
  padding: 8px 12px;
  background: #333;
  color: white;
  border: 1px solid #555;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.control-btn:hover {
  background: #444;
  border-color: #666;
}

/* Navigation Panel Specific Styles */
.navigation-panel {
  bottom: 20px;
  left: 20px;
  width: 200px;
}

.nav-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-btn {
  padding: 8px 12px;
  background: #333;
  color: white;
  border: 1px solid #555;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  text-align: center;
}

.nav-btn:hover {
  background: #444;
  border-color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
  .panel {
    width: 90vw;
    max-width: 350px;
  }
  
  .debug-panel,
  .stats-panel {
    left: 5vw;
  }
  
  .controls-panel {
    right: 5vw;
  }
  
  .navigation-panel {
    left: 5vw;
  }
}
