/* ============================================================
   键盘英雄 · 打字练习网站 - 样式表
   ============================================================ */

/* ===== 重置与基础 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* 颜色 */
  --bg: #f5f6fa;
  --bg-card: #ffffff;
  --bg-soft: #f0f2f5;
  --text: #1a1a2e;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f0f0f0;

  --primary: #4263eb;
  --primary-light: #edf2ff;
  --primary-dark: #364fc7;
  --success: #51cf66;
  --success-light: #d3f9d8;
  --danger: #ff6b6b;
  --danger-light: #ffe3e3;
  --warning: #ffa94d;
  --warning-light: #fff3bf;

  /* 手指颜色 */
  --c-pinky: #FF8A8A;
  --c-ring: #FFB366;
  --c-middle: #6BB6FF;
  --c-index: #6FD980;
  --c-thumb: #B197FC;

  /* 尺寸 */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.10);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ===== 顶部导航 ===== */
.topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

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

.logo-text {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}

.logo-sub {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.topnav {
  display: flex;
  gap: 4px;
  background: var(--bg-soft);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.nav-btn {
  border: none;
  background: transparent;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.nav-btn:hover { color: var(--text); }
.nav-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow);
}

.topbar-stats {
  display: flex;
  gap: 8px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-soft);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 14px;
}

.stat-pill-icon { font-size: 16px; }
.stat-pill-value { font-weight: 700; color: var(--text); }
.stat-pill-label { color: var(--text-tertiary); font-size: 12px; }

/* ===== 主内容 ===== */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.view { display: none; animation: fadeIn 0.4s ease; }
.view.active { display: block; }

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

/* ===== 英雄区 ===== */
.hero {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 40px;
  position: relative;
}

.hero-content { flex: 1; }

.hero-title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.gradient-text {
  background: linear-gradient(135deg, #4263eb, #7950f2, #cc5de8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 520px;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 28px;
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
}

.hero-stat-label {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

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

/* 浮动键动画 */
.hero-visual {
  position: relative;
  width: 260px;
  height: 260px;
  flex-shrink: 0;
}

.floating-key {
  position: absolute;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  animation: float 3s ease-in-out infinite;
}

.floating-key.k1 { top: 20px; left: 40px;  background: var(--c-pinky);  color: #fff; animation-delay: 0s; }
.floating-key.k2 { top: 20px; left: 110px; background: var(--c-ring);   color: #fff; animation-delay: 0.3s; }
.floating-key.k3 { top: 20px; left: 180px; background: var(--c-middle); color: #fff; animation-delay: 0.6s; }
.floating-key.k4 { top: 100px; left: 5px;   background: var(--c-index); color: #fff; animation-delay: 0.9s; }
.floating-key.k5 { top: 100px; left: 140px; background: var(--c-index); color: #fff; animation-delay: 1.2s; border: 3px solid #fff; outline: 2px solid var(--c-index); }
.floating-key.k6 { top: 100px; left: 210px; background: var(--c-middle); color: #fff; animation-delay: 1.5s; }
.floating-key.k7 { top: 180px; left: 75px;  background: var(--c-ring);  color: #fff; animation-delay: 1.8s; }
.floating-key.k8 { top: 180px; left: 145px; background: var(--c-pinky); color: #fff; animation-delay: 2.1s; }

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

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  text-decoration: none;
}

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(66,99,235,0.3);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(66,99,235,0.4);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--bg-soft);
  color: var(--text);
}

/* ===== 总体进度 ===== */
.overall-progress {
  margin-bottom: 40px;
}

.overall-progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 8px;
}

.overall-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #7950f2);
  border-radius: 100px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.overall-progress-text {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ===== 等级与阶段卡片 ===== */
.level-section {
  margin-bottom: 40px;
}

.level-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.level-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
}

.level-header-info {
  flex: 1;
}

.level-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.level-subtitle {
  font-size: 13px;
  color: var(--text-tertiary);
  font-family: 'JetBrains Mono', monospace;
}

.level-desc {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 600px;
}

.stages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.stage-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stage-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--stage-color, var(--primary));
}

.stage-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--stage-color, var(--primary));
}

.stage-card.completed {
  background: linear-gradient(135deg, var(--success-light), transparent);
}

.stage-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.stage-card.locked:hover {
  transform: none;
  box-shadow: none;
}

.stage-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stage-number {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stage-stars {
  display: flex;
  gap: 2px;
}

.stage-star {
  font-size: 14px;
  color: var(--border);
}

.stage-star.filled { color: #f59f00; }

.stage-card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.stage-card-subtitle {
  font-size: 13px;
  color: var(--text-tertiary);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 12px;
}

.stage-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.stage-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.stage-lock {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  opacity: 0.6;
}

.stage-check {
  position: absolute;
  top: 16px; right: 16px;
  width: 24px; height: 24px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
}

/* ===== 练习视图 ===== */
.practice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.practice-info {
  text-align: center;
}

.practice-stage-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 8px;
}

.practice-title {
  font-size: 26px;
  font-weight: 800;
}

.practice-subtitle {
  font-size: 15px;
  color: var(--text-tertiary);
  font-family: 'JetBrains Mono', monospace;
}

.practice-lesson-nav {
  display: flex;
  gap: 8px;
}

.lesson-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.lesson-dot.active {
  background: var(--primary);
  border-color: var(--primary);
}
.lesson-dot.completed {
  background: var(--success);
  border-color: var(--success);
}

.practice-hint {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--primary-light);
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  border-left: 4px solid var(--primary);
}

.hint-icon { font-size: 20px; flex-shrink: 0; }
.hint-text { font-size: 14px; color: var(--text); }

/* 统计栏 */
.practice-stats-bar, .free-stats-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.pstat {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  flex: 1;
  min-width: 120px;
}

.pstat-icon { font-size: 18px; }
.pstat-value {
  font-size: 22px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
}
.pstat-label { font-size: 12px; color: var(--text-tertiary); }

/* 文字显示区 */
.text-display-area {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  min-height: 140px;
  box-shadow: var(--shadow);
}

.text-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 26px;
  line-height: 1.8;
  letter-spacing: 1px;
  color: var(--text-tertiary);
  word-break: keep-all;
  user-select: none;
}

.text-display .char {
  transition: all 0.15s ease;
  position: relative;
  display: inline-block;
}

.text-display .char.current {
  color: var(--text);
  font-weight: 700;
}

.text-display .char.current::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0; right: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.text-display .char.correct {
  color: var(--success);
}

.text-display .char.incorrect {
  color: var(--danger);
  background: var(--danger-light);
  border-radius: 4px;
}

.text-display .char.space.incorrect {
  background: var(--danger-light);
  border-bottom: 3px solid var(--danger);
}

/* ===== 虚拟键盘 ===== */
.keyboard-container {
  margin-bottom: 24px;
}

.keyboard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.keyboard-row {
  display: flex;
  gap: 6px;
}

.key {
  min-width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-bottom-width: 3px;
  transition: all 0.12s ease;
  position: relative;
  user-select: none;
}

.key .key-finger-color {
  position: absolute;
  bottom: 3px;
  left: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.key.home-key::before {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--text-tertiary);
  border-radius: 2px;
}

.key.guide-key::after {
  content: '';
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text);
}

.key.active {
  transform: translateY(2px);
  border-bottom-width: 1px;
  box-shadow: 0 0 0 3px rgba(66,99,235,0.25);
  background: #fff !important;
  color: var(--primary);
  border-color: var(--primary);
}

.key.next-key {
  box-shadow: 0 0 0 3px rgba(66,99,235,0.2);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(66,99,235,0.15); }
  50% { box-shadow: 0 0 0 5px rgba(66,99,235,0.35); }
}

.key.special {
  font-size: 12px;
  color: var(--text-secondary);
  background: #e9ecef;
}

/* 手指图例 */
.finger-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.finger-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.finger-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

/* 隐藏输入框 */
.hidden-input {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* ===== 结果视图 ===== */
.result-card {
  max-width: 560px;
  margin: 40px auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.result-celebration {
  margin-bottom: 36px;
}

.result-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.result-star {
  font-size: 48px;
  animation: starPop 0.6s ease backwards;
}

.result-star:nth-child(1) { animation-delay: 0.2s; }
.result-star:nth-child(2) { animation-delay: 0.4s; }
.result-star:nth-child(3) { animation-delay: 0.6s; }
.result-star.earned { color: #f59f00; }
.result-star.unearned { opacity: 0.2; }

@keyframes starPop {
  from { transform: scale(0) rotate(-180deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}

.result-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
}

.result-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.result-stat-item {
  text-align: center;
}

.result-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
}

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

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

/* ===== 自由练习视图 ===== */
.free-header {
  text-align: center;
  margin-bottom: 32px;
}

.free-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
}

.free-desc {
  font-size: 15px;
  color: var(--text-secondary);
}

.free-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

/* ===== 庆祝粒子 ===== */
.confetti-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(-100px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }
  .hero-visual { width: 220px; height: 220px; }
  .hero-stats { justify-content: center; }
  .hero-actions { justify-content: center; }
  .floating-key { width: 48px; height: 48px; font-size: 20px; }
}

@media (max-width: 680px) {
  .topbar-inner { padding: 0 12px; gap: 8px; }
  .logo-sub { display: none; }
  .stat-pill { padding: 4px 10px; font-size: 12px; }
  .stat-pill-label { display: none; }

  .main-content { padding: 20px 12px 60px; }

  .hero-title { font-size: 28px; }
  .hero-desc { font-size: 14px; }
  .hero-stats { gap: 16px; }
  .hero-stat-value { font-size: 24px; }
  .hero-visual { width: 180px; height: 180px; }
  .floating-key { width: 40px; height: 40px; font-size: 16px; }
  .floating-key.k1 { left: 30px; }
  .floating-key.k2 { left: 90px; }
  .floating-key.k3 { left: 150px; }
  .floating-key.k4 { left: 0; }
  .floating-key.k5 { left: 120px; }
  .floating-key.k6 { left: 180px; }
  .floating-key.k7 { left: 60px; }
  .floating-key.k8 { left: 120px; }

  .stages-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stage-card { padding: 14px; }
  .stage-card-title { font-size: 16px; }

  .text-display { font-size: 20px; }
  .text-display-area { padding: 20px; }

  .key { min-width: 36px; height: 40px; font-size: 13px; }
  .keyboard { padding: 12px; gap: 4px; }
  .keyboard-row { gap: 4px; }

  .practice-stats-bar, .free-stats-bar { gap: 8px; }
  .pstat { min-width: 100px; padding: 8px 12px; }
  .pstat-value { font-size: 18px; }

  .result-stats { grid-template-columns: 1fr 1fr; }
  .result-card { padding: 32px 20px; margin: 20px 8px; }
}

@media (max-width: 480px) {
  .stages-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .key { min-width: 30px; height: 36px; font-size: 11px; }
  .keyboard { padding: 8px; gap: 3px; }
  .keyboard-row { gap: 3px; }
}

/* ===== 顶栏用户区 ===== */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 12px;
  background: var(--bg-soft);
  border-radius: 100px;
}

.user-avatar { font-size: 16px; }

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== 登录/注册弹窗 ===== */
.auth-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 30, 50, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: authSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo {
  font-size: 48px;
  margin-bottom: 8px;
}

.auth-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.auth-tagline {
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-tabs {
  display: flex;
  background: var(--bg-soft);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.auth-tab:hover { color: var(--text); }
.auth-tab.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.auth-field input {
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-card);
  transition: var(--transition);
  outline: none;
}

.auth-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(66,99,235,0.1);
}

.auth-error {
  font-size: 13px;
  color: var(--danger);
  min-height: 18px;
  text-align: center;
}

.btn-block {
  width: 100%;
  margin-top: 4px;
}

.auth-info {
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  text-align: center;
}

/* ===== 响应式补充 ===== */
@media (max-width: 680px) {
  .topbar-user .user-name { display: none; }
  .auth-card { padding: 32px 24px; }
  .auth-logo { font-size: 40px; }
  .auth-title { font-size: 24px; }
}

@media (max-width: 480px) {
  .topbar-stats { display: none; }
}
