/**
 * style.css - 全局样式
 * 移动端优先，iOS 风格设计，支持夜间模式
 */

/* ========== Reset ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  overflow: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
  background: none;
  color: inherit;
}

/* ========== CSS Variables ========== */
:root {
  --bg-page: #F2F2F7;
  --bg-card: #FFFFFF;
  --bg-secondary: #F2F2F7;
  --bg-tertiary: #E5E5EA;
  --text-primary: #000000;
  --text-secondary: #8E8E93;
  --text-tertiary: #C7C7CC;
  --color-primary: #5B6CFF;
  --color-primary-light: #EDEDFF;
  --color-known: #34C759;
  --color-known-light: #E8F8EC;
  --color-unknown: #FF9500;
  --color-unknown-light: #FFF4E6;
  --color-danger: #FF3B30;
  --color-danger-light: #FFEBEA;
  --color-star: #FFCC00;
  --border-color: #E5E5EA;
  --nav-bg: rgba(255, 255, 255, 0.95);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-header: 0 1px 3px rgba(0, 0, 0, 0.05);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

body.dark {
  --bg-page: #000000;
  --bg-card: #1C1C1E;
  --bg-secondary: #2C2C2E;
  --bg-tertiary: #3A3A3C;
  --text-primary: #FFFFFF;
  --text-secondary: #8E8E93;
  --text-tertiary: #48484A;
  --color-primary-light: #2C2C5E;
  --color-known-light: #1A3324;
  --color-unknown-light: #3A2E1A;
  --color-danger-light: #3A1A1A;
  --border-color: #38383A;
  --nav-bg: rgba(28, 28, 30, 0.95);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-header: 0 1px 3px rgba(0, 0, 0, 0.3);
}

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

/* ========== Header ========== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 8px;
  background: var(--bg-page);
  flex-shrink: 0;
}

.header-left, .header-center, .header-right {
  flex: 1;
}

.header-center {
  text-align: center;
}

.header-right {
  text-align: right;
}

.header-bank {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.header-progress {
  font-size: 14px;
  color: var(--text-secondary);
}

.header-daily {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ========== Progress Bar ========== */
.progress-bar-container {
  height: 3px;
  background: var(--bg-tertiary);
  margin: 0 20px;
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

.progress-bar-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 2px;
  transition: width 0.4s ease;
  width: 0%;
}

/* ========== Main Content ========== */
.app-main {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.screen {
  display: none;
  min-height: 100%;
  padding: 20px;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

/* ========== Card Area ========== */
.card-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
}

/* ========== Flashcard ========== */
.flashcard {
  width: 100%;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 36px 24px;
  box-shadow: var(--shadow-card);
  text-align: center;
  position: relative;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.flashcard.revealed {
  animation: cardReveal 0.4s ease;
}

@keyframes cardReveal {
  0% { opacity: 0.5; transform: scale(0.97); }
  100% { opacity: 1; transform: scale(1); }
}

.card-top {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.icon-btn:active {
  background: var(--bg-tertiary);
}

.icon-speak {
  width: 18px;
  height: 18px;
  display: inline-block;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6CFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5'/%3E%3Cpath d='M15.54 8.46a5 5 0 0 1 0 7.07'/%3E%3Cpath d='M19.07 4.93a10 10 0 0 1 0 14.14'/%3E%3C/svg%3E") no-repeat center / contain;
}

body.dark .icon-speak {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A0A8FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5'/%3E%3Cpath d='M15.54 8.46a5 5 0 0 1 0 7.07'/%3E%3Cpath d='M19.07 4.93a10 10 0 0 1 0 14.14'/%3E%3C/svg%3E") no-repeat center / contain;
}

.icon-star {
  width: 18px;
  height: 18px;
  display: inline-block;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238E8E93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E") no-repeat center / contain;
}

.icon-star.active {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFCC00' stroke='%23FFCC00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E") no-repeat center / contain;
}

.card-word {
  font-size: clamp(22px, 6vw, 28px);
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-word;
  line-height: 1.4;
}

.card-phonetic {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.card-hint {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-top: 20px;
}

.card-divider {
  width: 40px;
  height: 2px;
  background: var(--bg-tertiary);
  margin: 16px 0;
  border-radius: 1px;
}

.card-pos {
  font-size: 14px;
  color: var(--color-primary);
  font-weight: 500;
}

.card-meaning {
  font-size: 22px;
  font-weight: 500;
  color: var(--text-primary);
  margin-top: 4px;
}

.card-example {
  margin-top: 20px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  width: 100%;
}

.example-en {
  font-size: 14px;
  color: var(--text-primary);
  font-style: italic;
}

.example-cn {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ========== Complete Screen ========== */
.flashcard.complete {
  gap: 12px;
}

.complete-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-known);
  position: relative;
  margin-bottom: 8px;
}

.complete-icon::after {
  content: '';
  position: absolute;
  left: 22px;
  top: 30px;
  width: 20px;
  height: 10px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(-45deg);
}

.complete-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
}

.complete-desc {
  font-size: 14px;
  color: var(--text-secondary);
}

.complete-stats {
  display: flex;
  gap: 40px;
  margin-top: 16px;
}

.complete-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.complete-stat .stat-num {
  font-size: 28px;
  font-weight: 600;
}

.complete-stat .stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ========== Buttons ========== */
.btn {
  height: 52px;
  border-radius: var(--radius-md);
  font-size: 17px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s, transform 0.1s;
}

.btn:active {
  transform: scale(0.97);
  opacity: 0.85;
}

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

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
  width: 100%;
  margin-top: 10px;
}

.btn-known {
  background: var(--color-known);
  color: #fff;
  flex: 1;
}

.btn-unknown {
  background: var(--color-unknown);
  color: #fff;
  flex: 1;
}

.btn-next {
  width: 100%;
}

.btn-pair {
  display: flex;
  gap: 12px;
  width: 100%;
}

.btn-pair .btn-secondary {
  flex: 1;
  margin-top: 0;
}

.btn-pair .btn-next {
  flex: 1;
}

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

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

.btn-small {
  height: 36px;
  font-size: 14px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
  margin-bottom: 8px;
}

/* ========== Bottom Nav ========== */
.app-nav {
  display: flex;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 0.5px solid var(--border-color);
  padding: 6px 0;
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  flex-shrink: 0;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 0;
  transition: opacity 0.15s;
}

.nav-item:active {
  opacity: 0.6;
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: inline-block;
}

.nav-label {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 500;
}

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

/* Nav icons */
.nav-icon-study {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238E8E93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z'/%3E%3Cpath d='M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E") no-repeat center / contain;
}

.nav-item.active .nav-icon-study {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235B6CFF' stroke='%235B6CFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z'/%3E%3Cpath d='M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E") no-repeat center / contain;
}

.nav-icon-review {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238E8E93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='23 4 23 10 17 10'/%3E%3Cpolyline points='1 20 1 14 7 14'/%3E%3Cpath d='M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15'/%3E%3C/svg%3E") no-repeat center / contain;
}

.nav-item.active .nav-icon-review {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6CFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='23 4 23 10 17 10'/%3E%3Cpolyline points='1 20 1 14 7 14'/%3E%3Cpath d='M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15'/%3E%3C/svg%3E") no-repeat center / contain;
}

.nav-icon-stats {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238E8E93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='20' x2='18' y2='10'/%3E%3Cline x1='12' y1='20' x2='12' y2='4'/%3E%3Cline x1='6' y1='20' x2='6' y2='14'/%3E%3C/svg%3E") no-repeat center / contain;
}

.nav-item.active .nav-icon-stats {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235B6CFF' stroke='%235B6CFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='20' x2='18' y2='10'/%3E%3Cline x1='12' y1='20' x2='12' y2='4'/%3E%3Cline x1='6' y1='20' x2='6' y2='14'/%3E%3C/svg%3E") no-repeat center / contain;
}

.nav-icon-book {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238E8E93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E") no-repeat center / contain;
}

.nav-item.active .nav-icon-book {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235B6CFF' stroke='%235B6CFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E") no-repeat center / contain;
}

.nav-icon-settings {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238E8E93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E") no-repeat center / contain;
}

.nav-item.active .nav-icon-settings {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235B6CFF' stroke='%235B6CFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ========== Stats Screen ========== */
.stats-header {
  text-align: center;
  margin-bottom: 24px;
}

.stats-bank-name {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
}

.stats-bank-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

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

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.stat-card-num {
  font-size: 32px;
  font-weight: 600;
  color: var(--color-primary);
}

.stat-card-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

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

.stats-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.progress-block {
  margin-bottom: 12px;
}

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

.progress-track {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.progress-fill.known {
  background: var(--color-known);
}

.progress-fill.remaining {
  background: var(--color-unknown);
}

.progress-fill.goal {
  background: var(--color-primary);
}

.goal-achieved {
  text-align: center;
  color: var(--color-known);
  font-size: 14px;
  font-weight: 500;
  margin-top: 8px;
}

.bank-progress-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

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

.bank-progress-name {
  width: 60px;
  font-size: 14px;
  font-weight: 500;
  flex-shrink: 0;
}

.bank-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
}

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

.bank-progress-text {
  font-size: 12px;
  color: var(--text-secondary);
  width: 60px;
  text-align: right;
  flex-shrink: 0;
}

.bank-progress-item.total {
  border-top: 1.5px solid var(--border-color);
  margin-top: 4px;
  padding-top: 12px;
  font-weight: 600;
}

.bank-progress-item.total .bank-progress-name {
  font-weight: 700;
}

.bank-progress-item.total .bank-progress-fill {
  background: var(--color-known);
}

.bank-progress-item.total .bank-progress-text {
  font-weight: 600;
  color: var(--text-primary);
}

/* ========== Error Book Screen ========== */
.errorbook-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.errorbook-count {
  font-size: 15px;
  color: var(--text-secondary);
}

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

.word-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  gap: 12px;
}

.word-item-main {
  flex: 1;
  min-width: 0;
}

.word-item-word {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.word-item-phonetic {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.word-item-meaning {
  font-size: 14px;
  color: var(--text-primary);
  margin-top: 4px;
}

.word-item-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.word-item-speak, .word-item-remove {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.word-item-speak:active, .word-item-remove:active {
  background: var(--bg-tertiary);
}

.word-item-speak .icon-speak {
  width: 16px;
  height: 16px;
}

.icon-remove {
  width: 16px;
  height: 16px;
  display: inline-block;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF3B30' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='15' y1='9' x2='9' y2='15'/%3E%3Cline x1='9' y1='9' x2='15' y2='15'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ========== Empty State ========== */
.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  margin-bottom: 16px;
}

.empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-desc {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ========== Settings Screen ========== */
.settings-section {
  margin-bottom: 24px;
}

.settings-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  padding-left: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bank-list {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.bank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--border-color);
  transition: background 0.15s;
}

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

.bank-item:active {
  background: var(--bg-secondary);
}

.bank-item-info {
  flex: 1;
}

.bank-item-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
}

.bank-item-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.bank-item-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  flex-shrink: 0;
  transition: all 0.2s;
}

.bank-item-check.checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
  position: relative;
}

.bank-item-check.checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 3px;
  width: 6px;
  height: 10px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.goal-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.goal-btn {
  flex: 1;
  min-width: 80px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  transition: all 0.2s;
}

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

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 16px;
  color: var(--text-primary);
}

.toggle {
  width: 51px;
  height: 31px;
  border-radius: 16px;
  background: var(--bg-tertiary);
  position: relative;
  transition: background 0.25s;
  flex-shrink: 0;
}

.toggle.on {
  background: var(--color-known);
}

.tog