/* 首页（登录 / 注册落地页）样式
   ------------------------------------------------------------
   左侧是面向家长的价值宣传，右侧是手机号 + 验证码登录注册。
   配色与会话页的儿童向暖色区分开：这里走「深墨绿 + 琥珀金」，
   墨绿传递可信与专注，琥珀金保留品牌温度，整体更像家长愿意买单的产品页。
   本文件自带完整样式（含 reset），index.html 不再引 style.css。 */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --brand: #ff8c1a;            /* 品牌橙：主行动按钮 */
  --amber: #ffc46b;            /* 琥珀金：深底上的强调色 */
  --mint: #7fe0bd;             /* 薄荷绿：深底上的勾选/正向提示 */
  --cream: #fbf6ee;            /* 右侧面板底色 */
  --line: #eee3d4;             /* 浅底描边 */
  --text: #33291f;
  --text-soft: #8b7c6a;
}

body.home-page {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

/* 左右分栏：宣传区吃满剩余宽度，输入区用 clamp 收窄，视觉重心落在左侧价值主张 */
.home-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(400px, 36vw, 540px);
  min-height: 100vh;
}

/* ============================================================
   左：宣传区
   ============================================================ */
.home-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: clamp(36px, 6vh, 68px) clamp(32px, 5vw, 84px);
  color: #fff;
  /* 两层径向高光叠一层斜向主渐变，避免大面积纯色的呆板；底色压深，保证白字对比 */
  background:
    radial-gradient(115% 85% at 6% 0%, rgba(31, 122, 99, 0.5) 0%, transparent 55%),
    radial-gradient(90% 80% at 100% 100%, rgba(3, 24, 20, 0.75) 0%, transparent 60%),
    linear-gradient(150deg, #08302a 0%, #0c4038 48%, #10503f 100%);
}

/* 柔光斑：暖金在左上、薄荷在右下，呼应右侧奶油色面板 */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}
.hero-glow-a { width: 400px; height: 400px; top: -160px; left: -120px; background: rgba(255, 196, 107, 0.14); }
.hero-glow-b { width: 400px; height: 400px; right: -140px; bottom: -160px; background: rgba(127, 224, 189, 0.16); }

/* 点阵纹理：用 mask 让右上角淡出，只做质感不抢内容 */
.hero-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.75;
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(72% 62% at 72% 18%, #000 0%, transparent 100%);
  mask-image: radial-gradient(72% 62% at 72% 18%, #000 0%, transparent 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.8vh, 30px);
}

/* ---------- 品牌行 ---------- */
.hero-brand { display: flex; align-items: center; gap: 12px; }
/* 品牌 logo 为吉祥物图片（img/mascot.png），裁圆角方块 */
.brand-logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(255, 159, 46, 0.32);
}
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: 0.5px; }
.brand-sub { margin-top: 3px; font-size: 12px; letter-spacing: 0.3px; color: rgba(230, 244, 239, 0.6); }

/* ---------- 眉标 / 主标题 / 副标题 ---------- */
.hero-eyebrow {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 12px;
  font-size: 12.5px;
  letter-spacing: 0.4px;
  color: var(--amber);
  background: rgba(255, 196, 107, 0.12);
  border: 1px solid rgba(255, 196, 107, 0.28);
  border-radius: 999px;
}
.hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(255, 196, 107, 0.16);
}

.hero-title {
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: 0.5px;
}
/* 「AI 伙伴」高亮：琥珀字色 + 底部一道柔和色带，不用整块底色以免喧宾夺主 */
.hero-title-em {
  margin-left: 0.25em;
  padding-bottom: 2px;
  color: var(--amber);
  background-image: linear-gradient(rgba(255, 196, 107, 0.26), rgba(255, 196, 107, 0.26));
  background-repeat: no-repeat;
  background-position: 0 92%;
  background-size: 100% 8px;
}

.hero-sub {
  max-width: 30em;
  font-size: clamp(14px, 1.1vw, 16.5px);
  line-height: 1.85;
  color: rgba(226, 242, 236, 0.78);
}

/* ---------- 四个卖点 ---------- */
.hero-points {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.point {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}
.point:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 196, 107, 0.32);
  transform: translateY(-2px);
}

.point-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--amber);
  background: linear-gradient(135deg, rgba(255, 196, 107, 0.2), rgba(255, 196, 107, 0.05));
  border: 1px solid rgba(255, 196, 107, 0.2);
  border-radius: 11px;
}
.point-icon svg { width: 19px; height: 19px; }

.point-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.point-title { font-size: 14.5px; font-weight: 600; line-height: 1.45; letter-spacing: 0.2px; }
.point-desc { font-size: 12.5px; line-height: 1.65; color: rgba(226, 242, 236, 0.6); }

/* ---------- 底部信任条 ---------- */
.hero-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding-top: clamp(6px, 1.6vh, 16px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.foot-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: rgba(226, 242, 236, 0.68);
}
.foot-item svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--mint); }

/* ============================================================
   右：登录 / 注册卡片
   ============================================================ */
.home-auth {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: clamp(28px, 5vh, 56px) clamp(24px, 3vw, 48px);
  background: linear-gradient(180deg, #fdfaf4 0%, #f6f0e5 100%);
}

.auth-card {
  width: 100%;
  max-width: 386px;
  padding: clamp(24px, 3.2vh, 34px) 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 22px 54px rgba(10, 51, 45, 0.12);
}

/* 多端预告：卡片下方一行小字，不抢登录主流程 */
.auth-apps {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  letter-spacing: 0.2px;
  color: #a2937f;
}
.auth-apps::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.5;
}

/* 移动端品牌行：左宣传区被隐藏时兜住品牌识别，桌面端不展示 */
.auth-brand { display: none; }

.auth-head { margin-bottom: 20px; }
.auth-head h2 { font-size: 21px; font-weight: 700; letter-spacing: 0.3px; color: #2a2118; }
.auth-head p { margin-top: 7px; font-size: 13px; line-height: 1.6; color: var(--text-soft); }

/* 视图二（学生信息）默认隐藏，display 被下面规则覆盖时要显式复位 */
.auth-card form[hidden] { display: none; }

.auth-field { margin-bottom: 14px; }
.auth-label {
  display: block;
  margin-bottom: 7px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #6f6152;
}

.auth-card input,
.auth-card select {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: #fffdf9;
  border: 1.5px solid #eadfd0;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.auth-card input::placeholder { color: #bcae9c; }
.auth-card input:focus,
.auth-card select:focus {
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 140, 26, 0.12);
}

/* 验证码输入 + 发送按钮同行；按钮文案由 login.js 改写为倒计时，宽度用 nowrap 兜住 */
.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; min-width: 0; }
#send-code-btn {
  flex-shrink: 0;
  padding: 0 16px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  color: var(--brand);
  background: #fff6ea;
  border: 1.5px solid #ffd699;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}
#send-code-btn:hover { background: #ffedd2; border-color: var(--brand); }
#send-code-btn:disabled { opacity: 0.55; cursor: default; }

.auth-card button[type="submit"] {
  width: 100%;
  margin-top: 8px;
  padding: 13px;
  font-size: 15.5px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.5px;
  color: #fff;
  background: linear-gradient(135deg, #ffa53e, #ff8c1a);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(255, 140, 26, 0.28);
  transition: transform 0.18s, box-shadow 0.18s, opacity 0.2s;
}
.auth-card button[type="submit"]:hover { transform: translateY(-1px); box-shadow: 0 14px 26px rgba(255, 140, 26, 0.34); }
.auth-card button[type="submit"]:active { transform: translateY(0); }
.auth-card button[type="submit"]:disabled { opacity: 0.55; cursor: default; transform: none; box-shadow: none; }

.auth-tip { margin-top: 12px; font-size: 12px; line-height: 1.6; color: #a2937f; text-align: center; }

/* ---------- 视图二：学生信息 ---------- */
.profile-tip {
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #7a6a55;
  background: #fff7ec;
  border: 1px solid #f4e5cf;
  border-radius: 12px;
}

/* 字段网格：昵称占整行，年级 / 年龄并排 */
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field span { font-size: 12px; font-weight: 600; color: #6f6152; }
.field input,
.field select { padding: 10px 12px; font-size: 14px; }

#back-login {
  width: 100%;
  margin-top: 10px;
  padding: 9px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-soft);
  background: none;
  border: none;
  cursor: pointer;
}
#back-login:hover { color: var(--brand); }

/* ---------- 错误与开发提示 ---------- */
.auth-error { margin-top: 12px; font-size: 12.5px; line-height: 1.5; color: #e05c5c; text-align: center; }
.auth-error:empty { display: none; }
.auth-note {
  margin-top: 16px;
  padding-top: 14px;
  font-size: 11.5px;
  line-height: 1.6;
  color: #b3a48f;
  text-align: center;
  border-top: 1px dashed #ece1d1;
}

/* ============================================================
   响应式
   ============================================================ */

/* 笔记本窄一点：卖点卡片收紧，保证宣传区在一屏内不滚 */
@media (max-width: 1180px) {
  .hero-points { gap: 10px; }
  .point { padding: 12px 14px; }
  .point-desc { font-size: 12px; }
}

/* ≤ 980px（手机 / 竖屏 Pad）：屏幕小，不展示宣传，只留全屏登录 */
@media (max-width: 980px) {
  .home-page { grid-template-columns: minmax(0, 1fr); }
  .home-hero { display: none; }
  /* dvh 兜住移动端浏览器地址栏伸缩导致的高度跳动 */
  .home-auth { min-height: 100vh; min-height: 100dvh; padding: 32px 20px; }
  .auth-card { max-width: 460px; }
  .auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #2a2118;
  }
  .auth-brand img { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; }
}

/* 矮屏（笔记本 13" 或横屏 Pad）：压缩纵向节奏，避免宣传区被裁 */
@media (max-height: 720px) and (min-width: 981px) {
  .hero-inner { gap: 16px; }
  .hero-foot { padding-top: 6px; }
}

/* ≤ 600px：卡片贴边收窄，表单转单列 */
@media (max-width: 600px) {
  .auth-card { padding: 22px 18px; border-radius: 18px; }
  .field-grid { grid-template-columns: 1fr; }
}
