/**
 * Impact Simulator Styles
 * Simple, clean design with dark theme
 */

body {
  overscroll-behavior-y: contain;
}

/* Impact Simulator Section */
.impact-simulator {
  padding: 6rem 0rem;
  background: var(--dark-bg);
}

.app-container {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", sans-serif;
  background: #000;
  color: #fff;
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* Canvas */
#explosionCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Toggle Button */
.toggle-btn {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  color: #fff;
  padding: 12px;
  border: 1px solid grey;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-btn:hover {
  background: rgba(0, 0, 0, 0.95);
  transform: translateY(-50%) translateX(2px);
}

.toggle-btn:active {
  transform: translateY(-50%) scale(0.95);
}

/* Control Panel */
.control-panel {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 384px;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(24px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  overflow-y: auto;
  z-index: 2000;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.control-panel.open {
  transform: translateX(0);
}

.panel-content {
  padding: 5px 24px;
}

.panel-header h1 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.panel-header p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

.separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 24px 0;
}

.control-section {
  margin-bottom: 16px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.help-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
  margin-bottom: 12px;
}

.value-display {
  font-family: "Courier New", monospace;
  color: #fb923c;
}

.value-display.blue {
  color: #60a5fa;
}

/* Radio Group */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.radio-option:hover {
  background: rgba(255, 255, 255, 0.05);
}

.radio-option input[type="radio"] {
  margin-top: 2px;
  cursor: pointer;
}

.radio-label {
  flex: 1;
}

.radio-label .title {
  font-size: 14px;
  font-weight: 500;
  display: block;
  margin-bottom: 2px;
}

.radio-label .description {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* Slider */
.slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition: transform 0.2s;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: none;
  transition: transform 0.2s;
}

.slider::-moz-range-thumb:hover {
  transform: scale(1.2);
}

/* Select */
.select {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  outline: none;
}

.select option {
  background: #000;
  color: #fff;
}

/* Data Readout */
.data-readout {
  position: absolute;
  top: 160px;
  right: 24px;
  width: 256px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 16px;
  z-index: 10;
}

.readout-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.readout-header h2 {
  font-size: 14px;
  font-weight: 600;
}

.data-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.data-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.data-value {
  font-size: 12px;
  font-weight: 500;
  font-family: "Courier New", monospace;
}

.data-value.orange {
  color: #fb923c;
}

.data-value.blue {
  color: #60a5fa;
}

.data-value.red {
  color: #f87171;
}

.data-value.yellow {
  color: #fbbf24;
}

.data-value.purple {
  color: #a78bfa;
}

.casualty-box {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 6px;
  padding: 12px;
}

.casualty-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f87171;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

.casualty-count {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f87171;
}

.casualty-count span {
  font-size: 18px;
  font-weight: 700;
  font-family: "Courier New", monospace;
}

/* Impact Legend */
.impact-legend {
  position: absolute;
  bottom: 10px;
  left: 24px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 16px;
  z-index: 10;
}

.impact-legend h3 {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.legend-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-color.red {
  background: #dc2626;
}

.legend-color.yellow {
  background: #eab308;
}

.legend-color.orange {
  background: #f97316;
}

.legend-color.purple {
  background: #a855f7;
}

.legend-info {
  display: flex;
  flex-direction: column;
}

.legend-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.legend-value {
  font-size: 12px;
  font-weight: 500;
  font-family: "Courier New", monospace;
}

/* Icons */
.icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .control-panel {
    width: 100%;
  }

  .data-readout {
    width: calc(100% - 48px);
    right: 24px;
  }

  .impact-legend {
    width: calc(100% - 48px);
  }
}
