/* ==========================================================================
   静听 · 登录 / 注册页（汽水音乐风格）
   白底黑字、柠檬绿点缀、大圆角输入框与胶囊按钮
   ========================================================================== */

:root {
  --bg: #ffffff;
  --ink: #111111;
  --ink-2: #3d3d3d;
  --muted: #8b8b8b;
  --line: #ececec;
  --soft: #f5f5f5;
  --accent: #c9f45c;
  --danger: #ff3b5c;
  --radius: 18px;
  --radius-sm: 14px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(28px + env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom));
  min-height: 100dvh;
}

/* 顶部一抹柠檬绿光，呼应站内高亮色 */
body::before {
  content: "";
  position: fixed;
  top: -180px;
  left: 50%;
  width: 420px;
  height: 320px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(201, 244, 92, 0.55) 0%, rgba(201, 244, 92, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* ---------------------------------------------------------------- 容器 */
.auth-window {
  position: relative;
  z-index: 1;
  width: min(400px, 100%);
  padding: 4px 2px;
  animation: auth-in 0.24s ease-out;
}

@keyframes auth-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------- 品牌 */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 34px;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--accent);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

.auth-brand-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ---------------------------------------------------------------- 标题 */
.auth-title {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.auth-sub {
  margin: 0 0 30px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------------------------------------------------------------- 表单 */
.auth-form {
  display: block;
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field > span {
  display: block;
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}

.field input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  font-size: 16px; /* 16px 避免 iOS 聚焦自动放大 */
  font-family: var(--font);
  color: var(--ink);
  background: var(--soft);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  outline: none;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  -webkit-appearance: none;
  appearance: none;
}

.field input::placeholder {
  color: #b3b3b3;
}

.field input:focus {
  background: #fff;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.06);
}

.auth-error {
  margin: 0 0 14px;
  padding: 11px 14px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--danger);
  background: #fff1f3;
  border-radius: 12px;
}

.auth-submit {
  width: 100%;
  height: 52px;
  margin-top: 6px;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.18s ease, background 0.18s ease;
}

.auth-submit:active:not(:disabled) {
  transform: scale(0.985);
  background: #000;
}

.auth-submit:disabled {
  opacity: 0.55;
  cursor: default;
}

/* ---------------------------------------------------------------- 辅助 */
.auth-hint {
  margin: 34px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--muted);
}

.auth-hint b {
  color: var(--ink-2);
  font-weight: 600;
}

/* 移动端：贴近顶部，留出键盘空间 */
@media (max-width: 420px) {
  body {
    align-items: flex-start;
    padding-top: calc(64px + env(safe-area-inset-top));
  }
  .auth-brand { margin-bottom: 28px; }
  .auth-title { font-size: 27px; }
}

/* 矮屏（横屏 / 小屏笔记本）压缩留白 */
@media (max-height: 620px) {
  body { align-items: flex-start; padding-top: calc(24px + env(safe-area-inset-top)); }
  .auth-brand { margin-bottom: 20px; }
  .auth-sub { margin-bottom: 20px; }
  .auth-hint { margin-top: 20px; }
}
