/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 40px;
  max-width: 700px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

h1 {
  text-align: center;
  color: #333;
  font-size: 2.5rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 40px;
  font-size: 1rem;
}

/* Language Configuration */
.language-config {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.person-config {
  flex: 1;
  min-width: 200px;
  text-align: center;
}

.person-config h3 {
  color: #555;
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.lang-select {
  width: 100%;
  padding: 15px;
  font-size: 1.1rem;
  border: 2px solid #667eea;
  border-radius: 12px;
  background: white;
  color: #333;
  cursor: pointer;
  transition: all 0.3s;
  outline: none;
}

.lang-select:hover {
  border-color: #764ba2;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.lang-select:focus {
  border-color: #764ba2;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.arrow {
  font-size: 2.5rem;
  color: #667eea;
  font-weight: bold;
  flex-shrink: 0;
}

/* Controls */
.controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.main-btn {
  padding: 18px 40px;
  font-size: 1.2rem;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.main-btn:not(.stop-btn) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.main-btn:not(.stop-btn):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.stop-btn {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.stop-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
}

.mic-icon, .stop-icon {
  font-size: 1.5rem;
}

/* Status */
.status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px;
  background: #f7f9fc;
  border-radius: 12px;
  margin-bottom: 20px;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #cbd5e0;
  transition: all 0.3s;
}

.status.connected .status-indicator {
  background: #48bb78;
  animation: pulse 2s infinite;
}

.status.listening .status-indicator {
  background: #4299e1;
  animation: pulse 1s infinite;
}

.status.translating .status-indicator {
  background: #ed8936;
  animation: pulse 0.8s infinite;
}

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

#statusText {
  color: #4a5568;
  font-weight: 500;
  font-size: 1rem;
}

/* Transcript */
.transcript-area {
  margin-top: 30px;
  padding: 20px;
  background: #f7f9fc;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
}

.transcript-area h3 {
  color: #555;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.transcript-content {
  max-height: 300px;
  overflow-y: auto;
  padding: 10px;
  background: white;
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
}

.transcript-entry {
  margin-bottom: 15px;
  padding: 12px;
  border-radius: 8px;
  background: #f8fafc;
  border-left: 4px solid #667eea;
}

.transcript-entry.detected {
  border-left-color: #48bb78;
}

.transcript-entry.translated {
  border-left-color: #ed8936;
}

.transcript-label {
  font-weight: 600;
  color: #667eea;
  margin-bottom: 5px;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 25px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .language-config {
    flex-direction: column;
  }
  
  .arrow {
    transform: rotate(90deg);
    margin: 10px 0;
  }
  
  .controls {
    flex-direction: column;
  }
  
  .main-btn {
    width: 100%;
    justify-content: center;
  }
}
