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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

h1 {
  text-align: center;
  color: #333;
  margin-bottom: 20px;
  font-size: 2.5em;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 25px;
  border-left: 4px solid #667eea;
}

#connectionStatus {
  font-weight: bold;
  padding: 5px 15px;
  border-radius: 20px;
  background: #dc3545;
  color: white;
}

#connectionStatus.connected {
  background: #28a745;
}

#clientId {
  color: #666;
  font-family: monospace;
  background: #e9ecef;
  padding: 5px 10px;
  border-radius: 4px;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 25px;
}

.control-group {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border: 2px solid #e9ecef;
}

.control-group h3 {
  margin-bottom: 15px;
  color: #495057;
  font-size: 1.1em;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 5px;
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #5568d3;
  transform: translateY(-2px);
}

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

.btn-danger:hover:not(:disabled) {
  background: #c82333;
  transform: translateY(-2px);
}

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

select {
  padding: 12px;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  font-size: 14px;
  width: 100%;
  margin-bottom: 10px;
  background: white;
}

select:focus {
  outline: none;
  border-color: #667eea;
}

.video-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 25px;
}

.video-box {
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.video-box h3 {
  position: absolute;
  top: 10px;
  left: 10px;
  color: white;
  background: rgba(0, 0, 0, 0.7);
  padding: 5px 10px;
  border-radius: 4px;
  z-index: 10;
  font-size: 0.9em;
}

.video-box video {
  width: 100%;
  height: 400px;
  object-fit: contain;
  background: #1a1a1a;
  display: block;
}

.video-status {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8em;
  z-index: 10;
}

.info {
  background: #e7f3ff;
  border: 2px solid #b3d9ff;
  border-radius: 8px;
  padding: 20px;
}

.info h3 {
  color: #0066cc;
  margin-bottom: 10px;
}

.info ol {
  margin-left: 20px;
  margin-bottom: 15px;
  line-height: 1.8;
  color: #333;
}

.info p {
  color: #666;
  font-size: 0.9em;
}

@media (max-width: 768px) {
  .controls,
  .video-container {
    grid-template-columns: 1fr;
  }
  
  .video-box video {
    height: 250px;
  }
}
.debug-panel {
  margin-top: 20px;
  background: #1a1a2e;
  border-radius: 8px;
  padding: 15px;
  color: #eee;
}

.debug-panel h4 {
  margin-bottom: 10px;
  color: #00d9ff;
}

.debug-log {
  background: #0f0f1a;
  border-radius: 4px;
  padding: 10px;
  height: 200px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  margin-bottom: 10px;
  border: 1px solid #333;
}

.debug-log div {
  margin: 2px 0;
  border-bottom: 1px solid #222;
  padding: 2px 0;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  margin-right: 5px;
}
