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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #0f0f0f;
  color: #e0e0e0;
  overflow: hidden;
}

.container {
  display: flex;
  width: 100vw;
  height: 100vh;
  gap: 1rem;
  padding: 1rem;
}

.canvas-container {
  flex: 1;
  background: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  position: relative;
}

.canvas-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.control-panel {
  width: 320px;
  background: #1a1a1a;
  border-radius: 8px;
  padding: 1.5rem;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.control-panel h1 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

#tweakpane-container {
  flex: 1;
  min-height: 300px;
}

/* Tweakpane customization */
#tweakpane-container .tp-dfwv {
  width: 100%;
  max-width: none;
}

.tp-rotv_v {
  background: #252525;
}

.tp-lblv {
  color: #b0b0b0;
}

.tp-input {
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  color: #e0e0e0;
}

.tp-input:hover {
  background: #303030;
}

.tp-input:focus {
  border-color: #4a9eff;
  outline: none;
}

.recording-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn {
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background: #4a9eff;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #3a8eef;
  box-shadow: 0 4px 12px rgba(74, 158, 255, 0.4);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-secondary {
  background: #6b5b95;
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background: #7b6ba5;
  box-shadow: 0 4px 12px rgba(107, 91, 149, 0.4);
}

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

#recording-status {
  text-align: center;
  font-size: 0.85rem;
  color: #888;
  min-height: 1.2em;
}

#recording-status.recording {
  color: #ff4444;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

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

.control-panel::-webkit-scrollbar-track {
  background: transparent;
}

.control-panel::-webkit-scrollbar-thumb {
  background: #3a3a3a;
  border-radius: 4px;
}

.control-panel::-webkit-scrollbar-thumb:hover {
  background: #4a4a4a;
}

/* Responsive */
@media (max-width: 1024px) {
  .container {
    flex-direction: column;
  }

  .control-panel {
    width: 100%;
    max-height: 25vh;
  }
}
