/* ============================================================
   KeepABC AI Coach — Global + Practice Page Styles
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --brand: #28a7e1;
  --brand-hover: #1e8bc3;
  --brand-light: #d6f0fa;
  --brand-soft: #d6f0fa;
  --surface: #f8fafc;
  --surface-raised: #ffffff;
  --bg: #f1f5f9;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --transition: all 0.2s ease;
  --header-height: 64px;
}

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

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  line-height: 1.6;
}

/* ---------- Page System ---------- */
.page {
  display: none;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.page.active {
  display: block;
}

/* ---------- Top Bar ---------- */
.top-bar {
  height: var(--header-height);
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.top-bar .logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}

.top-bar .logo-area img {
  height: 32px;
}

.nav-tabs {
  display: flex;
  gap: 4px;
}

.nav-tab {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
  border: none;
  background: transparent;
}

.nav-tab:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

.nav-tab.active {
  background: var(--brand);
  color: white;
  font-weight: 600;
}

.user-area,
.guest-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-name {
  font-size: 14px;
  color: var(--text);
}

/* ---------- Buttons ---------- */
.btn {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: var(--brand);
  color: white;
}

.btn-primary:hover {
  background: var(--brand-hover);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-outline {
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.btn-ghost:hover {
  color: var(--brand);
}

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* ---------- Toast ---------- */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---------- Landing Page ---------- */
.landing-hero {
  text-align: center;
  padding: 60px 20px 40px;
}

.landing-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 12px;
}

.landing-hero .subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.landing-hero .desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 700px;
  margin: 0 auto;
}

.mode-card {
  background: var(--surface-raised);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.mode-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand);
}

.mode-card .icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.mode-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.mode-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-practice {
  background: var(--brand-soft);
  color: var(--brand);
}

.badge-mock {
  background: #fef3c7;
  color: #d97706;
}

/* ---------- Setup Page ---------- */
.setup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.setup-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
}

.mode-label {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.mode-label-practice {
  background: var(--brand-soft);
  color: var(--brand);
}

.mode-label-mock {
  background: #fef3c7;
  color: #d97706;
}

.part-section {
  background: var(--surface-raised);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  overflow: hidden;
}

.part-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.part-section-header:hover {
  background: var(--bg);
}

.part-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.part-status {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.part-section-body {
  padding: 16px;
}

.part-section-body.open,
#part1Body.open,
#part2Body.open,
#part3Body.open {
  display: block;
}

.input-methods {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.method-tab {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-muted);
  transition: var(--transition);
}

.method-tab:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.method-tab.active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.select-box,
.search-box {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.selected-questions {
  margin-top: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.q-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.q-num {
  width: 22px;
  height: 22px;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.visibility-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--surface-raised);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--border);
  border-radius: 24px;
  transition: var(--transition);
}

.toggle-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--brand);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.start-hint {
  text-align: center;
  color: var(--warning);
  font-size: 0.85rem;
  margin-top: 12px;
}

/* ---------- Practice Page ---------- */
.practice-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.practice-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.practice-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
}

.progress-bar {
  flex: 1;
  min-width: 200px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.question-card {
  background: var(--surface-raised);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.question-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.question-text {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 12px;
  white-space: pre-wrap;
}

.question-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.question-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.recorder-area {
  background: var(--surface-raised);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.timer-display {
  font-size: 2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--brand);
  margin-bottom: 4px;
}

.timer-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.soundwave {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 40px;
  margin-bottom: 16px;
}

.soundwave .bar {
  width: 4px;
  background: var(--border);
  border-radius: 2px;
  transition: height 0.1s ease;
  height: 8px;
}

.soundwave.active .bar {
  background: var(--brand);
  animation: soundwave 0.5s ease-in-out infinite alternate;
}

@keyframes soundwave {
  0% { height: 8px; }
  100% { height: 32px; }
}

.rec-btn-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.rec-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition);
}

.rec-btn.idle {
  background: var(--brand-soft);
  color: var(--brand);
}

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

.rec-btn.paused {
  background: var(--brand);
  color: white;
}

.rec-btn svg {
  width: 34px;
  height: 34px;
}

.rec-ring {
  position: absolute;
  inset: -4px;
  border: 3px solid var(--danger);
  border-radius: 50%;
  animation: rec-pulse 1.5s infinite;
}

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

.rec-duration-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--danger);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
}

.rec-status-new {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.transcript-area {
  min-height: 80px;
  max-height: 200px;
  overflow-y: auto;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 16px;
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
}

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

.action-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Part 2 */
.part2-card-area {
  background: var(--surface-raised);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 16px;
}

.part2-time-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.part2-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
}

.part2-card-header {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 8px;
}

.part2-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.part2-card-hints .hints-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.part2-card-hints ul {
  list-style: none;
  padding: 0;
}

.part2-card-hints li {
  padding: 4px 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.part2-stage-area {
  background: linear-gradient(135deg, var(--brand-soft), var(--surface));
  border-radius: var(--radius-lg);
  border: 2px solid var(--brand);
  padding: 32px;
  text-align: center;
  margin-bottom: 16px;
}

.part2-stage-badge {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 12px;
}

.part2-countdown {
  font-size: 3rem;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 8px;
}

.part2-stage-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.part2-small-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.85rem;
}

.timer-label-part2 {
  font-weight: 600;
  color: var(--text-muted);
}

.timer-value-part2 {
  font-weight: 700;
  color: var(--brand);
}

.timer-value-part2.urgent {
  color: var(--danger);
  animation: blink 1s infinite;
}

/* ---------- Feedback Page ---------- */
.score-ring-section {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.score-ring {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 8px solid var(--brand-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-ring-inner {
  text-align: center;
}

.big-score {
  font-size: 3rem;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
}

.big-score-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.band-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.part-badge {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.feedback-section {
  background: var(--surface-raised);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 16px;
}

.feedback-section.highlight {
  background: linear-gradient(135deg, var(--brand-soft), var(--surface));
  border-color: var(--brand);
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.dim-section {
  margin-bottom: 24px;
}

.dim-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.dim-card {
  background: var(--surface-raised);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 16px;
}

.dim-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.dim-icon {
  font-size: 1.5rem;
}

.dim-info {
  flex: 1;
}

.dim-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.dim-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.dim-score {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brand);
}

.dim-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.dim-bar-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.dim-detail {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface-raised);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 16px;
  text-align: center;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  margin: 2px;
}

.tag-good {
  background: #d1fae5;
  color: #059669;
}

.tag-improve {
  background: #fee2e2;
  color: #dc2626;
}

.scoring-progress-wrap {
  text-align: center;
  padding: 40px 20px;
  margin-bottom: 24px;
}

.scoring-progress-title {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.scoring-progress-bar-bg {
  width: 100%;
  max-width: 400px;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  margin: 0 auto 12px;
  overflow: hidden;
}

.scoring-progress-bar-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 4px;
  animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 100%; }
}

/* ---------- Progress Page ---------- */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .emoji {
  font-size: 3rem;
  margin-bottom: 12px;
}

/* ---------- Auth Modal ---------- */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.auth-modal {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 400px;
  max-width: 90vw;
  position: relative;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.auth-tab {
  padding: 8px 16px;
  border: none;
  background: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.auth-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.auth-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.auth-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 8px;
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-muted);
}

/* ---------- Progress Dashboard ---------- */
.progress-dashboard {
  margin-bottom: 24px;
  padding: 16px;
  background: var(--surface-raised);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ============================================================
   PRACTICE PAGE — 左右布局 + 摄像头区域（原有样式保留）
   ============================================================ */

/* 左右布局容器 */
.practice-layout {
  display: grid;
  grid-template-columns: 1fr 520px;
  gap: 20px;
  align-items: start;
}

/* 练习页整体加宽，容纳放大的作答区与摄像头区 */
#practicePage {
  max-width: 1560px;
}

/* 左侧：题目 + 录音 */
.practice-left {
  min-width: 0;
}

/* 右侧：摄像头 + 仪态提示 */
.practice-right {
  position: sticky;
  top: calc(var(--header-height) + 16px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.practice-right {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ========== 摄像头面板 ========== */
.camera-panel {
  background: var(--surface-raised);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.camera-video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 300px;
  background: #0f0f0f;
  overflow: hidden;
}

.camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 摄像头未开启时的遮罩 */
.camera-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a2e;
  z-index: 2;
}

.camera-overlay.hidden {
  display: none;
}

.camera-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  gap: 8px;
}

.camera-placeholder svg {
  opacity: 0.5;
}

.camera-placeholder span {
  font-size: 0.85rem;
}

/* 摄像头角标 */
.camera-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 500;
  z-index: 3;
}
.camera-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  z-index: 3;
}

.camera-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
  animation: camera-pulse 2s infinite;
}

@keyframes camera-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* 摄像头状态栏 */
.camera-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface-raised);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-light);
  flex-shrink: 0;
}

.status-dot.active {
  background: var(--success);
}

.status-dot.error {
  background: #ef4444;
}

.status-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex: 1;
}

.camera-toggle-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
  padding: 0;
}

.camera-toggle-btn:hover {
  background: var(--brand-light);
  border-color: var(--brand);
  color: var(--brand);
}

/* ========== 面试仪态提示 ========== */
.posture-tips {
  background: var(--surface-raised);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 16px;
  box-shadow: var(--shadow);
}

.posture-tips-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.posture-icon {
  font-size: 1rem;
}

.posture-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brand);
}

.posture-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.posture-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.posture-list li:last-child {
  margin-bottom: 0;
}

.posture-bullet {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
  margin-top: 6px;
  flex-shrink: 0;
}

/* ========== 音量指示器 ========== */
.volume-panel {
  background: var(--surface-raised);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.volume-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.volume-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
}

.volume-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 2px;
  transition: height 0.1s ease, background 0.2s ease;
  min-height: 4px;
}

.volume-bar.active {
  background: linear-gradient(to top, var(--brand), #2dd4bf);
}

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
  .practice-layout {
    grid-template-columns: 1fr;
  }
  .practice-right {
    position: static;
    order: -1;
  }
  .camera-video-wrap {
    aspect-ratio: 16 / 9;
    max-height: 220px;
  }
}

@media (max-width: 640px) {
  .practice-layout {
    gap: 16px;
  }
  .practice-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .practice-header .progress-bar {
    max-width: 100%;
    width: 100%;
  }
}

/* 录音暂停提示（显示在提交评分按钮右侧） */
.rec-paused-hint {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  line-height: 1.35;
}
.rec-paused-hint strong {
  font-size: 0.9rem;
  font-weight: 600;
  color: #d97706;
}
.rec-paused-hint span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* 播放题目按钮（大号、明显可点击） */
.btn-play-question {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(40, 167, 225, 0.35);
  transition: var(--transition);
}
.btn-play-question svg {
  width: 18px;
  height: 18px;
}
.btn-play-question:hover {
  background: #1f96d0;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(40, 167, 225, 0.45);
}
.btn-play-question:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(40, 167, 225, 0.35);
}
