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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background: #0a1a1a;
  color: #e0e0e0;
}

#container {
  display: flex;
  height: 100vh;
  width: 100vw;
}

#canvas-container {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a1a1a;
}

#canvas {
  max-width: 100%;
  max-height: 100%;
  image-rendering: pixelated;
}

#pendulumCanvas {
  position: absolute;
  width: 200px;
  height: 200px;
  bottom: 10px;
  right: 10px;
  border: 1px solid #333;
  background: #1a1a1a;
}

#controls {
  width: 320px;
  background: #1f1f1f;
  padding: 20px;
  overflow-y: auto;
  border-left: 1px solid #333;
}

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

.control-group h3 {
  margin: 0 0 10px 0;
  color: #888;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.control-group label {
  display: block;
  margin-bottom: 5px;
  color: #aaa;
  font-size: 12px;
}

.control-group select,
.control-group input[type="number"] {
  width: 100%;
  padding: 8px;
  background: #2a2a2a;
  border: 1px solid #444;
  color: #fff;
  border-radius: 4px;
  font-size: 13px;
}

.control-group select:focus,
.control-group input:focus {
  outline: none;
  border-color: #666;
}

.control-group input[type="range"] {
  width: 100%;
  margin-top: 5px;
}

.control-group input[type="checkbox"] {
  margin-right: 8px;
}

.buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.buttons button {
  flex: 1;
  padding: 10px;
  background: #2a4a6a;
  border: none;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
}

.buttons button:hover {
  background: #3a6a8a;
}

.buttons button:active {
  background: #1a3a5a;
}

#hover-info {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.8);
  padding: 10px 15px;
  border-radius: 4px;
  font-size: 12px;
  color: #888;
  pointer-events: none;
}

@media (max-width: 768px) {
  #container {
    flex-direction: column;
  }
  
  #controls {
    width: 100%;
    height: auto;
    border-left: none;
    border-top: 1px solid #333;
  }
  
  #canvas-container {
    flex: none;
    height: 60vh;
  }
}
