/* ====== 基础重置与变量 ====== */
:root {
  --primary: #FF6B35;
  --primary-dark: #E85D2C;
  --primary-light: #FF8F5E;
  --success: #4CAF50;
  --warning: #FF9800;
  --danger: #F44336;
  --bg: #F5F5F5;
  --card-bg: #FFFFFF;
  --text-primary: #333333;
  --text-secondary: #888888;
  --text-light: #BBBBBB;
  --border: #E0E0E0;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --nav-height: 60px;
  --header-height: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ====== 页面切换 ====== */
.screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  transform: translateX(30px);
  z-index: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  z-index: 10;
}

/* ====== 启动页 ====== */
#splash-screen {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.splash-content {
  text-align: center;
  color: white;
}

.splash-icon {
  font-size: 80px;
  margin-bottom: 20px;
  animation: splashBounce 1s ease-in-out infinite;
}

@keyframes splashBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.splash-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.splash-subtitle {
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 40px;
}

.splash-loader {
  width: 200px;
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  margin: 0 auto;
  overflow: hidden;
}

.loader-bar {
  width: 0%;
  height: 100%;
  background: white;
  border-radius: 2px;
  animation: loadProgress 1.5s ease-out forwards;
}

@keyframes loadProgress {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* ====== 顶部栏 ====== */
.app-header {
  padding: var(--safe-top) 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.app-title {
  font-size: 20px;
  font-weight: 700;
}

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

.streak-badge {
  background: rgba(255,255,255,0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

/* ====== 今日卡片 ====== */
.today-card {
  margin: 16px;
  padding: 24px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.today-stats {
  display: flex;
  align-items: center;
  gap: 0;
}

.stat-item {
  text-align: center;
  padding: 0 16px;
}

.stat-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}

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

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* 进度环 */
.progress-ring-container {
  position: relative;
  width: 90px;
  height: 90px;
}

.progress-ring {
  width: 90px;
  height: 90px;
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: #EEEEEE;
  stroke-width: 8;
}

.progress-ring-fill {
  fill: none;
  stroke: var(--primary);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke-dashoffset 0.8s ease;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

/* ====== 操作按钮 ====== */
.action-buttons {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: calc(16px + var(--nav-height));
}

.action-btn {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  width: 100%;
  text-align: left;
}

.action-btn:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-lg);
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.primary-btn .btn-desc {
  color: rgba(255,255,255,0.8);
}

.primary-btn .btn-arrow {
  color: rgba(255,255,255,0.8);
}

.btn-icon {
  font-size: 28px;
  margin-right: 16px;
}

.btn-text {
  flex: 1;
}

.btn-title {
  font-size: 16px;
  font-weight: 600;
  display: block;
}

.btn-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  display: block;
}

.btn-arrow {
  font-size: 24px;
  color: var(--text-light);
}

/* ====== 底部导航 ====== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  z-index: 50;
  border-top: 1px solid var(--border);
}

.nav-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 16px;
  cursor: pointer;
  color: var(--text-light);
  transition: color 0.2s;
}

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

.nav-icon {
  font-size: 22px;
  margin-bottom: 2px;
}

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

/* ====== 学习/复习页 ====== */
.learn-header {
  padding: var(--safe-top) 16px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #F0F0F0;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  flex-shrink: 0;
}

.learn-progress-bar {
  flex: 1;
  height: 6px;
  background: #EEEEEE;
  border-radius: 3px;
  overflow: hidden;
}

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

.learn-counter {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* 学习卡片 */
.learn-card-container,
.review-card-container {
  flex: 1;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 180px);
}

.word-card {
  width: 100%;
  max-width: 360px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.word-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.card-word {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.card-phonetic {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card-phonetic .speak-icon {
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.2s;
  display: inline-block;
}

.card-phonetic:hover .speak-icon,
.card-phonetic:active .speak-icon {
  transform: scale(1.3);
}

.card-image-area {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
  border-radius: var(--radius);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  position: relative;
  overflow: hidden;
}

.card-meaning {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
}

.card-meaning.show {
  opacity: 1;
  transform: translateY(0);
}

.card-example {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease 0.1s;
}

.card-example.show {
  opacity: 1;
  transform: translateY(0);
}

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

/* 底部操作按钮 */
.learn-actions {
  padding: 16px 20px;
  padding-bottom: calc(16px + var(--safe-bottom));
  display: flex;
  gap: 12px;
  background: var(--card-bg);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.learn-action-btn {
  flex: 1;
  padding: 14px 8px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--card-bg);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

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

.action-icon {
  font-size: 24px;
}

.dont-know-btn {
  border-color: var(--danger);
  color: var(--danger);
}

.dont-know-btn:active {
  background: #FFEBEE;
}

.know-btn {
  border-color: var(--warning);
  color: var(--warning);
}

.know-btn:active {
  background: #FFF8E1;
}

.very-sure-btn {
  border-color: var(--success);
  color: var(--success);
}

.very-sure-btn:active {
  background: #E8F5E9;
}

/* ====== 挑战测试页 ====== */
.challenge-header {
  padding: var(--safe-top) 16px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.challenge-title {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

.challenge-score {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.challenge-timer-bar {
  width: 100%;
  height: 4px;
  background: #EEEEEE;
}

.timer-fill {
  height: 100%;
  background: var(--primary);
  width: 100%;
  transition: width 0.1s linear;
}

.timer-fill.urgent {
  background: var(--danger);
}

.challenge-body {
  padding: 40px 24px;
  text-align: center;
}

.challenge-question-type {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.challenge-word {
  font-size: 40px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.challenge-phonetic {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.challenge-hint {
  font-size: 14px;
  color: var(--text-secondary);
  background: #F5F5F5;
  padding: 12px;
  border-radius: 8px;
  margin: 0 24px;
  display: none;
}

.challenge-options {
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.challenge-option {
  padding: 16px 20px;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  width: 100%;
}

.challenge-option:active {
  transform: scale(0.98);
}

.challenge-option.correct {
  border-color: var(--success);
  background: #E8F5E9;
  color: var(--success);
}

.challenge-option.wrong {
  border-color: var(--danger);
  background: #FFEBEE;
  color: var(--danger);
}

.challenge-option.disabled {
  pointer-events: none;
}

.challenge-option .option-label {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #F0F0F0;
  text-align: center;
  line-height: 24px;
  font-size: 13px;
  font-weight: 600;
  margin-right: 12px;
  color: var(--text-secondary);
}

/* ====== 挑战结果 ====== */
.result-container {
  padding: 60px 24px 24px;
  text-align: center;
}

.result-grade {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  font-size: 48px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 25px rgba(255,107,53,0.3);
  animation: gradeIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes gradeIn {
  0% { transform: scale(0) rotate(-180deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.result-score {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 8px;
}

.result-msg {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.result-details {
  text-align: left;
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 24px;
}

.result-word-item {
  padding: 12px 16px;
  background: #FFEBEE;
  border-radius: 8px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.result-word-item .word-text {
  font-weight: 600;
}

.result-word-item .word-meaning {
  font-size: 13px;
  color: var(--text-secondary);
}

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

.result-btn {
  flex: 1;
  padding: 14px;
  border-radius: var(--radius);
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

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

/* ====== 词汇手册 ====== */
.wb-header {
  padding: var(--safe-top) 16px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.wb-header h2 {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
}

.wb-count {
  font-size: 13px;
  color: var(--text-secondary);
  background: #F0F0F0;
  padding: 4px 10px;
  border-radius: 12px;
}

.wb-filter {
  position: sticky;
  top: 0;
  background: var(--bg);
  padding: 12px 16px 8px;
  z-index: 20;
}

.wb-search {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  font-size: 14px;
  background: var(--card-bg);
  outline: none;
  transition: border-color 0.2s;
}

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

.wb-filter-tabs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
}

.filter-tab {
  padding: 6px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  color: var(--text-secondary);
  transition: all 0.2s;
}

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

.wb-list {
  padding: 8px 16px calc(16px + var(--safe-bottom));
}

.wb-item {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #F0F0F0;
  cursor: pointer;
}

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

.wb-item-number {
  width: 32px;
  font-size: 12px;
  color: var(--text-light);
  flex-shrink: 0;
}

.wb-item-word {
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
  min-width: 80px;
}

.wb-item-phonetic {
  font-size: 12px;
  color: var(--text-secondary);
  flex: 1;
  margin-left: 8px;
}

.wb-item-meaning {
  font-size: 13px;
  color: var(--text-secondary);
  margin-left: 8px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wb-item-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 8px;
  flex-shrink: 0;
}

.wb-item-status.new { background: var(--text-light); }
.wb-item-status.learning { background: var(--warning); }
.wb-item-status.mastered { background: var(--success); }

/* ====== 弹窗 ====== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  width: 100%;
  max-height: 80vh;
  background: var(--card-bg);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 16px 24px 40px;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #F0F0F0;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-word {
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 4px;
}

.detail-phonetic {
  font-size: 16px;
  color: var(--text-secondary);
  text-align: center;
  cursor: pointer;
  margin-bottom: 16px;
}

.detail-meaning {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  padding: 16px;
  background: #FFF3E0;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.detail-example {
  padding: 0 8px;
}

.example-en {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  padding: 12px;
  background: #F5F5F5;
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}

.example-cn {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 8px 12px 0;
}

.detail-status {
  text-align: center;
  margin-top: 16px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

/* ====== 统计页 ====== */
.stats-header {
  padding: var(--safe-top) 16px 12px;
  background: var(--card-bg);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.stats-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.stats-content {
  padding: 16px;
  padding-bottom: calc(16px + var(--nav-height) + var(--safe-bottom));
}

.stats-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}

.stats-card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stats-grid-item {
  padding: 16px;
  background: #F9F9F9;
  border-radius: var(--radius);
  text-align: center;
}

.stats-grid-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}

.stats-grid-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.stats-bar-chart {
  margin-top: 8px;
}

.bar-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}

.bar-label {
  font-size: 12px;
  color: var(--text-secondary);
  width: 40px;
  flex-shrink: 0;
}

.bar-track {
  flex: 1;
  height: 20px;
  background: #F0F0F0;
  border-radius: 10px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 10px;
  background: var(--primary);
  transition: width 0.6s ease;
}

.bar-value {
  font-size: 12px;
  color: var(--text-secondary);
  width: 30px;
  text-align: right;
  flex-shrink: 0;
}

/* ====== 设置页 ====== */
.settings-header {
  padding: var(--safe-top) 16px 12px;
  background: var(--card-bg);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.settings-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.settings-content {
  padding: 16px;
  padding-bottom: calc(16px + var(--nav-height) + var(--safe-bottom));
}

.setting-group {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #F0F0F0;
}

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

.setting-label {
  font-size: 15px;
}

.setting-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card-bg);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-value {
  font-size: 18px;
  font-weight: 700;
  min-width: 30px;
  text-align: center;
}

/* 开关 */
.switch {
  position: relative;
  width: 48px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #CCCCCC;
  border-radius: 26px;
  transition: 0.3s;
}

.slider::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  left: 2px;
  bottom: 2px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

input:checked + .slider {
  background: var(--primary);
}

input:checked + .slider::before {
  transform: translateX(22px);
}

.setting-item.clickable {
  cursor: pointer;
}

.setting-arrow {
  font-size: 18px;
  color: var(--text-light);
}

.app-info {
  text-align: center;
  padding: 24px;
  color: var(--text-secondary);
  font-size: 13px;
}

.app-info-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-light);
}

/* ====== 动画效果 ====== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cardFlip {
  0% { transform: rotateY(0deg); }
  50% { transform: rotateY(90deg); }
  100% { transform: rotateY(0deg); }
}

@keyframes slideLeft {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.card-animate-in {
  animation: slideLeft 0.35s ease-out;
}

.card-animate-out {
  animation: slideLeft 0.3s ease-in reverse;
}

/* ====== 响应式 ====== */
@media (min-width: 768px) {
  .action-buttons {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

  .word-card {
    max-width: 420px;
  }

  .challenge-options {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

  .wb-list {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ====== 确认弹窗 ====== */
.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.confirm-box {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.confirm-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.confirm-msg {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

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

.confirm-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius);
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.confirm-btn.cancel {
  background: #F0F0F0;
  color: var(--text-secondary);
}

.confirm-btn.ok {
  background: var(--danger);
  color: white;
}

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

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