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

:root {
  --brand: #12b7f5;      /* 主色 */
  --brand-2: #2ea9ff;    /* 辅助 */
  --qq: #12b7f5;         /* QQ 品牌蓝 */
  --bg: #f4f7fa;
  --card: #ffffff;
  --text: #2b3440;
  --muted: #8a97a5;
  --line: #e6ecf2;
  --side: 20px;
}

html, body { height: 100%; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding-left: var(--side); padding-right: var(--side); }

/* 顶栏 */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-weight: 700; font-size: 20px;
  display: inline-flex; align-items: center; justify-content: center;
}
.brand-name { font-size: 18px; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.avatar-sm { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; display: inline-block; }
.avatar-sm img { width: 100%; height: 100%; object-fit: cover; display: block; }
.link { color: var(--brand-2); text-decoration: none; font-size: 14px; }

/* 主体 */
.main { flex: 1; padding-top: 34px; padding-bottom: 40px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px 28px;
}

.hero {
  display: flex; flex-wrap: wrap; gap: 24px;
  align-items: center; justify-content: space-between;
}
.hero-text { flex: 1 1 320px; }
.hero-text h1 { font-size: 32px; margin-bottom: 10px; }
.slogan { font-size: 17px; color: var(--brand-2); margin-bottom: 8px; font-weight: 600; }
.desc { color: var(--muted); line-height: 1.7; }
.hero-actions { flex: 1 1 260px; display: flex; flex-direction: column; align-items: stretch; gap: 12px; }

/* QQ 登录按钮 */
.qq-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 22px;
  background: var(--qq); color: #fff; font-size: 16px; font-weight: 600;
  border: none; border-radius: 25px; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease; cursor: pointer;
  box-shadow: 0 8px 18px rgba(18,183,245,.28);
}
.qq-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 22px rgba(18,183,245,.36); }
.qq-ic {
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; position: relative; flex: 0 0 auto;
}
.qq-ic::after { content: ""; position: absolute; left: 7px; top: 10px; width: 8px; height: 8px; background: var(--qq); border-radius: 50%; }
.tip { font-size: 12px; color: var(--muted); text-align: center; }

/* 已登录 */
.welcome { text-align: center; }
.avatar-lg { width: 84px; height: 84px; border-radius: 20px; object-fit: cover; box-shadow: 0 8px 18px rgba(0,0,0,.12); }
.hi { margin: 14px 0; font-size: 16px; }
.btn {
  display: inline-block; height: 44px; line-height: 44px; padding: 0 24px;
  border-radius: 22px; text-decoration: none; font-size: 14px; font-weight: 600;
}
.btn-primary { background: var(--brand-2); color: #fff; }
.btn-primary:hover { opacity: .92; }

.notice { font-size: 13px; padding: 12px 14px; border-radius: 10px; line-height: 1.6; }
.notice.warn { background: #fff7e6; border: 1px solid #ffe3a3; color: #8a5a00; }
.notice code { background: rgba(255,255,255,.7); padding: 2px 6px; border-radius: 6px; }

/* 栏目 */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 22px; }
.feature h3 { font-size: 17px; margin-bottom: 8px; color: var(--text); }
.feature p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.feature { transition: transform .12s ease; }
.feature:hover { transform: translateY(-2px); }

/* 页脚 */
.footer { border-top: 1px solid var(--line); background: var(--card); padding: 20px 0; margin-top: auto; }
.footer p { font-size: 13px; color: var(--muted); text-align: center; line-height: 1.9; }
.footer a { color: var(--muted); text-decoration: none; }

@media (max-width: 520px) {
  .hero-text h1 { font-size: 26px; }
  .card { padding: 22px 18px; }
}

/* ===== 登录页 ===== */
.login-body { background: linear-gradient(180deg, #f0f6fc 0%, #e7eef6 100%); }
.login-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 40px 16px;
}
.login-card {
  width: 100%; max-width: 380px; background: var(--card);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 34px 30px 30px;
  box-shadow: 0 16px 40px rgba(31, 58, 94, .08);
}
.login-brand { display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; color: var(--text); }
.login-name { font-size: 20px; font-weight: 700; }
.login-sub { text-align: center; color: var(--muted); font-size: 13px; margin: 8px 0 22px; }
.login-error {
  background: #fdecec; border: 1px solid #f6c6c6; color: #b3261e;
  font-size: 13px; padding: 10px 12px; border-radius: 8px; margin-bottom: 16px;
}
.login-form { display: flex; flex-direction: column; gap: 14px; }
.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; height: 46px; padding: 0 14px; font-size: 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fafcfe; color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field input::placeholder { color: #b6c2cf; }
.field input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(46,169,255,.14); background: #fff; }
.btn-block { width: 100%; border: none; cursor: pointer; margin-top: 4px; }
.divider { display: flex; align-items: center; gap: 10px; margin: 20px 0; color: var(--muted); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.qq-btn { width: 100%; }

/* 本地账号无头像时显示字母占位 */
.avatar-ph, .avatar-ph-lg {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-weight: 600;
}
.avatar-ph { width: 100%; height: 100%; font-size: 15px; }
.avatar-ph-lg { width: 84px; height: 84px; border-radius: 20px; font-size: 28px; box-shadow: 0 8px 18px rgba(0,0,0,.12); }