/* ==========================================================================
   SpeakHero - Modern Dark Obsidian & Gold Theme Design System
   Mobile-First, Touch-Optimized (>=52px targets), Responsive PWA
   ========================================================================== */

:root {
  --bg-main: #0B0F19;
  --bg-card: #151D2F;
  --bg-card-hover: #1C263D;
  --bg-surface: #1E293B;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(245, 158, 11, 0.35);
  
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  --accent-fire: #FF6B4A;
  --accent-fire-glow: rgba(255, 107, 74, 0.35);
  --accent-gold: #F59E0B;
  --accent-gold-glow: rgba(245, 158, 11, 0.3);
  --accent-green: #10B981;
  --accent-green-glow: rgba(16, 185, 129, 0.3);
  --accent-red: #EF4444;
  --accent-indigo: #6366F1;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-glow-gold: 0 0 20px rgba(245, 158, 11, 0.25);
  --shadow-glow-fire: 0 0 25px rgba(255, 107, 74, 0.35);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
  overflow-x: hidden;
  line-height: 1.5;
}

/* App Container (Centered Mobile-First Frame) */
.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background: var(--bg-main);
  display: flex;
  flex-direction: column;
  position: relative;
  padding-bottom: 90px;
}

@media (min-width: 768px) {
  .app-container {
    margin: 20px auto;
    min-height: calc(100vh - 40px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  }
}

/* Header & Top Bar */
.top-header {
  padding: 16px 20px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  font-size: 24px;
}

.brand-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #FFF, #F59E0B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}

.icon-btn:hover, .icon-btn:active {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  transform: scale(1.05);
}

/* Daily Progress & Streak Hub */
.streak-dashboard {
  padding: 16px 20px;
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-main) 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.streak-card-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.stat-box {
  background: var(--bg-surface);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-icon {
  font-size: 26px;
  background: rgba(255, 107, 74, 0.15);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.gold {
  background: rgba(245, 158, 11, 0.15);
}

.stat-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-lbl {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* 15-Minute Daily Task Progress Tracker */
.daily-15m-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
}

.progress-header span:last-child {
  color: var(--accent-gold);
  font-weight: 700;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-fire), var(--accent-gold));
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.task-steps-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.step-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.step-pill.active {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.1);
}

.step-pill.completed {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.12);
}

/* 5-Day Milestone Exam Banner (When available) */
.milestone-banner {
  margin: 14px 20px 0 20px;
  background: linear-gradient(135deg, #312E81, #1E1B4B);
  border: 2px solid #818CF8;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
  animation: pulse-border 2s infinite alternate;
}

@keyframes pulse-border {
  0% { box-shadow: 0 0 10px rgba(99, 102, 241, 0.2); }
  100% { box-shadow: 0 0 25px rgba(99, 102, 241, 0.6); }
}

.milestone-info h4 {
  font-size: 14px;
  font-weight: 800;
  color: #F8FAFC;
  display: flex;
  align-items: center;
  gap: 6px;
}

.milestone-info p {
  font-size: 12px;
  color: #C7D2FE;
  margin-top: 2px;
}

.milestone-btn {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #000;
  font-weight: 800;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* Tab Navigation */
.task-tabs-nav {
  display: flex;
  padding: 12px 20px 0;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
}

.task-tabs-nav::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab-btn.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}

/* Main Content Area */
.main-content {
  padding: 18px 20px;
  flex: 1;
}

.task-panel {
  display: none;
}

.task-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* Task Cards & Instructions */
.task-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.task-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.task-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.task-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Dynamic Encouragement Banner (Just Do It) */
.encouragement-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(245, 158, 11, 0.15));
  border: 1px dashed rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.enc-icon {
  font-size: 22px;
}

.enc-text {
  font-size: 12px;
  font-weight: 600;
  color: #FDE68A;
  line-height: 1.4;
}

/* Video & Camera Studio Box */
.camera-studio {
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  aspect-ratio: 3 / 4;
  width: 100%;
  max-height: 400px;
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.camera-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.rec-indicator {
  display: none;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: #FFF;
}

.rec-indicator.active {
  display: flex;
}

.rec-dot {
  width: 10px;
  height: 10px;
  background: var(--accent-red);
  border-radius: var(--radius-full);
  animation: rec-blink 1s infinite alternate;
}

@keyframes rec-blink {
  0% { opacity: 0.3; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1.1); }
}

.timer-pill {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 800;
  color: #FFF;
  font-variant-numeric: tabular-nums;
}

.audio-visualizer-canvas {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 36px;
  pointer-events: none;
}

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

.camera-placeholder .icon {
  font-size: 36px;
}

/* Floating Dynamic Cheering Cards for Task 3 */
.cheering-toast {
  position: absolute;
  bottom: 50px;
  left: 20px;
  right: 20px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--accent-gold);
  backdrop-filter: blur(8px);
  color: #FEF08A;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
  z-index: 20;
}

.cheering-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Controls Bar */
.controls-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.btn-primary {
  flex: 1;
  min-height: 52px;
  background: linear-gradient(135deg, var(--accent-fire), #EA580C);
  color: #FFF;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px var(--accent-fire-glow);
  transition: all 0.2s ease;
}

.btn-primary:hover, .btn-primary:active {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--accent-fire-glow);
}

.btn-primary.recording {
  background: linear-gradient(135deg, var(--accent-red), #B91C1C);
  animation: pulse-rec-btn 1.5s infinite alternate;
}

@keyframes pulse-rec-btn {
  0% { box-shadow: 0 0 10px rgba(239, 68, 68, 0.4); }
  100% { box-shadow: 0 0 25px rgba(239, 68, 68, 0.8); }
}

.btn-secondary {
  min-height: 52px;
  padding: 0 18px;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-secondary:hover, .btn-secondary:active {
  background: var(--bg-card-hover);
}

.btn-success {
  background: linear-gradient(135deg, var(--accent-green), #059669);
  box-shadow: 0 4px 15px var(--accent-green-glow);
}

/* Task 2: 300-Word Dual-Pass Reading Style */
.reading-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 16px;
}

.reading-pass-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.pass-tag {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.pass-tag.pass1 {
  background: rgba(99, 102, 241, 0.15);
  color: #A5B4FC;
}

.pass-tag.pass2 {
  background: rgba(239, 68, 68, 0.15);
  color: #FCA5A5;
}

.article-content {
  font-size: 15px;
  line-height: 1.8;
  color: #E2E8F0;
  text-align: justify;
  letter-spacing: 0.5px;
}

/* Red Bold Stress Word for Pass 2 */
.stress {
  color: #FF4D4D;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: rgba(255, 77, 77, 0.6);
  text-underline-offset: 4px;
  padding: 0 2px;
  background: rgba(239, 68, 68, 0.12);
  border-radius: 4px;
}

/* AI Feedback & Report Card */
.ai-report-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 16px;
  box-shadow: var(--shadow-glow-gold);
  animation: fadeIn 0.4s ease;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.report-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 6px;
}

.score-badge {
  font-size: 18px;
  font-weight: 900;
  color: #FFF;
  background: var(--accent-gold);
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

.metrics-radar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.metric-item {
  background: var(--bg-surface);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
}

.metric-val {
  color: var(--accent-green);
  font-weight: 800;
}

.feedback-section {
  margin-bottom: 10px;
}

.feedback-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.feedback-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.coach-praise-box {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-top: 10px;
  font-size: 12px;
  color: #A7F3D0;
  font-style: italic;
}

/* Modals (Settings, Milestone Exam, History) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.modal-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.modal-title {
  font-size: 17px;
  font-weight: 800;
}

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

/* Milestone Dual Screen Grid */
.dual-video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

.video-compare-box {
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  aspect-ratio: 3 / 4;
  position: relative;
}

.video-compare-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.7);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 800;
}

.video-tag.before { color: #94A3B8; }
.video-tag.after { color: var(--accent-gold); }

/* Certificate Canvas Preview */
.cert-preview-img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 2px solid var(--accent-gold);
  margin: 14px 0;
  box-shadow: var(--shadow-glow-gold);
}

/* Form inputs */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-gold);
}

/* Confetti Canvas */
#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}

/* AI Analyzing State & Single-Screen Transition */
.analyzing-state-box {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  text-align: center;
  margin: 10px 0 20px;
  box-shadow: var(--shadow-glow-gold);
  animation: fadeIn 0.3s ease;
}

.spinner-glow {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border: 4px solid rgba(245, 158, 11, 0.2);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.camera-idle-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-secondary);
  text-align: center;
  padding: 20px;
  gap: 10px;
}

.next-step-btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

/* ==========================================================================
   Pure Audio Flow Studio (Task 3 & Voice Record)
   ========================================================================== */
.audio-flow-studio {
  background: radial-gradient(circle at center, #1E293B 0%, #0F172A 70%, #0B0F19 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 36px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(245, 158, 11, 0.1);
  margin-bottom: 14px;
  min-height: 280px;
}

.audio-flow-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
  gap: 12px;
}

.mic-pulse-ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.12);
  border: 2px solid rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
}

.mic-pulse-ring.recording {
  background: rgba(239, 68, 68, 0.2);
  border-color: #EF4444;
  animation: mic-pulse 1.8s infinite ease-in-out;
}

@keyframes mic-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6), 0 0 20px rgba(239, 68, 68, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 18px rgba(239, 68, 68, 0), 0 0 35px rgba(239, 68, 68, 0.7);
    transform: scale(1.06);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0), 0 0 20px rgba(239, 68, 68, 0.4);
    transform: scale(1);
  }
}

.mic-large-icon {
  font-size: 38px;
}

.flow-status-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}

.flow-status-text.recording {
  color: #F87171;
  font-weight: 700;
}

.big-timer {
  font-size: 16px;
  font-weight: 800;
  padding: 6px 18px;
}

.voice-wave-canvas {
  width: 100%;
  height: 60px;
  margin-top: 14px;
  z-index: 5;
}

/* ==========================================================================
   Task 2 Audio Status & Dual Audio Player
   ========================================================================== */
.audio-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  gap: 10px;
}

.mini-visualizer-canvas {
  flex: 1;
  height: 32px;
  max-width: 160px;
}

.dual-audio-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  margin: 12px 0;
}

.dual-audio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 8px;
}

@media (min-width: 480px) {
  .dual-audio-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.audio-track-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.audio-track-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
}

.audio-track-item audio {
  width: 100%;
  height: 34px;
}

.growth-badge-pill {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFF;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   Daily Streak Reward Modal (恭喜完成第 X 天)
   ========================================================================== */
.reward-modal-container {
  background: linear-gradient(180deg, #1E1B4B 0%, #0F172A 50%, #0B0F19 100%);
  border: 2px solid var(--accent-gold);
  box-shadow: 0 0 50px rgba(245, 158, 11, 0.4), 0 25px 50px -12px rgba(0,0,0,0.8);
  position: relative;
  overflow: hidden;
  max-width: 440px;
}

.shine-rays-bg {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, rgba(245, 158, 11, 0) 70%);
  pointer-events: none;
  z-index: 1;
}

.reward-modal-body {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 0 4px 10px;
}

.reward-badge-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reward-badge-glow {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, #F59E0B 0%, transparent 70%);
  animation: badge-glow 2s infinite alternate ease-in-out;
}

@keyframes badge-glow {
  0% { transform: scale(0.9); opacity: 0.5; }
  100% { transform: scale(1.15); opacity: 0.9; }
}

.reward-badge-icon {
  position: relative;
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, #F59E0B, #B45309);
  border: 3px solid #FEF08A;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.5);
}

.reward-badge-icon span {
  font-size: 36px;
  line-height: 1;
}

.reward-day-pill {
  position: absolute;
  bottom: -6px;
  background: #1E1B4B;
  color: #FDE68A;
  border: 1px solid #F59E0B;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 900;
  padding: 2px 10px;
  letter-spacing: 0.5px;
}

.reward-title {
  font-size: 21px;
  font-weight: 900;
  background: linear-gradient(135deg, #FFFFFF, #FDE68A, #F59E0B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.reward-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.reward-stats-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  margin-bottom: 12px;
}

.reward-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reward-stat-item .r-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

.reward-stat-item .r-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}

.reward-stat-item .r-val.highlight {
  color: var(--accent-gold);
}

.reward-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.08);
}

.reward-level-progress-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 12px;
  text-align: left;
}

.progress-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #CBD5E1;
}

.reward-quote-box {
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid var(--accent-gold);
  border-radius: 4px;
  padding: 10px 12px;
  text-align: left;
  margin-bottom: 12px;
}

.reward-sync-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: #34D399;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  margin-bottom: 4px;
}

