/* 多模态英语智能学习系统 - 童趣风格样式 */
/* 配色：阳光橙 #FF6B35 / 球场绿 #06D6A0 / 天际蓝 #118AB2 / 活力黄 #FFD23F */

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

:root {
  --orange: #FF6B35;
  --green: #06D6A0;
  --blue: #118AB2;
  --yellow: #FFD23F;
  --dark: #2D3142;
  --gray: #8C99A8;
  --bg: #F8F9FA;
}

html, body {
  height: 100%;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--dark);
  overflow: hidden;
}

#app {
  height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
}

/* ===== 顶部标题栏 ===== */
.header {
  background: linear-gradient(135deg, var(--orange) 0%, #FF8C42 100%);
  color: #fff;
  padding: 18px 20px 16px;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
  z-index: 10;
}

.header h1 {
  font-size: 20px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header .subtitle {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 4px;
}

/* ===== 主内容区 ===== */
.main {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

/* ===== 底部Tab导航 ===== */
.tabbar {
  display: flex;
  background: #fff;
  border-top: 1px solid #eee;
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
}

.tabbar .tab {
  flex: 1;
  text-align: center;
  padding: 6px 0;
  color: var(--gray);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.2s;
  user-select: none;
}

.tabbar .tab .icon {
  font-size: 22px;
  display: block;
  margin-bottom: 2px;
}

.tabbar .tab.active {
  color: var(--orange);
  font-weight: bold;
}

.tabbar .tab .badge {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  vertical-align: top;
  margin-left: 2px;
}

/* ===== 单词卡片 ===== */
.card-stage {
  perspective: 1200px;
  margin-bottom: 16px;
}

.word-card {
  position: relative;
  width: 100%;
  height: 420px;
  transform-style: preserve-3d;
  transition: transform 0.5s;
  cursor: pointer;
}

.word-card.flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.card-face.back {
  transform: rotateY(180deg);
}

/* v1.4: 卡片视觉区（emoji 主视觉 + 图片角落装饰） */
.card-visual {
  position: relative;
  width: 100%;
  min-height: 170px;
  background: linear-gradient(135deg, #FFF8F0 0%, #FFE6CC 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.card-emoji-hero {
  font-size: 84px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.1));
  user-select: none;
  transition: transform 0.18s;
}

.word-card:not(.flipped) .card-emoji-hero:hover {
  transform: scale(1.08);
}

.card-image-corner {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  opacity: 0.85;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.card-body {
  padding: 16px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.card-word {
  font-size: 38px;
  font-weight: bold;
  color: var(--dark);
  letter-spacing: 1px;
}

.queue-tag {
  display: inline-block;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.card-phonetic {
  font-size: 18px;
  color: var(--blue);
  font-style: italic;
  margin-top: 6px;
}

.card-pos {
  display: inline-block;
  background: var(--yellow);
  color: var(--dark);
  font-size: 13px;
  font-weight: bold;
  padding: 2px 12px;
  border-radius: 12px;
  margin-top: 10px;
}

.flip-hint {
  font-size: 12px;
  color: var(--gray);
  margin-top: 12px;
}

/* 卡片背面 */
.back-section {
  padding: 14px 18px;
  text-align: left;
  overflow-y: auto;
  flex: 1;
}

.back-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--orange);
  text-align: center;
  margin-bottom: 10px;
}

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

.back-label {
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 3px;
  font-weight: bold;
}

.back-text {
  font-size: 15px;
  line-height: 1.5;
}

.back-text.en {
  color: var(--dark);
  font-weight: 600;
}

.back-text.cn {
  color: var(--gray);
  font-size: 14px;
}

.mnemonic-box {
  background: linear-gradient(135deg, rgba(255, 210, 63, 0.25), rgba(255, 107, 53, 0.12));
  border-left: 4px solid var(--yellow);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.5;
}

.word-relations {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.relation-tag {
  background: rgba(6, 214, 160, 0.12);
  color: var(--green);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: 600;
}

.relation-tag.anto {
  background: rgba(255, 107, 53, 0.1);
  color: var(--orange);
}

/* ===== 发音按钮 ===== */
.audio-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--blue), var(--green));
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(17, 138, 178, 0.4);
  margin-top: 12px;
  transition: transform 0.15s;
  flex-shrink: 0;
}

.audio-btn:active {
  transform: scale(0.9);
}

.audio-btn.playing {
  animation: pulse 0.8s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(17, 138, 178, 0.4); }
  50% { box-shadow: 0 4px 24px rgba(17, 138, 178, 0.8); }
}

/* ===== 操作按钮 ===== */
.action-row {
  display: flex;
  gap: 12px;
  padding: 0 4px;
}

.action-btn {
  flex: 1;
  border: none;
  border-radius: 16px;
  padding: 15px 0;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
  color: #fff;
}

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

.action-btn.unknown {
  background: linear-gradient(135deg, #FF6B35, #FF8C42);
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.35);
}

.action-btn.known {
  background: linear-gradient(135deg, #06D6A0, #0ABF8E);
  box-shadow: 0 4px 14px rgba(6, 214, 160, 0.35);
}

.action-btn:disabled {
  opacity: 0.5;
}

/* ===== 进度条 ===== */
.progress-bar {
  height: 8px;
  background: #E9ECEF;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 14px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--yellow));
  border-radius: 4px;
  transition: width 0.3s;
}

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

/* ===== 统计页 ===== */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.stat-card .num {
  font-size: 36px;
  font-weight: bold;
  line-height: 1.1;
}

.stat-card .label {
  font-size: 13px;
  color: var(--gray);
  margin-top: 6px;
}

.stat-card.c-orange .num { color: var(--orange); }
.stat-card.c-green .num { color: var(--green); }
.stat-card.c-blue .num { color: var(--blue); }
.stat-card.c-yellow .num { color: #D9A800; }

.stat-banner {
  background: linear-gradient(135deg, var(--green), var(--blue));
  border-radius: 18px;
  padding: 20px;
  color: #fff;
  margin-bottom: 16px;
}

.stat-banner .title {
  font-size: 16px;
  font-weight: bold;
}

.stat-banner .desc {
  font-size: 13px;
  opacity: 0.9;
  margin-top: 6px;
  line-height: 1.5;
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray);
}

.empty-state .emoji {
  font-size: 64px;
  display: block;
  margin-bottom: 16px;
}

.empty-state .msg {
  font-size: 16px;
  line-height: 1.6;
}

/* ===== 完成庆祝 ===== */
.celebrate {
  text-align: center;
  padding: 40px 20px;
}

.celebrate .emoji {
  font-size: 72px;
  display: block;
  animation: bounce 1s infinite;
}

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

.celebrate .msg {
  font-size: 20px;
  font-weight: bold;
  color: var(--dark);
  margin-top: 16px;
}

.celebrate .sub {
  font-size: 14px;
  color: var(--gray);
  margin-top: 8px;
}

/* ===== 复习页等级标签 ===== */
.level-tag {
  display: inline-block;
  font-size: 11px;
  background: rgba(17, 138, 178, 0.1);
  color: var(--blue);
  border-radius: 8px;
  padding: 2px 8px;
  margin-top: 8px;
  font-weight: 600;
}

/* 桌面端适配 */
@media (min-width: 600px) {
  #app {
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
  }
}

/* ============================================ */
/* 思维导图样式 */
/* ============================================ */
#mindmap-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 580px;
}

.mm-toolbar {
  display: flex;
  gap: 8px;
  padding: 4px 4px 12px;
  flex-shrink: 0;
}

.mm-btn {
  background: #fff;
  border: 1px solid #E9ECEF;
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 16px;
  font-weight: bold;
  color: var(--dark);
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.mm-btn:active {
  transform: scale(0.94);
  background: #F0F2F5;
}

.mm-toggle {
  margin-left: auto;
  font-size: 13px;
  background: linear-gradient(135deg, var(--orange), #FF8C42);
  color: #fff;
  border: none;
}

.mm-stage {
  flex: 1;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  cursor: grab;
  touch-action: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
  user-select: none;
  -webkit-user-select: none;
}

#mm-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.mm-word:hover circle,
.mm-cat:hover circle {
  filter: brightness(1.08) drop-shadow(0 6px 12px rgba(0,0,0,0.25));
}

.mm-hint {
  font-size: 12px;
  color: var(--gray);
  text-align: center;
  padding: 10px 8px 4px;
  flex-shrink: 0;
}

/* 详情弹层 */
#mm-detail {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
}

.mm-detail-mask {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  animation: fadeIn 0.2s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mm-detail-card {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  max-height: 85%;
  background: #fff;
  border-radius: 24px 24px 0 0;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.2);
}

@keyframes slideUp {
  from { transform: translate(-50%, 100%); }
  to { transform: translate(-50%, 0); }
}

.mm-detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 16px;
  border: none;
  background: rgba(255,255,255,0.25);
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  z-index: 5;
}

.mm-detail-header {
  padding: 20px 24px 24px;
  text-align: center;
  border-radius: 24px 24px 0 0;
}

.mm-detail-body {
  padding: 16px 20px 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ============================================ */
/* 测试模块样式 */
/* ============================================ */
.test-stage {
  padding: 4px 4px 0;
}

.test-score-tag {
  display: inline-block;
  background: rgba(6, 214, 160, 0.12);
  color: var(--green);
  font-size: 13px;
  font-weight: bold;
  padding: 4px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.test-prompt {
  background: #fff;
  border-radius: 18px;
  padding: 22px 18px;
  margin-bottom: 14px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.test-q-type {
  display: inline-block;
  background: var(--yellow);
  color: var(--dark);
  font-size: 12px;
  font-weight: bold;
  padding: 3px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.test-question {
  font-size: 32px;
  font-weight: bold;
  color: var(--dark);
  margin-top: 4px;
}

.test-question.cn {
  color: var(--orange);
}

.test-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.test-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 2px solid #E9ECEF;
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 17px;
  color: var(--dark);
  text-align: left;
  transition: all 0.15s;
}

.test-opt:active {
  transform: scale(0.98);
}

.test-opt:disabled {
  cursor: default;
}

.opt-letter {
  width: 28px;
  height: 28px;
  border-radius: 14px;
  background: var(--bg);
  color: var(--gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
  font-size: 14px;
}

.opt-text {
  flex: 1;
  word-break: break-word;
}

.test-opt.opt-correct {
  background: rgba(6, 214, 160, 0.12);
  border-color: var(--green);
}

.test-opt.opt-correct .opt-letter {
  background: var(--green);
  color: #fff;
}

.test-opt.opt-wrong {
  background: rgba(255, 107, 53, 0.08);
  border-color: var(--orange);
}

.test-opt.opt-wrong .opt-letter {
  background: var(--orange);
  color: #fff;
}

.test-spell-area {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 14px;
}

#spell-input {
  flex: 1;
  border: 2px solid #E9ECEF;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 18px;
  font-family: inherit;
  color: var(--dark);
  outline: none;
  transition: border-color 0.15s;
}

#spell-input:focus {
  border-color: var(--orange);
}

.test-fb {
  margin-top: 14px;
  padding: 16px;
  border-radius: 14px;
  text-align: center;
  animation: fbIn 0.3s;
}

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

.test-fb.fb-ok {
  background: rgba(6, 214, 160, 0.1);
  color: #0A8C6E;
}

.test-fb.fb-no {
  background: rgba(255, 107, 53, 0.08);
  color: var(--orange);
}

.test-section {
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  margin-top: 16px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.test-section-title {
  font-size: 17px;
  font-weight: bold;
  color: var(--dark);
  margin-bottom: 12px;
}

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

.test-wrong-item {
  background: var(--bg);
  border-left: 3px solid var(--orange);
  border-radius: 8px;
  padding: 10px 12px;
}

/* ============================================ */
/* 设置页样式 */
/* ============================================ */
.settings-section {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.settings-title {
  font-size: 16px;
  font-weight: bold;
  color: var(--dark);
  margin-bottom: 12px;
}

.theme-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--bg);
  border: 2px solid transparent;
  cursor: pointer;
  margin-bottom: 8px;
  transition: all 0.15s;
}

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

.theme-card.theme-active {
  border-color: var(--orange);
  background: rgba(255, 107, 53, 0.05);
}

.theme-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.theme-meta {
  flex: 1;
}

.theme-name {
  font-size: 15px;
  font-weight: bold;
  color: var(--dark);
}

.theme-stat {
  font-size: 12px;
  color: #8C99A8;
  margin-top: 2px;
}

.theme-check {
  color: var(--orange);
  font-size: 22px;
  font-weight: bold;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #F0F2F5;
}

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

.settings-row > span {
  font-size: 14px;
  color: var(--dark);
}

.counter {
  display: flex;
  gap: 4px;
}

.counter-btn {
  min-width: 36px;
  height: 36px;
  border: 1px solid #E9ECEF;
  background: #fff;
  border-radius: 10px;
  font-size: 14px;
  font-weight: bold;
  color: var(--gray);
  cursor: pointer;
  transition: all 0.15s;
}

.counter-btn:active {
  transform: scale(0.92);
}

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

.ai-status {
  background: linear-gradient(135deg, rgba(255, 210, 63, 0.15), rgba(6, 214, 160, 0.1));
  border-left: 4px solid var(--yellow);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--dark);
  line-height: 1.6;
}

.word-chip {
  display: inline-block;
  background: rgba(255, 107, 53, 0.1);
  color: var(--orange);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: 600;
}

/* ===== 词库汇总页 (B3) ===== */
.lib-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
}
.lib-header h2 {
  margin: 0;
  font-size: 18px;
  color: #2D3142;
}
.lib-export-btn {
  background: #06D6A0;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(6, 214, 160, 0.25);
}
.lib-export-btn:active { transform: translateY(1px); }

.lib-filters {
  padding: 4px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lib-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.lib-filter-label {
  font-size: 13px;
  color: #5C6B7A;
  font-weight: 600;
  min-width: 56px;
}
.lib-chip {
  background: #F5F7FA;
  color: #5C6B7A;
  border: 1px solid #E1E5EB;
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.lib-chip.active {
  background: #FF6B35;
  color: #fff;
  border-color: #FF6B35;
}
.lib-chip:active { transform: scale(0.96); }

.lib-list {
  padding: 0 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lib-card {
  background: #fff;
  border: 1px solid #E8ECF1;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  cursor: pointer;
  transition: all 0.15s;
}
.lib-card:active { transform: scale(0.99); }
.lib-card-main { flex: 1; min-width: 0; }
.lib-word-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.lib-word {
  font-size: 18px;
  font-weight: 700;
  color: #2D3142;
}
.lib-phonetic {
  font-size: 12px;
  color: #8C99A8;
  font-style: italic;
}
.lib-pos {
  font-size: 11px;
  color: #FFD23F;
  background: #2D3142;
  padding: 1px 6px;
  border-radius: 8px;
}
.lib-meaning {
  font-size: 13px;
  color: #5C6B7A;
  margin-top: 4px;
}
.lib-card-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.lib-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.lib-badge-new {
  background: #F5F7FA;
  color: #8C99A8;
}
.lib-badge-learning {
  background: #FFF4E6;
  color: #FF6B35;
}
.lib-badge-mastered {
  background: #E6F9F1;
  color: #06A87A;
}
.lib-badge-hard {
  background: #FFE6E6;
  color: #D90429;
  animation: lib-pulse 1.5s infinite;
}
@keyframes lib-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 4, 41, 0.3); }
  50% { box-shadow: 0 0 0 4px rgba(217, 4, 41, 0); }
}
.lib-empty {
  text-align: center;
  padding: 40px 16px;
  color: #8C99A8;
  font-size: 14px;
}

/* ============================ */
/*  v1.3: 云端同步模块样式       */
/* ============================ */

/* 顶部同步状态指示器 */
.sync-indicator {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: default;
  transition: all 0.2s;
  user-select: none;
}
.sync-indicator.sync-offline {
  opacity: 0.45;
  background: transparent;
}
.sync-indicator.sync-online {
  color: #10B981;
  background: #E6F9F1;
}
.sync-indicator.sync-busy {
  color: #0EA5E9;
  background: #E0F2FE;
  animation: sync-spin 1.2s infinite linear;
}
.sync-indicator.sync-error {
  color: #D90429;
  background: #FFE6E6;
}
@keyframes sync-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 登录注册 modal */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 16px;
  animation: modal-fade-in 0.18s ease-out;
}
@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-card {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 380px;
  padding: 20px 18px 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  animation: modal-pop-in 0.22s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
@keyframes modal-pop-in {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.modal-title {
  font-size: 17px;
  font-weight: 600;
  color: #1F2937;
}
.modal-close {
  background: transparent;
  border: 0;
  font-size: 24px;
  color: #8C99A8;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.modal-close:hover {
  background: #F3F4F6;
}
.modal-sub {
  font-size: 12px;
  color: #8C99A8;
  margin-bottom: 14px;
  line-height: 1.5;
}
.modal-tabs {
  display: flex;
  gap: 4px;
  background: #F3F4F6;
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 16px;
}
.modal-tab {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 8px 0;
  font-size: 14px;
  color: #5C6B7A;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.modal-tab.active {
  background: #fff;
  color: #FF6B35;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-row label {
  font-size: 12px;
  color: #5C6B7A;
  font-weight: 500;
}
.form-row input {
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
  background: #fff;
}
.form-row input:focus {
  border-color: #FF6B35;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}
.form-error {
  background: #FFE6E6;
  color: #D90429;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
}
.form-tip {
  font-size: 11px;
  color: #8C99A8;
  line-height: 1.5;
  margin-top: 2px;
}
.primary-btn {
  background: linear-gradient(135deg, #FF6B35, #FF8C42);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.primary-btn:hover:not(:disabled) {
  opacity: 0.92;
}
