*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 18px;
  line-height: 1.5;
  color: #1a1a2e;
  background: #f0f4ff;
  min-height: 100vh;
  padding-bottom: 72px;
}

.app-header {
  background: #4a6cf7;
  color: #fff;
  padding: 20px 16px;
  text-align: center;
}

.app-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.app-main {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px;
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 24px 20px;
  box-shadow: 0 4px 16px rgba(74, 108, 247, 0.12);
}

.greeting {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 16px;
  text-align: center;
}

.task-summary {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.task-stat {
  flex: 1;
  text-align: center;
  background: #f0f4ff;
  border-radius: 12px;
  padding: 16px 8px;
}

.task-stat__number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: #4a6cf7;
  line-height: 1.2;
}

.task-stat__label {
  display: block;
  font-size: 1rem;
  color: #555;
  margin-top: 4px;
}

.task-note {
  text-align: center;
  color: #666;
  margin: 0 0 24px;
}

.task-card .btn {
  margin-top: 4px;
}

.status-line,
.form-intro,
.list-summary,
.empty-note,
.hint {
  text-align: center;
  color: #666;
}

.hint {
  font-size: 0.9rem;
  margin: 16px 0 0;
}

.hint code {
  font-size: 0.85rem;
  background: #f0f4ff;
  padding: 2px 6px;
  border-radius: 4px;
}

.health {
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  background: #f0f4ff;
  margin: 0 0 16px;
  font-weight: 500;
}

.health--ok {
  background: #e8f8ef;
  color: #1a7f4b;
}

.health--err {
  background: #fdeeee;
  color: #c0392b;
}

.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 12px;
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  padding: 16px 24px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-primary {
  background: #4a6cf7;
  color: #fff;
}

.btn-primary:active {
  background: #3a5ce5;
}

.btn-primary:disabled {
  background: #b0c0f8;
  cursor: not-allowed;
}

.btn-outline {
  background: #fff;
  color: #4a6cf7;
  border: 2px solid #4a6cf7;
}

.btn-outline:active {
  background: #eef2ff;
}

.btn-outline:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-danger {
  background: #fdeeee;
  color: #c0392b;
  border: 2px solid #f5c6c6;
}

.btn-danger:active {
  background: #fad4d4;
}

.btn-compact {
  min-height: 44px;
  padding: 8px 14px;
  font-size: 0.95rem;
  width: auto;
  flex: 1;
}

.btn-large {
  min-height: 56px;
}

.form-intro {
  margin: 0 0 20px;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  font-size: 1.25rem;
  padding: 14px 16px;
  border: 2px solid #e0e4f0;
  border-radius: 12px;
  margin-bottom: 20px;
  outline: none;
  -webkit-appearance: none;
}

.form-input:focus {
  border-color: #4a6cf7;
}

.alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-weight: 500;
  text-align: center;
}

.alert--success {
  background: #e8f8ef;
  color: #1a7f4b;
}

.alert--error {
  background: #fdeeee;
  color: #c0392b;
}

.list-summary {
  margin: 0 0 16px;
}

.batch-bar {
  margin: 0 0 16px;
}

.word-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.word-item {
  padding: 16px 0;
  border-bottom: 1px solid #eef1f8;
}

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

.word-item__actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.word-item__word {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a1a2e;
}

.word-item__phonetic {
  display: block;
  color: #888;
  font-size: 0.95rem;
  margin-top: 2px;
}

.word-item__meaning {
  display: block;
  color: #555;
  margin-top: 4px;
  white-space: pre-line;
}

.word-item__meaning--empty,
.word-item__phonetic--empty {
  color: #aaa;
  font-style: italic;
}

.word-item__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.word-item__date {
  font-size: 0.875rem;
  color: #999;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge--new {
  background: #eef2ff;
  color: #4a6cf7;
}

.badge--learning {
  background: #fff4e6;
  color: #e67e22;
}

.badge--mastered {
  background: #e8f8ef;
  color: #1a7f4b;
}

.empty-note {
  margin: 0 0 24px;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: #fff;
  border-top: 1px solid #e0e4f0;
  padding: 8px 0;
  max-width: 480px;
  margin: 0 auto;
}

.nav-item {
  flex: 1;
  text-align: center;
  padding: 10px 4px;
  font-size: 0.9rem;
  color: #888;
  text-decoration: none;
}

.nav-item--active {
  color: #4a6cf7;
  font-weight: 600;
}

.nav-item--disabled {
  color: #ccc;
}

/* 学习卡片 */
.learn-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 20px 32px;
  box-shadow: 0 4px 16px rgba(74, 108, 247, 0.12);
  text-align: center;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.learn-progress {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #4a6cf7;
}

.learn-tag {
  display: inline-block;
  margin: 0 auto 16px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  background: #fff4e6;
  color: #e67e22;
}

.learn-tag--new {
  background: #eef2ff;
  color: #4a6cf7;
}

.learn-word {
  margin: 0 0 20px;
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.2;
  color: #1a1a2e;
  word-break: break-word;
}

.btn-speak {
  background: #5b8def;
  color: #fff;
  margin-bottom: 20px;
  min-height: 56px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-speak:active {
  background: #3d6fd4;
}

.btn-speak:disabled {
  background: #b0c0f8;
  cursor: not-allowed;
}

.tts-tip {
  margin: -8px 0 16px;
  color: #c0392b;
  font-size: 0.95rem;
  text-align: center;
}

.learn-hint {
  margin: 0 0 28px;
  color: #888;
  font-size: 1rem;
}

.learn-answer {
  margin: 0 0 24px;
}

.learn-phonetic {
  margin: 0 0 12px;
  font-size: 1.25rem;
  color: #666;
}

.learn-meaning {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: #1a1a2e;
  white-space: pre-line;
  line-height: 1.5;
}

.learn-empty {
  color: #aaa;
  font-style: italic;
  font-weight: 400;
}

.learn-feedback-label {
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #555;
}

.feedback-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-feedback {
  min-height: 56px;
  font-size: 1.2rem;
}

.btn-feedback--hard {
  background: #fdeeee;
  color: #c0392b;
}

.btn-feedback--hard:active {
  background: #fad4d4;
}

.btn-feedback--medium {
  background: #fff4e6;
  color: #d35400;
}

.btn-feedback--medium:active {
  background: #ffe4c4;
}

.btn-feedback--easy {
  background: #e8f8ef;
  color: #1a7f4b;
}

.btn-feedback--easy:active {
  background: #d0f0dc;
}

.learn-step-hint {
  margin-top: 16px;
}

.learn-done-card {
  text-align: center;
  padding: 36px 20px;
}

.learn-done-emoji {
  font-size: 3rem;
  margin: 0 0 12px;
}

.learn-done-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 12px;
}

.learn-done-note {
  color: #666;
  margin: 0 0 28px;
}

@media (min-width: 481px) {
  .bottom-nav {
    left: 50%;
    transform: translateX(-50%);
    border-left: 1px solid #e0e4f0;
    border-right: 1px solid #e0e4f0;
  }
}
