* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  overflow: hidden;
  display: flex;
  min-height: 100vh;
}

#viewer {
  flex: 1;
  height: 100vh;
  background: radial-gradient(circle at center, #2a2a4e 0%, #1a1a2e 100%);
}

.controls-panel {
  width: 320px;
  background: rgba(30, 30, 50, 0.95);
  color: #e0e0e0;
  padding: 20px;
  overflow-y: auto;
  border-left: 2px solid #4a4a6a;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
}

.controls-panel h2 {
  color: #4fc3f7;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #4a4a6a;
  font-size: 1.5em;
}

.controls-panel h3 {
  color: #81d4fa;
  margin: 15px 0 10px 0;
  font-size: 1.1em;
  padding-bottom: 5px;
  border-bottom: 1px solid #3a3a5a;
}

.control-group {
  margin-bottom: 20px;
}

.control-item {
  margin-bottom: 15px;
}

.control-item label {
  display: block;
  margin-bottom: 5px;
  color: #b0bec5;
  font-size: 0.9em;
}

.control-item input[type="range"] {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #3a3a5a;
  border-radius: 3px;
  outline: none;
}

.control-item input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #4fc3f7;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}

.control-item input[type="range"]::-webkit-slider-thumb:hover {
  background: #81d4fa;
}

.control-item input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #4fc3f7;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}

.control-item input[type="range"]::-moz-range-thumb:hover {
  background: #81d4fa;
}

.value-display {
  display: inline-block;
  margin-top: 5px;
  color: #4fc3f7;
  font-size: 0.85em;
  font-family: 'Courier New', monospace;
}

.preset-buttons,
.view-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

button {
  padding: 10px 15px;
  background: linear-gradient(135deg, #4a4a6a 0%, #3a3a5a 100%);
  color: #e0e0e0;
  border: 1px solid #5a5a7a;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.2s;
}

button:hover {
  background: linear-gradient(135deg, #5a5a7a 0%, #4a4a6a 100%);
  border-color: #4fc3f7;
  color: #fff;
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.info-panel {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(30, 30, 50, 0.9);
  color: #e0e0e0;
  padding: 15px 20px;
  border-radius: 8px;
  border: 1px solid #4a4a6a;
  max-width: 300px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.info-panel h3 {
  color: #4fc3f7;
  margin-bottom: 10px;
  font-size: 1.1em;
}

.info-panel #status {
  margin-bottom: 10px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  font-size: 0.9em;
}

.instructions {
  margin-top: 10px;
}

.instructions h4 {
  color: #81d4fa;
  font-size: 0.95em;
  margin-bottom: 5px;
}

.instructions ul {
  list-style: none;
  padding-left: 0;
}

.instructions li {
  color: #b0bec5;
  font-size: 0.85em;
  margin-bottom: 4px;
  padding-left: 15px;
  position: relative;
}

.instructions li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: #4fc3f7;
}

/* Scrollbar styling */
.controls-panel::-webkit-scrollbar {
  width: 8px;
}

.controls-panel::-webkit-scrollbar-track {
  background: rgba(30, 30, 50, 0.5);
}

.controls-panel::-webkit-scrollbar-thumb {
  background: #4a4a6a;
  border-radius: 4px;
}

.controls-panel::-webkit-scrollbar-thumb:hover {
  background: #5a5a7a;
}

/* Responsive design */
@media (max-width: 900px) {
  body {
    flex-direction: column;
  }

  #viewer {
    height: 60vh;
  }

  .controls-panel {
    width: 100%;
    height: 40vh;
    border-left: none;
    border-top: 2px solid #4a4a6a;
  }

  .info-panel {
    position: relative;
    bottom: auto;
    left: auto;
    margin: 10px;
    max-width: none;
  }
}
