/* ===== 薄弱词汇页面样式 ===== */

/* 复用闪卡页面背景 */
#page-unknown-words {
  background: linear-gradient(160deg, #fef2f2 0%, #fef1f1 30%, #fef6f0 70%, #fff7ed 100%);
  position: relative;
  overflow: hidden;
}

/* ===== 列表模式 ===== */

.uw-list-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px;
  padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
}

/* 词汇卡片 */
.uw-word-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.04);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

.uw-word-card:active {
  transform: scale(0.98);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* 卡片头部 */
.uw-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.uw-card-word {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink, #111827);
}

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

.uw-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
}

.uw-tag-type {
  background: linear-gradient(135deg, #ede9fe, #e0e7ff);
  color: #6366f1;
}

.uw-tag-pos {
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
  color: #3b82f6;
}

.uw-tag-sentiment-pos {
  background: linear-gradient(135deg, #dcfce7, #d1fae5);
  color: #16a34a;
}

.uw-tag-sentiment-neg {
  background: linear-gradient(135deg, #fee2e2, #fce7f3);
  color: #dc2626;
}

.uw-tag-sentiment-neutral {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  color: #6b7280;
}

.uw-tag-freq {
  background: linear-gradient(135deg, #fef3c7, #fef9c3);
  color: #d97706;
}

/* 释义摘要 */
.uw-card-def {
  font-size: 13px;
  color: var(--muted, #6b7280);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all 0.3s;
}

/* 展开详情 */
.uw-card-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
  opacity: 0;
}

.uw-card-detail.is-open {
  max-height: 600px;
  opacity: 1;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.uw-detail-section {
  margin-bottom: 10px;
}

.uw-detail-label {
  font-size: 11px;
  font-weight: 700;
  color: #6366f1;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.uw-detail-label::before {
  content: '';
  width: 3px;
  height: 10px;
  background: linear-gradient(180deg, #6366f1, #a78bfa);
  border-radius: 2px;
}

.uw-detail-def {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink, #111827);
  padding: 8px 12px;
  background: linear-gradient(135deg, #f8faff, #f5f3ff);
  border-radius: 10px;
  margin-bottom: 4px;
  border-left: 3px solid #c7d2fe;
}

.uw-detail-example {
  font-size: 13px;
  line-height: 1.6;
  color: #4b5563;
  padding: 8px 12px;
  background: linear-gradient(135deg, #fefce8, #fef9c3);
  border-radius: 10px;
  margin-bottom: 4px;
  border-left: 3px solid #fbbf24;
}

.uw-detail-related {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.uw-related-chip {
  padding: 4px 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #059669;
  font-size: 12px;
  font-weight: 500;
}

/* 展开箭头 */
.uw-card-expand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  color: var(--text-muted, #9ca3af);
  font-size: 12px;
  gap: 4px;
  transition: transform 0.3s;
}

.uw-card-expand.is-open {
  transform: rotate(180deg);
}

/* ===== 底部操作栏 ===== */

.uw-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 20px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-top: 0.5px solid rgba(0,0,0,0.06);
  z-index: 10;
}

.uw-clear-btn {
  width: 100%;
  padding: 14px 24px;
  border-radius: 14px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.uw-clear-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

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

/* ===== 扫清模式（复用闪卡样式 + 覆盖） ===== */

.uw-review-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 20px 12px;
  position: relative;
  -webkit-user-select: none;
  user-select: none;
}

/* 覆盖扫清模式的按钮颜色 */
.uw-btn-still-unknown .fc-action-btn-circle {
  background: #ffffff;
  border: 2px solid rgba(249, 115, 22, 0.18);
  color: #f97316;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.08), 0 8px 24px rgba(249, 115, 22, 0.06);
}

.uw-btn-still-unknown:hover .fc-action-btn-circle {
  transform: scale(1.06);
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
}

.uw-btn-still-unknown .fc-action-label {
  color: #fb923c;
}

/* ===== 完成页面 ===== */

.uw-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
  text-align: center;
  animation: liftIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.uw-done-icon {
  font-size: 64px;
  margin-bottom: 16px;
  animation: doneBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes doneBounce {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.uw-done-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink, #111827);
  margin-bottom: 8px;
}

.uw-done-subtitle {
  font-size: 14px;
  color: var(--muted, #6b7280);
  margin-bottom: 32px;
}

.uw-done-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 32px;
}

.uw-done-stat {
  text-align: center;
}

.uw-done-stat-value {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
}

.uw-done-stat-label {
  font-size: 13px;
  color: var(--muted, #6b7280);
  margin-top: 4px;
}

.uw-done-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 280px;
}

.uw-done-btn {
  width: 100%;
  padding: 14px 24px;
  border-radius: 14px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
  -webkit-tap-highlight-color: transparent;
}

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

.uw-done-btn-primary {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.25);
}

.uw-done-btn-secondary {
  background: #f3f4f6;
  color: var(--ink, #111827);
}

/* ===== 空状态 ===== */

.uw-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  text-align: center;
  padding: 40px;
}

.uw-empty-icon {
  font-size: 48px;
}

.uw-empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink, #111827);
}

.uw-empty-desc {
  font-size: 14px;
  color: var(--muted, #6b7280);
  line-height: 1.6;
}

/* ===== 减少动画 ===== */
@media (prefers-reduced-motion: reduce) {
  .uw-card-detail {
    transition-duration: 0.01ms;
  }
  .uw-done {
    animation: none;
  }
  .uw-done-icon {
    animation: none;
  }
}
