/* 老同学录 H5 样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  min-height: 100%;
  background: #f5f7fa;
  color: #1f2933;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 顶部导航 ---------- */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 12px;
  background: #ffffff;
  border-bottom: 1px solid #e6e9ef;
}

.navbar-plain { box-shadow: none; }

#nav-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border: none;
  background: transparent;
  font-size: 22px;
  color: #185fa5;
  cursor: pointer;
  border-radius: 8px;
}

#nav-title {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
}

.navbar-spacer { width: 32px; flex-shrink: 0; }

/* ---------- 内容区 ---------- */
#view { padding-top: 48px; padding-bottom: 32px; }

.center-wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid #e6e9ef;
}

.title { font-size: 17px; font-weight: 500; margin-bottom: 8px; }
.subtitle { font-size: 13px; color: #6b7280; margin-bottom: 12px; }

.field { margin-bottom: 14px; }
.label { display: block; font-size: 13px; color: #374151; margin-bottom: 6px; }

.input, .textarea {
  width: 100%;
  border: 1px solid #d9dde5;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  background: #ffffff;
  color: #1f2933;
  outline: none;
}

.input { height: 42px; }
.textarea { min-height: 96px; resize: vertical; line-height: 1.6; font-family: inherit; }
.input:focus, .textarea:focus { border-color: #185fa5; }

select.input { appearance: auto; }

.btn {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: #185fa5;
  color: #ffffff;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  margin-top: 8px;
  font-family: inherit;
}

.btn.secondary { background: #ffffff; color: #185fa5; border: 1px solid #185fa5; }
.btn.danger { background: #ffffff; color: #a32d2d; border: 1px solid #a32d2d; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.mini-btn {
  display: inline-block;
  margin-top: 10px;
  margin-right: 8px;
  padding: 6px 16px;
  font-size: 13px;
  background: #185fa5;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}

.mini-btn.secondary { background: #ffffff; color: #185fa5; border: 1px solid #185fa5; }
.mini-btn.danger { background: #ffffff; color: #a32d2d; border: 1px solid #a32d2d; }
.mini-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.delete-btn {
  padding: 6px 14px;
  font-size: 12px;
  background: #ffffff;
  color: #a32d2d;
  border: 1px solid #a32d2d;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
}

.list-item { padding: 12px 0; border-bottom: 1px solid #eef0f4; }
.list-item:last-child { border-bottom: none; }
.list-title { font-size: 15px; margin-bottom: 4px; }
.list-meta { font-size: 12px; color: #6b7280; margin-top: 2px; }

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e6f1fb;
  color: #185fa5;
  font-size: 12px;
  flex-shrink: 0;
}

.empty { text-align: center; color: #9ca3af; font-size: 13px; padding: 28px 0; }
.error { color: #a32d2d; font-size: 13px; margin-bottom: 8px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.row-left { flex: 1; min-width: 0; }
.actions { display: flex; gap: 8px; margin-top: 4px; }
.post-content { font-size: 14px; line-height: 1.7; margin-top: 8px; white-space: pre-wrap; word-break: break-word; }

.forum-item { padding: 12px 0; border-bottom: 1px solid #eef0f4; cursor: pointer; }
.forum-item:last-of-type { border-bottom: none; }

/* ---------- 首页 ---------- */
.welcome { text-align: center; padding: 28px 16px; }
.welcome-title { font-size: 24px; font-weight: 600; margin-bottom: 8px; color: #185fa5; }
.welcome-sub { font-size: 13px; color: #6b7280; }

.notice-item { font-size: 13px; color: #4b5563; line-height: 1.7; margin-bottom: 8px; }

.agree-row {
  display: flex;
  align-items: center;
  margin: 14px 0 10px;
  cursor: pointer;
  user-select: none;
}

.checkbox {
  width: 18px; height: 18px;
  border: 1.5px solid #9ca3af;
  border-radius: 4px;
  margin-right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.checkbox.checked { background: #2563eb; border-color: #2563eb; }
.checkbox-mark { color: #fff; font-size: 12px; line-height: 1; }
.agree-text { font-size: 13px; color: #374151; }

.auth-tabs {
  display: flex;
  border-bottom: 1px solid #e6e9ef;
  margin-top: 6px;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.auth-tab.active { color: #185fa5; border-bottom-color: #185fa5; font-weight: 500; }

/* ---------- 选择学段 ---------- */
.hero { padding: 8px 4px 16px; }
.hero-title { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.hero-sub { font-size: 13px; color: #6b7280; }

.stage-grid { display: flex; flex-wrap: wrap; gap: 12px; }

.stage-card {
  width: calc(50% - 6px);
  background: #ffffff;
  border: 1px solid #e6e9ef;
  border-radius: 14px;
  padding: 18px 16px;
  position: relative;
  cursor: pointer;
  transition: box-shadow .2s;
}

.stage-card:active { box-shadow: 0 2px 10px rgba(24, 95, 165, .15); }

.stage-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  line-height: 40px;
  margin-bottom: 14px;
}

.stage-name { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.stage-desc { font-size: 12px; color: #9ca3af; }
.stage-arrow { position: absolute; right: 16px; top: 50px; font-size: 24px; color: #cbd0d8; }

.quick-row { display: flex; gap: 12px; margin-top: 16px; }
.quick-item { flex: 1; background: #eef4fb; border-radius: 12px; padding: 14px; cursor: pointer; }
.quick-title { font-size: 14px; font-weight: 500; color: #185fa5; margin-bottom: 4px; }
.quick-meta { font-size: 12px; color: #6b7280; }

/* ---------- 平台一键登录 ---------- */
.btn.one-tap { height: 46px; font-size: 16px; font-weight: 500; margin-top: 2px; }

.platform-badge {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12px;
}

.divider {
  display: flex;
  align-items: center;
  margin: 14px 0 4px;
  color: #9ca3af;
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e6e9ef;
}

.divider span { padding: 0 10px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(.9);
  z-index: 200;
  background: rgba(17, 24, 39, .88);
  color: #ffffff;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 10px;
  opacity: 0;
  transition: opacity .25s, transform .25s;
  pointer-events: none;
  max-width: 70%;
  text-align: center;
}

.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
