:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --orange: #f97316;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e5e9f2;
  --green: #16a34a;
  --red: #dc2626;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* 顶部 */
.hero { margin-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  flex: 0 0 auto;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--orange));
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 1px;
}
.hero h1 { font-size: 20px; font-weight: 700; }
.hero p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.hl { color: var(--blue); font-weight: 600; }

/* 提示条 */
.alert {
  display: flex; gap: 10px;
  padding: 13px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  border: 1px solid;
}
.alert .dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; }
.alert.success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert.success .dot { background: var(--green); }
.alert.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert.error .dot { background: var(--red); }

/* 卡片 */
.card {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.08);
  margin-bottom: 16px;
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 7px;
}
.req { color: var(--red); }
.opt { color: var(--muted); font-weight: 400; font-size: 12px; }

input[type="text"], select, textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 15px;
  background: #fbfcfe;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  background: #fff;
}
textarea { resize: vertical; }

.host-row { display: flex; gap: 8px; align-items: stretch; }
.host-row input { flex: 1; min-width: 0; }
.suffix {
  flex: 0 0 auto;
  display: flex; align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

.btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.btn:hover { opacity: .93; }
.btn:active { transform: scale(.99); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* 规则 */
.rules h2 { font-size: 15px; margin-bottom: 10px; }
.rules ul { list-style: none; }
.rules li {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 0 6px 18px;
  position: relative;
}
.rules li::before {
  content: "";
  position: absolute;
  left: 2px; top: 14px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--orange);
}

.foot {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

/* 顶栏用户区 */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.userbar { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.uname {
  font-size: 13px;
  color: var(--text);
  background: #f1f5f9;
  border-radius: 9px;
  padding: 5px 11px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.logout { font-size: 13px; color: var(--blue); text-decoration: none; }
.logout:hover { text-decoration: underline; }

/* 登录/注册底部链接 */
.alt {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
}
.alt a { color: var(--blue); text-decoration: none; }
.alt a:hover { text-decoration: underline; }
