/* public/assets/css/defense.css — 模拟答辩 styles, consistent with the app's
   card language (rounded 18-28px, soft borders, green/blue accents). */

/* speak button states (also used by vocabulary cards) */
.speak-btn.is-loading { opacity: .65; animation: d-pulse 1s ease infinite; }
.speak-btn.is-playing { background: var(--green-soft); border-color: #bde6d6; color: var(--green); }
.speak-btn.is-error { background: #fdeeee; border-color: #f3c1c1; color: #c0392b; }
@keyframes d-pulse { 0%,100% { opacity:.55 } 50% { opacity:1 } }

/* mode tabs reuse .tabs/.tab */
#defense .tabs { margin-bottom: 12px; }
#defense .tab { flex: 1; text-align: center; padding: 11px 13px; font-size: 13px; }

.d-stage { padding-bottom: 8px; }

/* big buttons */
.d-big-btn { width: 100%; flex: none; padding: 16px 12px; font-size: 16px; border-radius: 18px; margin-top: 12px; }
.d-big-btn:disabled { opacity: .6; }

.d-mode-badges { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.d-mode-badges .badge { background: var(--green-soft); border-color: #bde6d6; color: var(--green); font-weight: 700; }

/* question stage */
.d-q-counter { display: inline-block; font-size: 12px; color: var(--muted); background: #f5f8fb; border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; }
.d-q-text { font-size: 21px; font-weight: 800; line-height: 1.5; margin: 14px 0 12px; letter-spacing: -.01em; }
.d-q-audio-row { display: flex; gap: 8px; align-items: center; }
.d-q-audio-row .btn { flex: 1; padding: 11px 8px; font-size: 13px; }
.d-q-audio-row .btn.is-loading { opacity: .7; }

.d-rec-wrap { margin-top: 16px; }
.d-rec-timer-wrap { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 6px 0 2px; }
.d-rec-dot { width: 10px; height: 10px; border-radius: 999px; background: #ef4444; animation: d-blink 1s ease infinite; }
@keyframes d-blink { 0%,100% { opacity:1 } 50% { opacity:.25 } }
.d-rec-timer { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.d-rec-status { text-align: center; font-size: 12px; color: var(--muted); margin-top: 4px; min-height: 16px; }

/* transcript */
.d-transcript-box { background: #f8fbfd; border: 1px solid var(--line); border-radius: 18px; padding: 14px; font-size: 15px; line-height: 1.75; margin-top: 10px; min-height: 90px; }
.d-transcript-box.empty { color: var(--muted); }
.d-edited-badge { display: inline-block; font-size: 11px; background: var(--amber-soft); border: 1px solid #f0dca8; color: #9a6b00; border-radius: 999px; padding: 4px 9px; margin-left: 8px; vertical-align: 2px; }
.d-edit-wrap { margin-top: 10px; }
.d-edit-wrap textarea { width: 100%; min-height: 130px; border: 1px solid var(--line); border-radius: 16px; padding: 12px; font: inherit; font-size: 15px; line-height: 1.7; background: #fff; color: var(--ink); resize: vertical; }
.d-btn-row { display: flex; gap: 8px; margin-top: 12px; }
.d-btn-row .btn { flex: 1; }

/* evaluation */
.d-eval-head { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; }
.d-eval-score { font-size: 44px; font-weight: 900; line-height: 1; color: var(--green); }
.d-eval-score-max { font-size: 14px; color: var(--muted); }
.d-eval-question { font-size: 13px; color: var(--muted); line-height: 1.6; margin-top: 8px; padding: 10px 12px; background: #f5f8fb; border: 1px solid var(--line); border-radius: 14px; }
.d-dims { margin-top: 12px; display: flex; flex-direction: column; gap: 9px; }
.d-dims .mini-label.d-dim { width: auto; min-width: 0; flex: 0 0 44%; font-size: 11px; line-height: 1.3; }
.d-dim-comment { font-size: 12px; color: var(--muted); line-height: 1.6; margin: -4px 0 4px 2px; }
.d-eval-sec { margin-top: 14px; }
.d-eval-sec h3 { margin: 0 0 8px; font-size: 15px; }
.d-eval-sec ul { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.8; }
.d-eval-sec li.muted { color: var(--muted); list-style: none; margin-left: -20px; }
.d-better { background: #f2f6ff; border: 1px solid #dce6ff; border-radius: 18px; padding: 14px; font-size: 15px; line-height: 1.75; margin-top: 8px; }
.d-expr { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-top: 8px; background: #fff; }
.d-expr b { display: block; font-size: 14px; }
.d-expr span { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.d-eval-note { font-size: 11px; color: var(--muted); text-align: center; margin-top: 14px; line-height: 1.6; }

/* summary */
.d-sum-avg { font-size: 40px; font-weight: 900; color: var(--green); line-height: 1; }

/* loading & errors */
.d-loading { text-align: center; color: var(--muted); font-size: 14px; padding: 30px 10px; }
.d-loading .spinner { display: inline-block; width: 22px; height: 22px; border: 3px solid #dbe6ef; border-top-color: var(--green); border-radius: 999px; animation: d-spin .8s linear infinite; vertical-align: -6px; margin-right: 8px; }
@keyframes d-spin { to { transform: rotate(360deg) } }
.d-error { display: flex; align-items: center; gap: 10px; background: #fdeeee; border: 1px solid #f3c1c1; color: #a03228; border-radius: 14px; padding: 11px 13px; font-size: 13px; margin-top: 12px; line-height: 1.55; }
.d-error .d-retry { flex: 0 0 auto; padding: 8px 14px; font-size: 13px; border-radius: 12px; }

/* realtime */
.d-rt-status { font-size: 13px; color: var(--muted); text-align: center; margin: 10px 0; min-height: 18px; }
.d-rt-status.ok { color: var(--green); }
.d-rt-status.live { color: #ef4444; font-weight: 750; }
.d-rt-status.err { color: #c0392b; }
.d-rt-panel { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.d-rt-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.d-rt-live { background: #f8fbfd; border: 1px solid var(--line); border-radius: 16px; padding: 11px 13px; font-size: 13.5px; line-height: 1.6; min-height: 52px; }
.d-rt-live .who { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.d-rt-live.examiner { background: #f2f6ff; border-color: #dce6ff; }
.d-rt-log { max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; background: #fff; margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.d-rt-line { font-size: 13px; line-height: 1.55; }
.d-rt-line .who { display: inline-block; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.d-rt-line.examiner .who { color: var(--blue); }
.d-rt-line.student .who { color: var(--green); }
.d-btn-danger { background: linear-gradient(135deg, #ff7a6e, #e64535); color: #fff; }

@media (max-width: 360px) {
  .d-q-text { font-size: 19px; }
  .d-eval-score { font-size: 38px; }
}
