/* ============================================================
   🎙️ LIVE VOICE AI INTERVIEW ROOM (Clean White / Dark Text Theme)
   ============================================================ */

.interview-page {
  padding-top: 30px;
  padding-bottom: 60px;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
  background-color: #FFFFFF;
}

.interview-container {
  max-width: 1100px;
}

/* Interview Status Header Bar */
.interview-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.room-meta-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.meta-role-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.2);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
}

.meta-level-pill {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.room-timer-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-surface);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-card);
}

/* Main Stage Grid */
.interview-stage-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: stretch;
}

/* Left: AI Avatar Stage */
.ai-avatar-stage {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 460px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* Animated Glowing Rings */
.avatar-visualizer-box {
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}

.pulse-ring {
  position: absolute;
  inset: -15px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  opacity: 0;
  pointer-events: none;
}

.pulse-ring.active {
  animation: pulseOut 2s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

.pulse-ring:nth-child(2) {
  animation-delay: 0.6s;
  border-color: var(--cyan);
}

.pulse-ring:nth-child(3) {
  animation-delay: 1.2s;
  border-color: var(--primary-light);
}

@keyframes pulseOut {
  0% { transform: scale(0.85); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

.avatar-sphere {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: url('https://mockora.prananshaastay.com/backend/uploads/user_2_1787394085.jpg') center/cover no-repeat;
  border: 3px solid rgba(0, 210, 211, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.35);
  position: relative;
  z-index: 2;
  transition: transform 0.2s ease;
}

.avatar-sphere.speaking {
  animation: avatarVibrate 0.6s ease-in-out infinite alternate;
}

@keyframes avatarVibrate {
  0% { transform: scale(1); box-shadow: 0 10px 30px rgba(79, 70, 229, 0.3); }
  100% { transform: scale(1.08); box-shadow: 0 15px 45px rgba(2, 132, 199, 0.4); }
}

.avatar-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.avatar-eyes {
  display: flex;
  gap: 24px;
}

.avatar-eye {
  width: 14px;
  height: 14px;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 0 8px #FFFFFF;
}

.avatar-mouth {
  width: 24px;
  height: 6px;
  background: #FFFFFF;
  border-radius: 6px;
  transition: height 0.15s ease, width 0.15s ease;
}

.avatar-sphere.speaking .avatar-mouth {
  animation: mouthMove 0.3s ease-in-out infinite alternate;
}

@keyframes mouthMove {
  0% { height: 6px; width: 22px; border-radius: 6px; }
  100% { height: 18px; width: 28px; border-radius: 12px; }
}

/* AI Status Indicator */
.ai-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.ai-status-indicator.ai-speaking {
  color: var(--primary);
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.25);
}

.ai-status-indicator.listening {
  color: var(--emerald);
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.ai-status-indicator.processing {
  color: var(--amber);
  background: rgba(217, 119, 6, 0.08);
  border: 1px solid rgba(217, 119, 6, 0.25);
}

/* Question Banner in Stage */
.current-question-card {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.question-number-tag {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.question-text-display {
  font-size: 1.15rem;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.45;
}

/* Right: Candidate Live Preview & Transcript Stream */
.candidate-interaction-stage {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Camera Video Box */
.camera-preview-box {
  background: #0F172A;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  height: 220px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

#cameraVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.camera-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #FFFFFF;
}

/* Live Spoken Speech Transcript Box */
.speech-transcript-box {
  flex: 1;
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  box-shadow: var(--shadow-sm);
}

.transcript-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-card);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.live-transcript-content {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-y: auto;
  max-height: 140px;
}

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

/* Stage Bottom Action Bar */
.interview-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-top: 24px;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.control-buttons-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.circle-control-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.circle-control-btn:hover {
  background: #FFFFFF;
  border-color: var(--primary);
  transform: scale(1.05);
}

.circle-control-btn.active-off {
  background: rgba(220, 38, 38, 0.1);
  border-color: var(--rose);
  color: var(--rose);
}

@media (max-width: 900px) {
  .interview-stage-grid { grid-template-columns: 1fr; }
  .ai-avatar-stage { min-height: 380px; }
}
