/* ============================================
   绵绵成长录 - 深大考研工作台
   暖黄白色 · 西高地主题
   ============================================ */

:root {
  --bg-primary: #FFFBF0;
  --bg-secondary: #FFF6E0;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FFFAEC;
  --color-primary: #F0B840;
  --color-primary-light: #FFD966;
  --color-primary-dark: #D4A017;
  --color-accent: #E8913C;
  --color-text: #5C4A2E;
  --color-text-light: #8B7A5E;
  --color-text-muted: #B0A088;
  --color-border: #F0E4C8;
  --color-border-light: #F7EEC9;
  --color-success: #7CB342;
  --color-danger: #EF5350;
  --color-warning: #FF9800;
  --color-info: #42A5F5;
  --shadow-sm: 0 2px 8px rgba(212, 160, 23, 0.08);
  --shadow-md: 0 4px 16px rgba(212, 160, 23, 0.12);
  --shadow-lg: 0 8px 32px rgba(212, 160, 23, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --sidebar-width: 280px;
  --header-height: 56px;
  --bottom-height: 64px;
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg-primary);
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.6;
  user-select: none;
  -webkit-user-select: none;
}

/* App container */
#app {
  max-width: 480px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg-primary);
  overflow: hidden;
}

/* ===== Header ===== */
.app-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: linear-gradient(135deg, #FFFBF0 0%, #FFF6E0 100%);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
  z-index: 100;
  position: relative;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text);
  transition: background 0.2s;
  font-size: 18px;
}

.icon-btn:active {
  background: var(--color-border-light);
}

/* ===== Sidebar ===== */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(92, 74, 46, 0.4);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.sidebar-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100%;
  background: linear-gradient(180deg, #FFFBF0 0%, #FFF6E0 100%);
  z-index: 201;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  max-width: 85vw;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-header {
  padding: 24px 20px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--color-border);
}

/* Sidebar Westie uses .sidebar-header .westie-mascot defined in Westie section */

.sidebar-header .sidebar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
}

.sidebar-header .sidebar-subtitle {
  font-size: 11px;
  color: var(--color-text-muted);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.sidebar-nav::-webkit-scrollbar { width: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--color-text);
  position: relative;
}

.nav-item:active {
  background: var(--bg-card-hover);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(240, 184, 64, 0.15) 0%, transparent 100%);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: var(--color-primary);
  border-radius: 0 4px 4px 0;
}

.nav-item .nav-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

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

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

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--color-border);
}

.sidebar-footer .setting-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-text-light);
  font-size: 14px;
}

.sidebar-footer .setting-btn:active {
  background: var(--bg-card-hover);
}

/* ===== Main Content ===== */
.main-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--bottom-height) + 20px);
}

.main-content::-webkit-scrollbar { width: 0; }

/* ===== View System ===== */
.view {
  display: none;
  padding: 16px;
  animation: fadeIn 0.3s ease;
}

.view.active {
  display: block;
}

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

/* ===== Home View ===== */
.home-hero {
  background: linear-gradient(135deg, #FFF8E7 0%, #FFEFC4 100%);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

/* ===== Interactive Westie Mascot ===== */
.westie-mascot {
  position: relative;
  display: inline-block;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.westie-mascot svg {
  display: block;
}

/* Breathing animation */
.westie-mascot .w-body-group {
  transform-origin: center bottom;
  animation: westie-breathe 3.5s ease-in-out infinite;
}
@keyframes westie-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}

/* Idle bob */
.westie-mascot .w-whole {
  animation: westie-idle-bob 4s ease-in-out infinite;
}
@keyframes westie-idle-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Eye blink */
.westie-mascot .w-eyes {
  transform-origin: center;
  animation: westie-blink 4.5s ease-in-out infinite;
}
@keyframes westie-blink {
  0%, 88%, 100% { transform: scaleY(1); }
  91%, 95% { transform: scaleY(0.08); }
}

/* Tail wag */
.westie-mascot .w-tail {
  transform-origin: 75px 55px;
  animation: westie-tail-wag 1.2s ease-in-out infinite;
}
@keyframes westie-tail-wag {
  0%, 100% { transform: rotate(-15deg); }
  50% { transform: rotate(20deg); }
}

/* Ear twitch */
.westie-mascot .w-ear-left {
  transform-origin: 28px 30px;
  animation: westie-ear-twitch 6s ease-in-out infinite;
}
.westie-mascot .w-ear-right {
  transform-origin: 72px 30px;
  animation: westie-ear-twitch 6s ease-in-out infinite 3s;
}
@keyframes westie-ear-twitch {
  0%, 85%, 100% { transform: rotate(0); }
  88% { transform: rotate(-8deg); }
  91% { transform: rotate(5deg); }
  94% { transform: rotate(-3deg); }
}

/* Happy bounce on tap */
.westie-mascot.tapped .w-whole {
  animation: westie-happy-bounce 0.6s ease;
}
@keyframes westie-happy-bounce {
  0% { transform: translateY(0) scale(1); }
  20% { transform: translateY(-12px) scale(1.08); }
  40% { transform: translateY(0) scale(0.97); }
  60% { transform: translateY(-6px) scale(1.03); }
  100% { transform: translateY(0) scale(1); }
}

.westie-mascot.tapped .w-tail {
  animation: westie-tail-fast 0.3s ease-in-out infinite;
}
@keyframes westie-tail-fast {
  0%, 100% { transform: rotate(-25deg); }
  50% { transform: rotate(30deg); }
}

.westie-mascot.tapped .w-tongue {
  animation: westie-tongue-lick 0.6s ease;
}
@keyframes westie-tongue-lick {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px) scaleY(1.3); }
}

/* Listening state (Feynman) */
.westie-mascot.listening .w-whole {
  animation: westie-listen 0.8s ease-in-out infinite;
}
@keyframes westie-listen {
  0%, 100% { transform: scale(1) rotate(0); }
  50% { transform: scale(1.04) rotate(1deg); }
}
.westie-mascot.listening .w-ear-left,
.westie-mascot.listening .w-ear-right {
  animation: westie-ear-perk 0.5s ease-in-out infinite alternate;
}
@keyframes westie-ear-perk {
  0% { transform: rotate(0); }
  100% { transform: rotate(-5deg); }
}

/* Speech bubble */
.westie-speech {
  position: absolute;
  background: white;
  border-radius: 18px;
  padding: 10px 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  max-width: 240px;
  text-align: center;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  width: max-content;
  max-width: 200px;
}
.westie-speech.show {
  opacity: 1;
}
.westie-speech::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid white;
}

/* Floating hearts */
.westie-heart {
  position: absolute;
  font-size: 18px;
  pointer-events: none;
  animation: westie-heart-float 1.5s ease-out forwards;
  z-index: 201;
}
@keyframes westie-heart-float {
  0% { opacity: 1; transform: translateY(0) scale(0.5); }
  100% { opacity: 0; transform: translateY(-60px) scale(1.2); }
}

/* Home hero Westie */
.home-hero .westie-mascot {
  width: 110px;
  height: 110px;
  margin: 0 auto 8px;
  display: block;
}

/* Sidebar mini Westie */
.sidebar-header .westie-mascot {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

/* Feynman Westie */
.feynman-westie {
  width: 130px;
  height: 130px;
  margin: 0 auto 12px;
}

/* Hint text under mascot */
.westie-hint {
  font-size: 11px;
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: 8px;
  animation: westie-hint-pulse 2s ease-in-out infinite;
}
@keyframes westie-hint-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.home-hero .hero-greeting {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.home-hero .hero-date {
  font-size: 13px;
  color: var(--color-text-light);
}

.home-hero .hero-progress {
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-md);
  padding: 12px;
}

/* ===== Motivation Card (Home) ===== */
.motivation-card {
  background: linear-gradient(135deg, #FFF6E0 0%, #FFE9CC 100%);
  border: 1px solid rgba(255, 198, 132, 0.3);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  animation: motivationFade 0.6s ease;
}

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

.motivation-icon {
  font-size: 28px;
  flex-shrink: 0;
  animation: motivationPulse 3s ease-in-out infinite;
}

@keyframes motivationPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.motivation-text {
  flex: 1;
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.6;
  font-weight: 500;
}

.motivation-author {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 4px;
  display: block;
}

.home-hero .progress-text {
  font-size: 13px;
  color: var(--color-text-light);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
}

.progress-bar {
  height: 8px;
  background: rgba(240, 184, 64, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
  border-radius: 4px;
  transition: width 0.5s ease;
}

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

.module-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.module-card:active {
  transform: scale(0.96);
}

.module-card .module-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.module-card .module-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.module-card .module-desc {
  font-size: 11px;
  color: var(--color-text-muted);
}

.module-card .module-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--color-danger);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* Module colors */
.mc-1 .module-icon { background: linear-gradient(135deg, #FFF3D6, #FFE0A8); }
.mc-2 .module-icon { background: linear-gradient(135deg, #E8F5E9, #C8E6C9); }
.mc-3 .module-icon { background: linear-gradient(135deg, #E3F2FD, #BBDEFB); }
.mc-4 .module-icon { background: linear-gradient(135deg, #FCE4EC, #F8BBD0); }
.mc-5 .module-icon { background: linear-gradient(135deg, #F3E5F5, #E1BEE7); }
.mc-6 .module-icon { background: linear-gradient(135deg, #FFF8E1, #FFECB3); }
.mc-7 .module-icon { background: linear-gradient(135deg, #E0F7FA, #B2EBF2); }

/* ===== Study Sub-Tabs (only on study view) ===== */
.study-subtabs {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-height);
  background: rgba(255, 251, 240, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
}

.subtab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  flex: 1;
}

.subtab-item.active {
  color: var(--color-primary);
  background: rgba(255, 198, 132, 0.12);
}

.subtab-icon {
  font-size: 22px;
  line-height: 1;
}

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  margin-bottom: 12px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title .title-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* ===== Date Selector ===== */
.date-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
}

.date-selector .date-arrow {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text);
  font-size: 14px;
}

.date-selector .date-info {
  text-align: center;
}

.date-selector .date-main {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text);
}

.date-selector .date-sub {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* ===== Task Items ===== */
.task-item {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 8px;
  border: 1px solid var(--color-border-light);
  transition: all 0.2s;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.task-item.done {
  background: #F8FBF4;
  border-color: #D7EBC4;
}

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

.task-checkbox.checked {
  background: var(--color-success);
  border-color: var(--color-success);
  color: white;
  font-size: 12px;
}

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

.task-subject-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  margin-bottom: 4px;
}

.tag-333 { background: #E8F5E9; color: #2E7D32; }
.tag-823 { background: #E3F2FD; color: #1565C0; }
.tag-politics { background: #FCE4EC; color: #C62828; }
.tag-english { background: #F3E5F5; color: #6A1B9A; }

.task-desc {
  font-size: 13px;
  color: var(--color-text);
  word-break: break-word;
}

.task-item.done .task-desc {
  text-decoration: line-through;
  color: var(--color-text-muted);
}

.task-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}

.timer-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--bg-secondary);
  border: none;
  font-size: 12px;
  color: var(--color-text-light);
  cursor: pointer;
}

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

.timer-display {
  font-size: 12px;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

/* ===== Schedule (time slots) ===== */
.schedule-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--bg-secondary);
  border: 1px dashed var(--color-border);
  font-size: 12px;
  color: var(--color-text-light);
  cursor: pointer;
  transition: all 0.18s;
}

.schedule-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--color-primary-light);
}

.schedule-btn.has-slots {
  background: #FFF1D6;
  border-color: var(--color-primary-light);
  color: var(--color-text);
  border-style: solid;
  font-weight: 600;
}

.schedule-btn.open {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.schedule-panel {
  margin-top: 12px;
  padding: 12px;
  background: linear-gradient(135deg, #FFF8E1 0%, #FFFAEC 100%);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  animation: fadeIn 0.2s;
}

.schedule-panel-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-light);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.schedule-hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
  text-align: center;
  padding: 4px 0;
}

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.schedule-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--color-border-light);
}

.schedule-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 13px;
  background: var(--bg-primary);
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.schedule-input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: white;
}

.schedule-dash {
  color: var(--color-text-muted);
  font-size: 13px;
  flex-shrink: 0;
}

.schedule-remove {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--bg-secondary);
  color: var(--color-text-light);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.schedule-remove:hover {
  background: var(--color-danger);
  color: white;
}

.add-slot-btn {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px dashed var(--color-primary-light);
  background: transparent;
  color: var(--color-primary-dark);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.add-slot-btn:hover {
  background: var(--bg-secondary);
  border-style: solid;
}

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

/* ===== Backup Reminder Bar ===== */
.backup-reminder {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #FFF3CD 0%, #FFE9B0 100%);
  border: 1px solid var(--color-primary-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.3s;
}

.backup-reminder-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.backup-reminder-text {
  flex: 1;
  min-width: 0;
}

.backup-reminder-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
}

.backup-reminder-sub {
  font-size: 11px;
  color: var(--color-text-light);
  margin-top: 1px;
}

.backup-reminder-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  background: var(--color-primary);
  color: white;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.backup-reminder-btn:active {
  transform: scale(0.95);
  background: var(--color-primary-dark);
}

.backup-reminder-close {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(92, 74, 46, 0.1);
  color: var(--color-text-light);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.backup-reminder-close:hover {
  background: rgba(92, 74, 46, 0.2);
}

/* ===== Stage Plan ===== */
.stage-accordion {
  margin-bottom: 12px;
}

.stage-header {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
}

.stage-header .stage-name {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stage-header .stage-arrow {
  transition: transform 0.3s;
  color: var(--color-text-muted);
}

.stage-header.open .stage-arrow {
  transform: rotate(180deg);
}

.stage-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.stage-body.open {
  max-height: 2000px;
}

.stage-content {
  padding: 12px 0;
}

.stage-plan-item {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
}

.stage-plan-item .plan-subject {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}

.stage-plan-item .plan-detail {
  color: var(--color-text-light);
  font-size: 12px;
  white-space: pre-line;
}

/* ===== Feynman Mode ===== */
.feynman-container {
  background: linear-gradient(135deg, #FFF8E7, #FFEFC4);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  margin-bottom: 12px;
}

/* Feynman Westie uses .feynman-westie + .westie-mascot classes above */

.feynman-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.feynman-desc {
  font-size: 12px;
  color: var(--color-text-light);
  margin-bottom: 16px;
}

.feynman-controls {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.voice-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 24px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.voice-btn.start {
  background: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

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

.voice-btn:active {
  transform: scale(0.95);
}

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

.feynman-transcript {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 12px;
  text-align: left;
  font-size: 13px;
  color: var(--color-text);
  min-height: 60px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  white-space: pre-wrap;
  word-break: break-word;
}

.feynman-transcript:empty::before {
  content: '点击"开始背诵"，小怪会认真听哦~';
  color: var(--color-text-muted);
}

/* ===== Q&A Section ===== */
.qa-input-area {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.qa-input {
  flex: 1;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  background: var(--bg-card);
  color: var(--color-text);
  resize: vertical;
  min-height: 44px;
  max-height: 120px;
  font-family: inherit;
}

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

.qa-send-btn {
  padding: 0 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.qa-send-btn:active {
  transform: scale(0.95);
}

.qa-send-btn:disabled {
  opacity: 0.5;
}

.qa-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qa-item {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 12px;
  border: 1px solid var(--color-border-light);
}

.qa-item .qa-question {
  font-size: 13px;
  color: var(--color-text);
  font-weight: 500;
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.qa-item .qa-answer {
  font-size: 13px;
  color: var(--color-text-light);
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 6px;
  white-space: pre-wrap;
  word-break: break-word;
}

.qa-item .qa-meta {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.qa-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-muted);
  font-size: 13px;
  padding: 8px 0;
}

.typing-dots span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  animation: typingDot 1.4s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* ===== Knowledge Gaps ===== */
.gap-item {
  background: #FFF8E7;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  border-left: 3px solid var(--color-warning);
  font-size: 13px;
}

.gap-item .gap-subject {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.gap-item .gap-content {
  color: var(--color-text);
}

/* ===== Diary ===== */
.mood-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding: 4px 0;
}

.mood-selector::-webkit-scrollbar { display: none; }

.mood-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--bg-card);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.mood-btn.selected {
  border-color: var(--color-primary);
  background: var(--bg-secondary);
  transform: scale(1.1);
}

.diary-editor {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 14px;
  background: var(--bg-card);
  color: var(--color-text);
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
  line-height: 1.8;
}

.diary-editor:focus {
  outline: none;
  border-color: var(--color-primary);
}

.diary-entry {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid var(--color-border-light);
}

.diary-entry .entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.diary-entry .entry-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.diary-entry .entry-mood {
  font-size: 20px;
}

.diary-entry .entry-content {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ===== Finance ===== */
.finance-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.finance-stat {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
}

.finance-stat .stat-label {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.finance-stat .stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
}

.finance-stat .stat-value.income { color: var(--color-success); }
.finance-stat .stat-value.expense { color: var(--color-danger); }

.savings-goal {
  background: linear-gradient(135deg, #FFF8E7, #FFEFC4);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  text-align: center;
}

.savings-goal .goal-label {
  font-size: 13px;
  color: var(--color-text-light);
  margin-bottom: 6px;
}

.savings-goal .goal-amount {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 8px;
}

.savings-goal .goal-progress {
  height: 10px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 5px;
  overflow: hidden;
}

.savings-goal .goal-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 5px;
  transition: width 0.5s;
}

.finance-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.finance-input-row select,
.finance-input-row input {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  background: var(--bg-card);
  color: var(--color-text);
}

.finance-input-row input:focus,
.finance-input-row select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.finance-input-row .amount-input { width: 100px; }
.finance-input-row .desc-input { flex: 1; min-width: 120px; }

.finance-input-row .add-btn {
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.finance-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  border: 1px solid var(--color-border-light);
}

.finance-item .fi-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.finance-item .fi-icon.expense { background: #FFEBEE; }
.finance-item .fi-icon.income { background: #E8F5E9; }

.finance-item .fi-info {
  flex: 1;
  min-width: 0;
}

.finance-item .fi-desc {
  font-size: 13px;
  color: var(--color-text);
  font-weight: 500;
}

.finance-item .fi-date {
  font-size: 11px;
  color: var(--color-text-muted);
}

.finance-item .fi-amount {
  font-size: 15px;
  font-weight: 700;
}

.finance-item .fi-amount.expense { color: var(--color-danger); }
.finance-item .fi-amount.income { color: var(--color-success); }

/* ===== Reflection ===== */
.reflection-box {
  background: linear-gradient(135deg, #F3E5F5, #FCE4EC);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 12px;
}

.reflection-box .reflection-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.reflection-box textarea {
  width: 100%;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 13px;
  background: rgba(255,255,255,0.7);
  color: var(--color-text);
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
  line-height: 1.7;
}

.reflection-box textarea:focus {
  outline: none;
  background: white;
}

/* ===== Summary Report ===== */
.summary-card {
  background: linear-gradient(135deg, #FFF8E7, #FFEFC4);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 12px;
}

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

.summary-card .summary-score {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
}

.summary-card .summary-title {
  font-size: 16px;
  font-weight: 700;
}

.summary-card .summary-period {
  font-size: 12px;
  color: var(--color-text-light);
}

.summary-card .summary-body {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.8;
  white-space: pre-wrap;
}

/* ===== Fireworks ===== */
.fireworks-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  display: none;
}

.fireworks-overlay.show {
  display: block;
}

.firework-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: fireworkFly 1.2s ease-out forwards;
}

@keyframes fireworkFly {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0);
    opacity: 0;
  }
}

.celebration-text {
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  text-align: center;
  pointer-events: none;
  animation: celebratePop 2s ease-out forwards;
}

.celebration-text .cele-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary-dark);
  text-shadow: 0 2px 8px rgba(255,255,255,0.8);
}

.celebration-text .cele-sub {
  font-size: 16px;
  color: var(--color-text);
  margin-top: 8px;
}

@keyframes celebratePop {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  20% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  80% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

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

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

.btn-primary:active { transform: scale(0.95); }

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--color-text);
}

.btn-text {
  background: transparent;
  color: var(--color-primary);
  padding: 6px 12px;
}

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

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

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

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(92, 74, 46, 0.5);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 400px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ===== Settings ===== */
.setting-group {
  margin-bottom: 20px;
}

.setting-group .setting-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
}

.setting-group .setting-hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
  line-height: 1.6;
}

.setting-input {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  background: var(--bg-card);
  color: var(--color-text);
}

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

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(92, 74, 46, 0.9);
  color: white;
  padding: 10px 24px;
  border-radius: 24px;
  font-size: 13px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* ===== Study Timer Modal ===== */
.timer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 251, 240, 0.95);
  backdrop-filter: blur(8px);
  z-index: 400;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.timer-overlay.show {
  display: flex;
}

.timer-circle {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 8px solid var(--color-border);
  border-top-color: var(--color-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
}

.timer-circle .timer-time {
  font-size: 36px;
  font-weight: 700;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.timer-circle .timer-subject {
  font-size: 14px;
  color: var(--color-text-light);
  margin-top: 4px;
}

.timer-actions {
  display: flex;
  gap: 12px;
}

/* ===== Utility ===== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.section-title {
  font-size: 15px;
  font-weight: 700;
  margin: 16px 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-banner {
  background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 12px;
  color: #1565C0;
  margin-bottom: 12px;
  line-height: 1.6;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.warning-banner {
  background: linear-gradient(135deg, #FFF8E1, #FFECB3);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 12px;
  color: #F57C00;
  margin-bottom: 12px;
  line-height: 1.6;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

/* Tab bar for subject modules */
.tab-bar {
  display: flex;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 12px;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  padding: 8px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 12px;
  color: var(--color-text-light);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

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

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s;
}

/* Weekly summary list */
.weekly-item {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--color-border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.weekly-item .wi-left {
  flex: 1;
}

.weekly-item .wi-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.weekly-item .wi-sub {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.weekly-item .wi-score {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
}

/* Responsive */
@media (min-width: 481px) {
  #app {
    box-shadow: var(--shadow-lg);
  }
}

/* ===== Install Prompt ===== */
.install-prompt {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 400px;
  z-index: 9999;
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from { transform: translateX(-50%) translateY(120%); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.install-content {
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid var(--color-accent);
}

.install-icon {
  font-size: 36px;
  flex-shrink: 0;
}

.install-text {
  flex: 1;
  min-width: 0;
}

.install-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
}

.install-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.install-content .btn {
  padding: 8px 20px;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
}

.install-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

/* ===== Config Guide ===== */
.config-guide {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 12px;
}

.config-step {
  margin-bottom: 12px;
}

.config-step:last-child {
  margin-bottom: 0;
}

.config-step-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.config-step-body p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--color-text);
  margin: 0;
}

.config-step-body a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* ===== Practice Questions ===== */
.practice-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.practice-question {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 12px;
}

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

.practice-question-type.choice {
  background: #E3F2FD;
  color: #1565C0;
}

.practice-question-type.short {
  background: #FFF3E0;
  color: #E65100;
}

.practice-question-type.essay {
  background: #F3E5F5;
  color: #7B1FA2;
}

.practice-answer-area {
  margin-top: 10px;
}

.practice-answer-input {
  width: 100%;
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  background: var(--bg-primary);
  color: var(--color-text);
}

.practice-answer-input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.practice-feedback {
  background: #F1F8E9;
  border-radius: 10px;
  padding: 12px;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.7;
  border-left: 3px solid #66BB6A;
}

.practice-feedback.wrong {
  background: #FFF3E0;
  border-left-color: #FF9800;
}

.practice-score {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.practice-score.high {
  background: #C8E6C9;
  color: #2E7D32;
}

.practice-score.mid {
  background: #FFF9C4;
  color: #F57F17;
}

.practice-score.low {
  background: #FFCCBC;
  color: #BF360C;
}

.practice-source {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-light);
}

.feynman-mode-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.mode-btn {
  flex: 1;
  padding: 8px;
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-card);
  font-size: 13px;
  color: var(--color-text);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.mode-btn.active {
  border-color: var(--color-accent);
  background: var(--bg-secondary);
  color: var(--color-primary);
  font-weight: 600;
}

.feynman-text-input {
  width: 100%;
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 120px;
  background: var(--bg-primary);
  color: var(--color-text);
  margin-bottom: 10px;
}

.feynman-text-input:focus {
  outline: none;
  border-color: var(--color-accent);
}
