.translation-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.translation-setup {
  background: white;
  padding: 3rem;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 100%;
  text-align: center;
}

.translation-setup h1 {
  color: #333;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: #666;
  margin-bottom: 2rem;
}

.loading, .error {
  padding: 2rem;
  font-size: 1.1rem;
}

.error {
  color: #f44336;
}

.setup-form {
  text-align: left;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

.translator-input,
.language-select {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.translator-input:focus,
.language-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.join-translation-btn {
  width: 100%;
  padding: 1.2rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.join-translation-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.join-translation-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Translation Session */
.translation-session {
  min-height: 100vh;
  background: #1a1a1a;
  display: flex;
  flex-direction: column;
}

.session-header {
  background: rgba(255, 255, 255, 0.98);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-info h2 {
  margin: 0;
  color: #333;
  font-size: 1.5rem;
}

.translator-badge {
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.leave-session-btn {
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #f44336 0%, #e91e63 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.leave-session-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(244, 67, 54, 0.4);
}

/* Video Grid */
.video-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1rem;
}

.video-panel {
  background: #2a2a2a;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.panel-header {
  background: #333;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-header h3 {
  margin: 0;
  color: white;
  font-size: 1.1rem;
}

.status-badge {
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-badge.source {
  background: #f44336;
  color: white;
}

.status-badge.streaming {
  background: #4caf50;
  color: white;
  animation: pulse 2s infinite;
}

.status-badge.waiting {
  background: #ff9800;
  color: white;
}

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

.video-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  min-height: 400px;
}

.translation-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Control Panel */
.control-panel {
  background: rgba(255, 255, 255, 0.98);
  padding: 1.5rem 2rem;
  border-top: 2px solid #e0e0e0;
}

.stream-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.info-item {
  padding: 0.8rem;
  background: #f5f5f5;
  border-radius: 8px;
  font-size: 0.9rem;
  word-break: break-all;
}

.info-item strong {
  color: #667eea;
}

.control-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.start-btn,
.stop-btn {
  padding: 1rem 3rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.start-btn {
  background: linear-gradient(135deg, #4caf50 0%, #8bc34a 100%);
}

.start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(76, 175, 80, 0.4);
}

.stop-btn {
  background: linear-gradient(135deg, #f44336 0%, #e91e63 100%);
}

.stop-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(244, 67, 54, 0.4);
}

.rtmp-note {
  padding: 1rem;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  color: #856404;
  font-size: 0.9rem;
  text-align: center;
}

/* Responsive */
@media (max-width: 1024px) {
  .video-grid {
    grid-template-columns: 1fr;
  }

  .stream-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .session-header {
    flex-direction: column;
    gap: 1rem;
  }

  .header-info {
    flex-direction: column;
  }

  .control-buttons {
    flex-direction: column;
  }

  .start-btn,
  .stop-btn {
    width: 100%;
  }
}
