/* ==================== VOICE CHAT INDICATORS ==================== */
.voice-indicators {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9997;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 250px;
}

.voice-indicator {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.3s ease;
}

.voice-indicator.speaking {
  background: linear-gradient(135deg, #4CAF50, #2E8B57);
  animation: pulse-speaking 1s infinite;
}

.voice-indicator-icon {
  font-size: 1.2em;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-speaking {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
  }
  50% {
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.8);
  }
}

/* ==================== RECORD BUTTON ==================== */
.record-btn {
  background: linear-gradient(135deg, #e53935, #c62828);
  color: white;
  font-size: clamp(0.95em, 2.5vw, 1.1em);
  font-weight: bold;
  padding: 12px 24px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  margin-top: 12px;
  box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4);
  transition: all 0.3s ease;
}

.record-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #ef5350, #d32f2f);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(229, 57, 53, 0.6);
}

.record-btn:disabled {
  background: #999;
  cursor: not-allowed;
}

.record-btn.recording {
  animation: pulse-recording 1s infinite;
}

@keyframes pulse-recording {
  0%, 100% { 
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4);
  }
  50% { 
    box-shadow: 0 6px 25px rgba(229, 57, 53, 0.8);
  }
}

/* ==================== PLAY AUDIO BUTTON ==================== */
.play-audio-btn {
  background: linear-gradient(135deg, #1976d2, #1565c0);
  color: white;
  font-size: clamp(0.95em, 2.5vw, 1.1em);
  font-weight: bold;
  padding: 12px 24px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  margin: 12px 0;
  box-shadow: 0 4px 15px rgba(25, 118, 210, 0.4);
  transition: all 0.3s ease;
}

.play-audio-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #2196f3, #1976d2);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(25, 118, 210, 0.6);
}

.play-audio-btn:disabled {
  background: #999;
  cursor: not-allowed;
  opacity: 0.6;
}

/* ==================== PROGRESS BAR ==================== */
#progressBarContainer {
  width: 90%;
  height: 10px;
  background: #e0e0e0;
  margin: 10px auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

#progressBar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #4caf50, #8bc34a);
  transition: width 1s linear;
  border-radius: 8px;
}

/* ==================== TIMERS ==================== */
#timer, #essayTimer, #readingTimer, #listeningTimer {
  font-size: clamp(1.1em, 3vw, 1.3em);
  font-weight: bold;
  color: #e53935;
  margin-bottom: 8px;
  padding: 6px 12px;
  background: rgba(229, 57, 53, 0.1);
  border-radius: 8px;
  display: inline-block;
}

/* ==================== RESPONSIVE AUDIO/VOICE ==================== */
@media (max-width: 768px) and (orientation: portrait) {
  .record-btn, .play-audio-btn {
    font-size: 0.9em;
    padding: 10px 20px;
    margin-top: 10px;
  }
  
  #timer, #readingTimer, #listeningTimer {
    font-size: 1em;
    padding: 5px 10px;
    margin-bottom: 6px;
  }
  
  #progressBarContainer {
    width: 95%;
    height: 8px;
    margin: 8px auto;
  }
  
  #recordingStatus {
    font-size: 0.9em;
    margin-top: 8px;
  }
  
  #transcriptDisplay {
    margin-top: 10px;
    padding: 8px;
    font-size: 0.85em;
  }
  
  #audioStatus {
    font-size: 0.9em;
    margin: 8px 0;
  }
}

@media (max-width: 480px) {
  .record-btn, .play-audio-btn {
    font-size: 0.85em;
    padding: 9px 16px;
    border-radius: 16px;
  }
  
  #timer, #readingTimer, #listeningTimer {
    font-size: 0.95em;
    padding: 4px 8px;
    margin-bottom: 5px;
  }
  
  #progressBarContainer {
    width: 96%;
    height: 6px;
    margin: 6px auto;
  }
  
  #recordingStatus {
    font-size: 0.85em;
    margin-top: 6px;
  }
  
  #transcriptDisplay {
    margin-top: 8px;
    padding: 6px;
    font-size: 0.8em;
  }
  
  #audioStatus {
    font-size: 0.85em;
    margin: 6px 0;
  }
}