/* IELTS Speaking Exam Styles */

.speaking-exam-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.speaking-exam-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: var(--surface);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.exam-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.exam-title h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text);
}

.exam-part-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--teal);
  color: white;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
}

.exam-timer {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--teal);
  font-family: var(--font-display);
}

.speaking-exam-main {
  padding: 40px;
}

.speaking-exam-progress {
  margin-bottom: 32px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--surface-muted);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  border-radius: 999px;
  transition: width 0.3s ease;
}

.speaking-exam-topic {
  text-align: center;
  margin-bottom: 24px;
}

.topic-badge {
  display: inline-block;
  background: rgba(0, 191, 166, 0.1);
  color: var(--teal);
  padding: 8px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
}

.speaking-exam-question {
  text-align: center;
  padding: 32px;
  background: var(--surface-muted);
  border-radius: var(--radius-md);
  margin-bottom: 32px;
}

.question-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.speaking-exam-question h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--text);
  margin: 0 0 16px 0;
  line-height: 1.4;
}

.part2-prep-timer,
.part2-speak-timer {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.timer-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 191, 166, 0.3);
  position: relative;
}

.timer-circle-large {
  width: 180px;
  height: 180px;
}

.timer-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  font-family: var(--font-display);
}

.timer-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  margin-top: 4px;
}

.part2-points ul {
  text-align: left;
  max-width: 500px;
  margin: 0 auto;
}

.recording-controls {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
}

.recording-status {
  text-align: center;
  margin-bottom: 16px;
}

.recording-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(223, 107, 103, 0.1);
  color: var(--danger);
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
}

.recording-dot {
  width: 12px;
  height: 12px;
  background: var(--danger);
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

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

.recording-indicator-idle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-muted);
  color: var(--text-soft);
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
}

.transcript-box {
  background: var(--surface-muted);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  border-left: 4px solid var(--teal);
}

.transcript-header {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  font-size: 1rem;
}

.transcript-content {
  color: var(--text);
  line-height: 1.6;
  font-size: 1rem;
  min-height: 60px;
  max-height: 200px;
  overflow-y: auto;
}

.interim-transcript {
  color: var(--text-muted);
  font-style: italic;
}

.info-box {
  background: rgba(0, 191, 166, 0.1);
  border: 1px solid var(--teal);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

.info-box p {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
}

.btn-danger {
  background: var(--danger);
  color: white;
  border: none;
}

.btn-danger:hover {
  background: #c55955;
}

.btn-danger:disabled {
  background: #e8a5a2;
  cursor: not-allowed;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--surface-muted);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .speaking-exam-header {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .exam-title {
    flex-direction: column;
    gap: 12px;
  }
  
  .speaking-exam-main {
    padding: 24px;
  }
  
  .speaking-exam-question {
    padding: 24px 16px;
  }
  
  .speaking-exam-question h3 {
    font-size: 1.3rem;
  }
  
  .timer-circle {
    width: 120px;
    height: 120px;
  }
  
  .timer-circle-large {
    width: 150px;
    height: 150px;
  }
  
  .timer-value {
    font-size: 2rem;
  }
}

/* Dark mode adjustments */
html[data-theme='dark'] .speaking-exam-header,
html[data-theme='dark'] .recording-controls {
  background: var(--surface-strong);
}

html[data-theme='dark'] .speaking-exam-question,
html[data-theme='dark'] .transcript-box,
html[data-theme='dark'] .info-box {
  background: var(--surface-muted);
}

html[data-theme='dark'] .recording-indicator-idle {
  background: var(--surface-strong);
}
