:root {
  --bg: #070918;
  --bg-2: #0e1130;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-2: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.13);
  --text: #edf0ff;
  --muted: #9aa2cc;
  --cyan: #3ee6ff;
  --pink: #ff5fbf;
  --gold: #ffd166;
  --green: #45e6a8;
  --red: #ff6161;
  --violet: #a06bff;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(1100px 700px at 12% -8%, rgba(62, 230, 255, 0.16), transparent 62%),
    radial-gradient(900px 620px at 92% 6%, rgba(255, 95, 191, 0.15), transparent 60%),
    radial-gradient(900px 700px at 50% 110%, rgba(160, 107, 255, 0.14), transparent 62%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 30%, #000 10%, transparent 78%);
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 22px 18px calc(28px + env(safe-area-inset-bottom));
}

h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: 0.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  padding: 14px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.2s ease, border-color 0.2s ease;
  backdrop-filter: blur(10px);
}
.btn:active { transform: scale(0.97); }
.btn:hover { background: var(--panel-2); }

.btn-primary {
  border: none;
  background: linear-gradient(120deg, var(--cyan), var(--violet) 55%, var(--pink));
  color: #080a18;
  box-shadow: 0 12px 34px rgba(62, 230, 255, 0.28), 0 4px 18px rgba(255, 95, 191, 0.22);
}
.btn-primary:hover { filter: brightness(1.06); }

.btn-block { width: 100%; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  padding: 10px 18px;
}

.btn-danger { border-color: rgba(255, 97, 97, 0.5); color: #ffb3b3; }

/* ---------- 输入 ---------- */
.input {
  width: 100%;
  padding: 16px 18px;
  font-size: 17px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input::placeholder { color: rgba(154, 162, 204, 0.65); }
.input:focus {
  border-color: rgba(62, 230, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(62, 230, 255, 0.12);
}

textarea.input { resize: none; line-height: 1.65; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  backdrop-filter: blur(14px);
}

/* ---------- 徽标 / 药丸 ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  color: var(--muted);
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(69, 230, 168, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(69, 230, 168, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(69, 230, 168, 0); }
  100% { box-shadow: 0 0 0 0 rgba(69, 230, 168, 0); }
}

/* ---------- 头像圆点 ---------- */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 17px;
  color: #0a0c1c;
  flex: 0 0 auto;
}

/* ---------- 遮罩弹层 ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 6, 16, 0.82);
  backdrop-filter: blur(8px);
}
.overlay.show { display: flex; animation: fadeIn 0.24s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.overlay-card {
  width: 100%;
  max-width: 460px;
  background: linear-gradient(180deg, rgba(26, 30, 62, 0.96), rgba(14, 17, 40, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  padding: 26px 22px;
  box-shadow: var(--shadow);
  animation: pop 0.3s cubic-bezier(0.2, 1.1, 0.4, 1);
  max-height: 88vh;
  overflow-y: auto;
}
@keyframes pop {
  from { transform: translateY(18px) scale(0.96); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* ---------- 提示条 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translate(-50%, 14px);
  background: rgba(12, 15, 34, 0.95);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 90;
  max-width: 86vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); border-radius: 99px; }
