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

html, body {
  width: 100%;
  height: 100%;
  background: #000000;
  color: #ffffff;
  font-family: 'Noto Sans', sans-serif;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.4;
  overflow: hidden;
}

.container {
  display: flex;
  width: 100%;
  height: 100%;
  gap: 0;
}

.control-panel {
  width: 250px;
  height: 100%;
  background: #0a0a0a;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.panel-header {
  margin-bottom: 10px;
}

.panel-header h1 {
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffffff;
  font-family: 'Noto Sans', sans-serif;
}

.control-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-section label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888888;
  font-weight: 300;
  font-family: 'Noto Sans', sans-serif;
}

.letter-input {
  font-family: 'Noto Sans', sans-serif;
  font-size: 18px;
  font-weight: 300;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  text-align: center;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.letter-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.letter-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.mode-buttons {
  display: flex;
  gap: 6px;
}

.mode-btn {
  flex: 1;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #999999;
  font-family: 'Noto Sans', sans-serif;
  font-size: 11px;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 2px;
}

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

.mode-btn.active {
  background: rgba(0, 255, 100, 0.2);
  border-color: rgba(0, 255, 100, 0.5);
  color: #00ff64;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slider {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 50%;
  cursor: pointer;
}

.slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

#speedValue {
  font-size: 11px;
  color: #888888;
  min-width: 40px;
  text-align: right;
  font-family: 'Noto Sans', sans-serif;
  font-weight: 300;
}

.mic-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mic-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #333333;
  transition: all 0.2s ease;
}

.mic-indicator.active {
  background: #00ff64;
  box-shadow: 0 0 8px rgba(0, 255, 100, 0.6);
}

.mic-indicator.off {
  background: #333333;
}

#micStatusText {
  font-size: 11px;
  color: #888888;
  font-family: 'Noto Sans', sans-serif;
  font-weight: 300;
}

.file-input {
  padding: 6px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #999999;
  cursor: pointer;
  border-radius: 2px;
  font-family: 'Noto Sans', sans-serif;
  font-weight: 300;
}

.file-input::file-selector-button {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 4px 8px;
  cursor: pointer;
  font-family: 'Noto Sans', sans-serif;
  font-size: 10px;
  font-weight: 300;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.file-input::file-selector-button:hover {
  background: rgba(255, 255, 255, 0.15);
}

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

.button-group {
  display: flex;
  gap: 6px;
}

.btn {
  flex: 1;
  padding: 10px;
  font-family: 'Noto Sans', sans-serif;
  font-size: 11px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: rgba(0, 255, 100, 0.15);
  color: #00ff64;
  border-color: rgba(0, 255, 100, 0.4);
}

.btn-primary:hover:not(:disabled) {
  background: rgba(0, 255, 100, 0.25);
  border-color: rgba(0, 255, 100, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #999999;
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.btn-export {
  background: rgba(255, 200, 0, 0.15);
  color: #ffc800;
  border-color: rgba(255, 200, 0, 0.4);
}

.btn-export:hover:not(:disabled) {
  background: rgba(255, 200, 0, 0.25);
  border-color: rgba(255, 200, 0, 0.6);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.02);
}

.footer {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 10px;
  font-family: 'Noto Sans', sans-serif;
  font-weight: 300;
}

.back-link {
  color: #888888;
  text-decoration: none;
  transition: color 0.2s ease;
  font-family: 'Noto Sans', sans-serif;
  font-weight: 300;
}

.back-link:hover {
  color: #ffffff;
}

.timestamp {
  color: #555555;
  font-size: 9px;
  font-family: 'Noto Sans', sans-serif;
  font-weight: 300;
}

.canvas-container {
  flex: 1;
  background: #000000;
  position: relative;
  overflow: hidden;
}

canvas {
  display: block;
  background: #000000;
}

.control-panel::-webkit-scrollbar {
  width: 6px;
}

.control-panel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.control-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.control-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .control-panel {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 40vh;
    overflow-x: auto;
  }

  .control-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .control-section label {
    min-width: 60px;
  }

  .canvas-container {
    flex: 1;
  }
}
