/* 基础重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', 'Noto Sans SC', 'Noto Sans JP', sans-serif;
  background: #0f0f1a;
  color: #e0e0e0;
  min-height: 100vh;
}
a { color: #7c9fff; text-decoration: none; }

/* 导航栏 */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: #1a1a2e;
  border-bottom: 1px solid #2a2a3e;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-brand {
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #7c9fff, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-links span {
  margin-left: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #a0a0b0;
  transition: color 0.2s;
}
.nav-links span:hover { color: #7c9fff; }

/* 页面系统 */
.page { display: none; padding: 32px 24px; max-width: 800px; margin: 0 auto; }
.page.active { display: block; }

/* 首页 */
.hero { text-align: center; padding: 60px 0 40px; }
.hero h1 { font-size: 2.2rem; margin-bottom: 12px; }
.hero p { color: #888; font-size: 1.1rem; margin-bottom: 24px; }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 32px; }
.feature-card {
  background: #1a1a2e;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #2a2a3e;
  transition: border-color 0.2s;
}
.feature-card:hover { border-color: #7c9fff; }
.feature-icon { font-size: 2rem; margin-bottom: 8px; }
.feature-card h3 { margin-bottom: 6px; }
.feature-card p { font-size: 0.9rem; color: #888; }

/* 按钮 */
.btn-primary {
  background: linear-gradient(135deg, #7c9fff, #a78bfa);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary {
  background: #2a2a3e;
  color: #e0e0e0;
  border: 1px solid #3a3a4e;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-secondary:hover { background: #3a3a4e; }
.btn-lg { padding: 14px 36px; font-size: 1.1rem; }

/* 选择器 */
select {
  background: #2a2a3e;
  color: #e0e0e0;
  border: 1px solid #3a3a4e;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
}
select:focus { outline: none; border-color: #7c9fff; }

/* 刷题 */
.quiz-header { margin-bottom: 24px; }
.quiz-controls { display: flex; gap: 12px; margin-top: 12px; }
.quiz-ready { text-align: center; padding: 60px 0; color: #888; }
.quiz-ready .btn-primary { margin-top: 16px; }

.question-card {
  background: #1a1a2e;
  border-radius: 12px;
  padding: 32px;
  border: 1px solid #2a2a3e;
  margin-bottom: 16px;
}
.question-word {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 8px;
  font-family: 'Noto Sans JP', sans-serif;
}
.question-reading {
  text-align: center;
  font-size: 1rem;
  color: #888;
  margin-bottom: 24px;
}
.question-prompt {
  text-align: center;
  font-size: 1rem;
  color: #a0a0b0;
  margin-bottom: 20px;
}

/* 选项 */
.options { display: grid; gap: 10px; }
.option-btn {
  background: #2a2a3e;
  color: #e0e0e0;
  border: 1px solid #3a3a4e;
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}
.option-btn:hover { background: #3a3a4e; border-color: #7c9fff; }
.option-btn.correct {
  background: #065f46;
  border-color: #34d399;
  color: #a7f3d0;
}
.option-btn.wrong {
  background: #7f1d1d;
  border-color: #f87171;
  color: #fecaca;
}
.option-btn:disabled { cursor: default; }
.option-btn.correct:hover { background: #065f46; }
.option-btn.wrong:hover { background: #7f1d1d; }

/* 结果 */
.result-card {
  text-align: center;
  padding: 32px;
}
.result-card h3 { font-size: 1.5rem; margin-bottom: 8px; }
.result-card p { color: #888; margin-bottom: 8px; }
.result-btn { margin-top: 16px; }

/* 进度条 */
.progress-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  justify-content: center;
}
.progress-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #2a2a3e;
}
.progress-dot.done { background: #7c9fff; }
.progress-dot.correct { background: #34d399; }
.progress-dot.wrong { background: #f87171; }

/* 限额通知 */
.limit-notice {
  background: #1a1a2e;
  border: 1px solid #7c9fff;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  margin: 20px 0;
}
.limit-notice h3 { margin-bottom: 8px; }
.limit-notice p { color: #888; font-size: 0.9rem; margin-bottom: 16px; }

/* 错题本 */
#wrongList { margin-top: 16px; }
.wrong-item {
  background: #1a1a2e;
  border: 1px solid #2a2a3e;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wrong-word { font-size: 1.2rem; font-family: 'Noto Sans JP', sans-serif; }
.wrong-info { color: #888; font-size: 0.85rem; }

/* 统计 */
#statsContainer { margin-top: 16px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  background: #1a1a2e;
  border: 1px solid #2a2a3e;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}
.stat-number { font-size: 2rem; font-weight: 700; color: #7c9fff; }
.stat-label { font-size: 0.85rem; color: #888; margin-top: 4px; }
.stats-level { margin-top: 16px; }
.level-stat {
  display: flex;
  justify-content: space-between;
  padding: 8px 16px;
  background: #1a1a2e;
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

/* 会员 */
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 16px; }
.pricing-card {
  background: #1a1a2e;
  border: 1px solid #2a2a3e;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: border-color 0.2s;
}
.pricing-card.featured { border-color: #7c9fff; }
.pricing-name { font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; }
.pricing-price { font-size: 2rem; font-weight: 700; color: #7c9fff; margin-bottom: 16px; }
.pricing-price span { font-size: 0.9rem; color: #888; }
.pricing-features { list-style: none; margin-bottom: 20px; text-align: left; }
.pricing-features li { padding: 6px 0; font-size: 0.9rem; }
.pricing-features li.disabled { color: #555; text-decoration: line-through; }
.pricing-btn { width: 100%; }

/* 模态框 */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.modal-content {
  background: #1a1a2e;
  border-radius: 12px;
  padding: 32px;
  width: 90%;
  max-width: 380px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 12px; right: 16px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #888;
}
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.9rem; margin-bottom: 4px; color: #a0a0b0; }
.form-group input {
  width: 100%;
  background: #2a2a3e;
  border: 1px solid #3a3a4e;
  border-radius: 6px;
  padding: 10px 14px;
  color: #e0e0e0;
  font-size: 1rem;
}
.form-group input:focus { outline: none; border-color: #7c9fff; }
.error-msg { color: #f87171; font-size: 0.9rem; margin-bottom: 12px; }
.auth-buttons { display: flex; gap: 10px; }
.auth-buttons .btn-primary, .auth-buttons .btn-secondary { flex: 1; }

.text-muted { color: #888; }

/* 响应式 */
@media (max-width: 640px) {
  .features, .pricing-grid, .stats-grid { grid-template-columns: 1fr; }
  .quiz-controls { flex-direction: column; }
  .nav-links { display: flex; gap: 8px; }
  .nav-links span { margin-left: 0; font-size: 0.8rem; }
}
