/* ==========================================
   雅思备考工作台 - 移动端样式
   ========================================== */

:root {
  --primary: #6366F1;
  --primary-dark: #4F46E5;
  --primary-light: #EEF2FF;
  --c-listening: #3B82F6;
  --c-reading: #10B981;
  --c-writing: #F59E0B;
  --c-speaking: #EF4444;
  --c-vocab: #8B5CF6;
  --bg: #F3F4F6;
  --card: #FFFFFF;
  --text: #1F2937;
  --text-sub: #6B7280;
  --text-light: #9CA3AF;
  --border: #E5E7EB;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

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

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

body {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

/* ===== App Header ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: calc(12px + var(--safe-top)) 16px 12px;
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

.app-header h1 {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-header .header-sub {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 2px;
}

.phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.2);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
}

/* ===== Main Content ===== */
.main-content {
  padding: 12px 14px 90px;
  min-height: calc(100vh - 60px);
}

.view {
  display: none;
  animation: fadeIn 0.25s ease;
}

.view.active {
  display: block;
}

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

/* ===== Section Title ===== */
.section-title {
  font-size: 16px;
  font-weight: 700;
  margin: 16px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title:first-child {
  margin-top: 4px;
}

.section-title .more {
  font-size: 12px;
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
}

/* ===== Cards ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

.card-tap {
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.card-tap:active {
  transform: scale(0.98);
}

/* ===== Dashboard - Today's Tasks ===== */
.today-date {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 8px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.task-item.done {
  opacity: 0.55;
}

.task-item.done .task-name {
  text-decoration: line-through;
}

.task-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  color: #fff;
}

.task-icon.c-vocab { background: var(--c-vocab); }
.task-icon.c-listening { background: var(--c-listening); }
.task-icon.c-reading { background: var(--c-reading); }
.task-icon.c-writing { background: var(--c-writing); }
.task-icon.c-speaking { background: var(--c-speaking); }

.task-info {
  flex: 1;
  min-width: 0;
}

.task-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.task-desc {
  font-size: 12px;
  color: var(--text-sub);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.task-check.checked {
  background: var(--success);
  border-color: var(--success);
}

.task-check.checked::after {
  content: '';
  width: 7px;
  height: 4px;
  border: 2px solid #fff;
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg);
  margin-top: -2px;
}

/* ===== Phase Progress ===== */
.phase-progress {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

.phase-bar {
  display: flex;
  gap: 4px;
  margin: 10px 0 8px;
}

.phase-bar-item {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  transition: background 0.3s;
}

.phase-bar-item.active {
  background: var(--primary);
}

.phase-bar-item.done {
  background: var(--success);
}

.phase-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-sub);
}

/* ===== Quick Stats ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 10px;
  color: var(--text-sub);
  margin-top: 2px;
}

/* ===== Check-in Calendar ===== */
.calendar {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

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

.calendar-header .month {
  font-size: 15px;
  font-weight: 700;
}

.calendar-nav {
  display: flex;
  gap: 12px;
}

.calendar-nav span {
  cursor: pointer;
  color: var(--primary);
  font-size: 18px;
  user-select: none;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.calendar-weekday {
  text-align: center;
  font-size: 11px;
  color: var(--text-light);
  padding: 4px 0;
  font-weight: 600;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border-radius: 6px;
  position: relative;
  cursor: pointer;
}

.calendar-day.empty {
  visibility: hidden;
}

.calendar-day.today {
  border: 2px solid var(--primary);
  font-weight: 700;
}

.calendar-day.checked {
  background: var(--success);
  color: #fff;
  font-weight: 600;
}

.calendar-day.checked::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
}

.calendar-day.future {
  color: var(--text-light);
}

/* ===== Bottom Nav ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--card);
  display: flex;
  justify-content: space-around;
  padding: 6px 0 calc(6px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  z-index: 200;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 8px;
  cursor: pointer;
  color: var(--text-light);
  transition: color 0.2s;
  min-width: 52px;
}

.nav-item.active {
  color: var(--primary);
}

.nav-icon {
  font-size: 20px;
  line-height: 1;
}

.nav-label {
  font-size: 10px;
  font-weight: 500;
}

/* ===== Vocabulary Flashcard ===== */
.flashcard-container {
  perspective: 1000px;
  margin-bottom: 16px;
}

.flashcard {
  position: relative;
  width: 100%;
  min-height: 240px;
  transition: transform 0.5s;
  transform-style: preserve-3d;
  cursor: pointer;
}

.flashcard.flipped {
  transform: rotateY(180deg);
}

.flashcard-front, .flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  min-height: 240px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
}

.flashcard-front {
  background: linear-gradient(135deg, var(--c-vocab), #7C3AED);
  color: #fff;
}

.flashcard-back {
  background: var(--card);
  transform: rotateY(180deg);
  border: 2px solid var(--c-vocab);
}

.flashcard-word {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.flashcard-phonetic {
  font-size: 16px;
  opacity: 0.85;
}

.flashcard-meaning {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  text-align: center;
}

.flashcard-example {
  font-size: 13px;
  color: var(--text-sub);
  text-align: center;
  font-style: italic;
  line-height: 1.5;
}

.flashcard-hint {
  font-size: 11px;
  opacity: 0.6;
  margin-top: 16px;
}

.flashcard-back .flashcard-hint {
  color: var(--text-light);
}

/* ===== Vocab Controls ===== */
.vocab-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.vocab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.vocab-btn.known {
  background: #ECFDF5;
  color: var(--success);
}

.vocab-btn.unknown {
  background: #FEF2F2;
  color: var(--danger);
}

.vocab-btn:active {
  transform: scale(0.97);
}

.vocab-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-sub);
}

.vocab-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 10px;
  overflow: hidden;
}

.vocab-progress-fill {
  height: 100%;
  background: var(--c-vocab);
  border-radius: 2px;
  transition: width 0.3s;
}

/* ===== Module Tabs ===== */
.module-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.module-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--card);
  color: var(--text-sub);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.module-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===== Word List ===== */
.word-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.word-list-item:last-child {
  border-bottom: none;
}

.word-list-en {
  font-size: 15px;
  font-weight: 600;
}

.word-list-phonetic {
  font-size: 12px;
  color: var(--text-light);
}

.word-list-cn {
  font-size: 13px;
  color: var(--text-sub);
}

.word-bookmark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  background: var(--bg);
  transition: all 0.2s;
}

.word-bookmark.active {
  background: #FEF3C7;
}

/* ===== Synonym Card ===== */
.synonym-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
}

.synonym-base {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.synonym-cn {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.synonym-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.synonym-tag {
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

/* ===== Scene Vocab ===== */
.scene-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

.scene-header {
  padding: 12px 14px;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.scene-words {
  padding: 8px 14px 12px;
}

.scene-word {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.scene-word:last-child {
  border-bottom: none;
}

.scene-word-en {
  font-weight: 600;
}

.scene-word-cn {
  color: var(--text-sub);
}

/* ===== Writing/Speaking Content ===== */
.topic-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

.topic-type {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.topic-question {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 8px;
}

.topic-tips {
  font-size: 12px;
  color: var(--text-sub);
  background: var(--bg);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--warning);
}

/* ===== Model Essay ===== */
.essay-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.essay-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.essay-meta {
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.essay-score {
  display: inline-block;
  background: #FEF3C7;
  color: #92400E;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.essay-body {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.essay-highlights {
  font-size: 12px;
}

.essay-highlights li {
  margin-bottom: 4px;
  color: var(--text-sub);
}

/* ===== Pattern Card ===== */
.pattern-card {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--c-writing);
}

.pattern-en {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.pattern-cn {
  font-size: 12px;
  color: var(--text-sub);
}

.pattern-usage {
  font-size: 11px;
  color: var(--c-writing);
  margin-top: 4px;
}

/* ===== Long Sentence Card ===== */
.sentence-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

.sentence-en {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 8px;
  font-weight: 500;
}

.sentence-cn {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 10px;
  line-height: 1.6;
}

.sentence-analysis {
  font-size: 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.sentence-analysis li {
  margin-bottom: 4px;
  color: var(--text-sub);
}

/* ===== Error Notes ===== */
.error-note {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--danger);
}

.error-note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.error-note-module {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.error-note-content {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

.error-note-date {
  font-size: 11px;
  color: var(--text-light);
}

.error-delete {
  color: var(--danger);
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
}

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

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:active {
  background: var(--primary-dark);
}

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

.btn-block {
  width: 100%;
}

.btn:active {
  transform: scale(0.98);
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light);
}

.empty-state-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.empty-state-text {
  font-size: 14px;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  max-width: 360px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 14px;
}

.modal-body {
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-actions .btn {
  flex: 1;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 13px;
  z-index: 400;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
}

/* ===== Input ===== */
.input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: border 0.2s;
  font-family: inherit;
}

.input:focus {
  border-color: var(--primary);
}

textarea.input {
  resize: vertical;
  min-height: 80px;
}

select.input {
  appearance: none;
  background: var(--card);
  cursor: pointer;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

.field-group {
  margin-bottom: 14px;
}

/* ===== Chart (CSS-based) ===== */
.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 120px;
  gap: 6px;
  padding: 10px 0;
}

.chart-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar {
  width: 100%;
  max-width: 32px;
  border-radius: 4px 4px 0 0;
  transition: height 0.5s;
  min-height: 2px;
}

.chart-bar-label {
  font-size: 10px;
  color: var(--text-sub);
}

/* ===== Phase Detail ===== */
.phase-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.phase-card-header {
  padding: 14px;
  color: #fff;
}

.phase-card-name {
  font-size: 16px;
  font-weight: 700;
}

.phase-card-month {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 2px;
}

.phase-card-focus {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 6px;
}

.phase-card-body {
  padding: 14px;
}

.phase-task-list {
  font-size: 13px;
}

.phase-task-list-item {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.phase-task-list-item:last-child {
  border-bottom: none;
}

.phase-task-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ===== Speaking Part Tabs ===== */
.speaking-part {
  display: none;
}

.speaking-part.active {
  display: block;
}

.speaking-topic-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

.speaking-topic-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--c-speaking);
}

.speaking-question {
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.speaking-question:last-child {
  border-bottom: none;
}

.speaking-q-num {
  color: var(--text-light);
  font-weight: 600;
  flex-shrink: 0;
}

.speaking-cue {
  font-size: 13px;
  color: var(--text-sub);
  background: var(--bg);
  padding: 10px;
  border-radius: var(--radius-sm);
  margin-top: 6px;
  line-height: 1.6;
}

/* ===== Record Button ===== */
.record-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px;
  background: var(--c-speaking);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.2s;
}

.record-btn:active {
  transform: scale(0.98);
}

.record-btn.recording {
  background: var(--danger);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ===== Settings ===== */
.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.setting-row:last-child {
  border-bottom: none;
}

.setting-label {
  font-size: 14px;
  font-weight: 500;
}

.setting-value {
  font-size: 13px;
  color: var(--text-sub);
}

/* ===== Material Tags ===== */
.material-section {
  margin-bottom: 14px;
}

.material-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  margin-bottom: 8px;
}

.material-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.material-tag {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text);
  box-shadow: var(--shadow);
}

/* ===== Week Tasks ===== */
.week-task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}

.week-task-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--primary);
}

.week-task-name {
  font-size: 13px;
  font-weight: 600;
}

.week-task-desc {
  font-size: 12px;
  color: var(--text-sub);
}

/* ===== Misc ===== */
.text-center { text-align: center; }
.text-sub { color: var(--text-sub); }
.mt-10 { margin-top: 10px; }
.mt-16 { margin-top: 16px; }
.mb-10 { margin-bottom: 10px; }
.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.3s ease; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

::-webkit-scrollbar-track {
  background: transparent;
}
