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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  background: white;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
  color: #2c3e50;
  margin-bottom: 5px;
}

header p {
  color: #7f8c8d;
  font-size: 0.9em;
}

.version-info {
  color: #95a5a6;
  font-size: 0.85em;
  margin-top: 5px;
  font-family: 'Courier New', monospace;
}

.version-info span {
  color: #3498db;
  font-weight: 500;
}

section {
  background: white;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

section h2 {
  color: #2c3e50;
  margin-bottom: 15px;
  font-size: 1.3em;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
  margin-right: 10px;
  margin-bottom: 10px;
}

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

.btn-primary {
  background-color: #3498db;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: #2980b9;
}

.btn-danger {
  background-color: #e74c3c;
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background-color: #c0392b;
}

.btn-secondary {
  background-color: #95a5a6;
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #7f8c8d;
}

.btn-small {
  padding: 5px 10px;
  font-size: 12px;
}

/* Status boxes */
.status-box {
  margin-top: 15px;
  padding: 15px;
  border-radius: 4px;
}

.status-info {
  background-color: #ecf0f1;
  color: #34495e;
  padding: 10px;
  border-radius: 4px;
}

.status-success {
  background-color: #d4edda;
  color: #155724;
  padding: 10px;
  border-radius: 4px;
}

.status-error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 10px;
  border-radius: 4px;
}

/* Logs */
.logs-container {
  max-height: 400px;
  overflow-y: auto;
  background-color: #2c3e50;
  color: #ecf0f1;
  padding: 15px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
}

.log-entry {
  margin-bottom: 5px;
  padding: 5px;
  border-left: 3px solid transparent;
}

.log-entry.log-info {
  border-left-color: #3498db;
}

.log-entry.log-success {
  border-left-color: #2ecc71;
}

.log-entry.log-error {
  border-left-color: #e74c3c;
}

.log-entry.log-warning {
  border-left-color: #f39c12;
}

.log-time {
  color: #95a5a6;
  margin-right: 10px;
}

.log-message {
  color: #ecf0f1;
}

/* Recordings */
.recordings-list {
  margin-top: 15px;
}

.recordings-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recording-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #dee2e6;
}

.recording-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.recording-player {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-play {
  background-color: #28a745;
  color: white;
  min-width: 130px;
}

.btn-play:hover:not(:disabled) {
  background-color: #218838;
}

.btn-play.playing {
  background-color: #dc3545;
}

.btn-play.playing:hover:not(:disabled) {
  background-color: #c82333;
}

.recording-time {
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: #495057;
  min-width: 80px;
  text-align: center;
  font-weight: 500;
}

.recording-info {
  flex: 1;
}

.recording-name {
  font-weight: 500;
  color: #2c3e50;
  margin-bottom: 5px;
}

.recording-meta {
  font-size: 0.85em;
  color: #7f8c8d;
}

.loading {
  color: #3498db;
  font-style: italic;
}

.success {
  color: #2ecc71;
}

.error {
  color: #e74c3c;
}

.info {
  color: #7f8c8d;
}

/* Connection controls */
.connection-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

/* Traffic stats */
.traffic-display {
  margin-top: 15px;
  padding: 12px;
  background-color: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #dee2e6;
}

.traffic-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.traffic-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
}

.traffic-label {
  font-weight: 500;
  color: #495057;
  min-width: 90px;
}

.traffic-value {
  color: #2c3e50;
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

.traffic-speed {
  color: #6c757d;
  font-size: 0.85em;
  font-family: 'Courier New', monospace;
}

/* Devices info */
.devices-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 15px 0;
  padding: 12px;
  background-color: #f8f9fa;
  border-radius: 4px;
}

.device-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.device-label {
  font-weight: 500;
  color: #495057;
  min-width: 100px;
}

.device-name {
  color: #6c757d;
  font-size: 0.9em;
}

/* Voice status */
.voice-status {
  margin: 15px 0;
  padding: 15px;
  text-align: center;
  border-radius: 4px;
  background-color: #e9ecef;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.voice-status.muted {
  background-color: #f8d7da;
  border: 2px solid #dc3545;
}

.voice-status.speaking {
  background-color: #d4edda;
  border: 2px solid #28a745;
}

.voice-status.listening {
  background-color: #e9ecef;
  border: 2px solid #6c757d;
}

.voice-status-icon {
  font-size: 2em;
  line-height: 1;
  transition: all 0.3s;
}

.voice-status.muted .voice-status-icon {
  font-size: 2em;
  filter: grayscale(100%);
  opacity: 0.6;
}

.voice-status.speaking .voice-status-icon {
  font-size: 2.2em;
  animation: pulse 1s ease-in-out infinite;
}

.voice-status.listening .voice-status-icon {
  font-size: 2em;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.voice-status-text {
  font-weight: 600;
  font-size: 1.1em;
  color: #495057;
}

.voice-status.muted .voice-status-text {
  color: #721c24;
}

.voice-status.speaking .voice-status-text {
  color: #155724;
}

.voice-status.listening .voice-status-text {
  color: #495057;
}

/* Audio format selector */
.audio-format-selector {
  margin: 15px 0;
  padding: 12px;
  background-color: #f8f9fa;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.format-label {
  font-weight: 500;
  color: #495057;
}

.format-select {
  padding: 6px 12px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background-color: white;
  font-size: 14px;
  color: #495057;
  cursor: pointer;
}

.format-select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.format-info {
  font-size: 0.85em;
  color: #6c757d;
  font-style: italic;
}

/* Mic controls */
.mic-controls {
  display: flex;
  gap: 10px;
  margin: 15px 0;
  flex-wrap: wrap;
}

.btn-icon {
  margin-right: 5px;
}

.btn-text {
  vertical-align: middle;
}

.btn.mic-on {
  background-color: #28a745;
}

.btn.mic-on:hover:not(:disabled) {
  background-color: #218838;
}

.btn.push-to-talk-active {
  background-color: #dc3545;
  color: white;
}

.btn.push-to-talk-active:hover:not(:disabled) {
  background-color: #c82333;
}

/* Volume control */
.volume-control {
  margin: 15px 0;
  padding: 12px;
  background-color: #f8f9fa;
  border-radius: 4px;
}

.volume-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-weight: 500;
  color: #495057;
}

.volume-icon {
  font-size: 1.2em;
}

.volume-value {
  font-weight: 600;
  color: #3498db;
  font-family: 'Courier New', monospace;
  min-width: 40px;
  text-align: right;
}

.volume-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #dee2e6;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #3498db;
  cursor: pointer;
  transition: background 0.3s;
}

.volume-slider::-webkit-slider-thumb:hover {
  background: #2980b9;
}

.volume-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #3498db;
  cursor: pointer;
  border: none;
  transition: background 0.3s;
}

.volume-slider::-moz-range-thumb:hover {
  background: #2980b9;
}

.volume-slider:focus {
  outline: none;
}

.volume-slider:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

.volume-slider:focus::-moz-range-thumb {
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
  
  section {
    padding: 15px;
  }
  
  .recording-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

