/* ============================================================
   AI Writing 雅思写作批改 — 品牌样式
   :root 变量与基础风格提取自官网 frontend/css/style.css
   （小流英语 KeepABC 品牌蓝 #28a7e1）
   ============================================================ */

:root {
  --brand: #28a7e1;
  --brand-hover: #1e8bc3;
  --brand-soft: rgba(40,167,225,0.1);
  --brand-glow: rgba(40,167,225,0.4);
  --brand-dark: #1a7bb0;
  --surface: #f5f5f7;
  --surface-raised: #ffffff;
  --border: #d2d2d7;
  --text: #1d1d1f;
  --text-muted: #86868b;
  --text-light: #a1a1a6;
  --danger: #ff3b30;
  --success: #34c759;
  --warning: #ff9500;
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-xl: 0 24px 80px rgba(0,0,0,0.16);
  --radius: 18px;
  --radius-sm: 12px;
  --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--surface);
  line-height: 1.47059;
  font-weight: 400;
  letter-spacing: -0.022em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

.container { max-width: 1024px; margin: 0 auto; padding: 0 24px; }

/* ===== 共享眉标（各内页页头与首页 Hero 统一语言） ===== */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em;
  color: var(--brand-dark); background: var(--brand-soft);
  border: 1px solid rgba(40, 167, 225, 0.25);
  padding: 6px 14px; border-radius: 100px; margin-bottom: 14px;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; border: none; border-radius: 100px;
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  transition: var(--transition); white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); transform: translateY(-1px); box-shadow: 0 6px 20px var(--brand-glow); }
.btn-secondary { background: var(--surface-raised); color: var(--brand); border: 1px solid var(--brand); }
.btn-secondary:hover { background: var(--brand-soft); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--brand); background: var(--brand-soft); }
.btn-lg { padding: 14px 34px; font-size: 1.05rem; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

/* ===== 卡片 ===== */
.card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

/* ===== 顶部 Header ===== */
.top-bar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 64px; padding: 0 24px;
  background: rgba(255,255,255,0.86);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.logo-area { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; color: var(--text); }
.logo-area .logo-dot { color: var(--brand); }
.logo-area .brand-sub {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--brand-dark);
  letter-spacing: 0.01em;
}
.logo-area .brand-logo { display: block; height: 36px; width: auto; }
@media (max-width: 560px) {
  .logo-area .brand-logo { height: 26px; }
  .logo-area .brand-sub { display: none; }
}

/* ===== Hero ===== */
.hero { text-align: center; padding: 88px 24px 64px; }
.hero h1 { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 16px; }
.hero h1 .accent { color: var(--brand); }
.hero .subtitle { font-size: 1.1rem; color: var(--text-muted); max-width: 640px; margin: 0 auto 36px; line-height: 1.8; }

/* ===== 评分体系卡片网格 ===== */
.section { padding: 48px 0 72px; }
.section-title { text-align: center; font-size: 1.6rem; font-weight: 700; margin-bottom: 8px; }
.section-desc { text-align: center; color: var(--text-muted); margin-bottom: 36px; }
.dim-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.dim-card { padding: 24px 26px; }
.dim-card .dim-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dim-card .dim-name { font-size: 1.02rem; font-weight: 700; }
.dim-card .dim-badge { font-size: 0.72rem; font-weight: 600; color: var(--brand); background: var(--brand-soft); border-radius: 100px; padding: 3px 12px; }
.dim-card .sub-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.dim-card .sub-list li {
  font-size: 0.82rem; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 100px; padding: 5px 14px;
}
.task-group-title {
  grid-column: 1 / -1; font-size: 1.05rem; font-weight: 700; color: var(--brand-dark);
  margin-top: 12px; padding-bottom: 6px; border-bottom: 2px solid var(--brand-soft);
}

/* ===== 页脚 ===== */
.footer {
  text-align: center; padding: 28px 24px; color: var(--text-muted); font-size: 0.82rem;
  border-top: 1px solid rgba(0,0,0,0.06); background: var(--surface-raised);
}

/* 九宫格推到右端、紧邻用户名（用户区不再自动占满左侧空间） */
.top-bar #appSwitcherMount { margin-left: auto; }

/* ===== 头部用户区（各页面共用，SSOAuth.mountUserArea 渲染） ===== */
.user-area { display: flex; align-items: center; gap: 8px; }
.user-area .ua-link {
  font-size: 0.84rem; font-weight: 600; color: var(--text);
  max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-area .ua-link:hover { color: var(--brand); }
.user-area .user-nickname {
  font-size: 0.85rem; font-weight: 600; color: var(--text);
  max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 用户名 + 下拉菜单（与总站一致：头像圆 + 昵称 + ▾，菜单含退出） */
.ua-user { position: relative; }
.ua-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: none; cursor: pointer;
  font-family: inherit; padding: 4px 6px; border-radius: 100px;
}
.ua-trigger:hover { background: var(--surface); }
.ua-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand); color: #fff;
  font-size: 0.85rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.ua-name2 {
  font-size: 0.88rem; font-weight: 600; color: var(--text);
  max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ua-caret { font-size: 0.7rem; color: var(--text-light); }
.ua-menu {
  display: none;
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 148px;
  background: var(--surface-raised);
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden; z-index: 300;
}
.ua-user.open .ua-menu { display: block; }
.ua-menu a, .ua-menu button {
  display: block; width: 100%; text-align: left;
  padding: 10px 16px; font-size: 0.86rem; font-family: inherit;
  color: var(--text); background: none; border: none; cursor: pointer;
}
.ua-menu a:hover, .ua-menu button:hover { background: var(--surface); }
.ua-menu button { color: var(--danger); }

@media (max-width: 768px) {
  .dim-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.9rem; }
}
