/* ===========================================================
   account.css —— 登录胶囊 / 登录弹窗 / 排行榜
   三个页面（首页、贪吃蛇、拾荒）共用，所以这里不假设 site.css 一定加载了：
   统一走 --lc-* 变量，优先用全站变量，取不到再用同款兜底值。
   =========================================================== */
:root {
  --lc-violet: var(--violet, #a778ff);
  --lc-magenta: var(--magenta, #ff5cc8);
  --lc-pink: var(--pink, #ff9ad9);
  --lc-text: var(--text, #f7ecff);
  --lc-dim: var(--text-dim, #c4aee0);
  --lc-mute: var(--text-mute, #8d78ac);
  --lc-line: var(--glass-line, rgba(255, 255, 255, .13));
  --lc-soft: var(--border-soft, rgba(214, 150, 255, .16));
  --lc-blur: var(--glass-blur, blur(18px) saturate(160%));
  --lc-fill: var(--glass-fill, linear-gradient(158deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .022) 46%, rgba(167, 120, 255, .07)));
  --lc-shadow: var(--glass-shadow, 0 18px 44px -22px rgba(0, 0, 0, .92), inset 0 1px 0 rgba(255, 255, 255, .09));
  --lc-pop: var(--ease-pop, cubic-bezier(.34, 1.56, .64, 1));
  --lc-radius: var(--radius, 20px);
}

/* ---------- 登录状态小胶囊 ---------- */
/* z-index 要高过游戏页的全屏开始菜单（overlay 是 10），否则开局前根本点不到登录 */
.lc-bar { display: flex; justify-content: center; gap: 8px; position: relative; z-index: 20; }
.lc-bar:empty { display: none; }

.lc-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 210px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--lc-line);
  background: var(--lc-fill), rgba(255, 255, 255, .035);
  -webkit-backdrop-filter: var(--lc-blur);
  backdrop-filter: var(--lc-blur);
  color: var(--lc-dim);
  font-family: inherit;
  font-size: 13.5px;
  cursor: pointer;
  box-shadow: var(--lc-shadow);
  transition: transform .34s var(--lc-pop), color .2s, border-color .2s, box-shadow .25s;
}
.lc-chip:hover {
  color: var(--lc-text);
  border-color: rgba(255, 154, 217, .5);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 16px 32px -18px rgba(255, 92, 200, .9);
}
.lc-chip:active { transform: scale(.97); transition-duration: .12s; }
.lc-chip .lc-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 弹窗 ---------- */
.lc-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 3, 18, .72);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  animation: lc-fade .18s ease;
}
@keyframes lc-fade { from { opacity: 0; } }
.lc-modal[hidden] { display: none; }
.lc-modal-card {
  width: min(440px, 100%);
  max-height: min(88vh, 88dvh);
  overflow: auto;
  padding: 22px;
  border-radius: var(--lc-radius);
  border: 1px solid var(--lc-line);
  background: var(--lc-fill), rgba(26, 12, 44, .78);
  -webkit-backdrop-filter: var(--lc-blur);
  backdrop-filter: var(--lc-blur);
  box-shadow: 0 30px 70px -30px rgba(255, 92, 200, .6), var(--lc-shadow);
  color: var(--lc-text);
  animation: lc-rise .24s cubic-bezier(.2, 1.3, .4, 1);
}
@keyframes lc-rise { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.lc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.lc-modal-head h3 { font-size: 18px; }
.lc-close {
  width: 32px; height: 32px;
  border-radius: 11px;
  border: 1px solid var(--lc-line);
  background: var(--lc-fill), rgba(255, 255, 255, .03);
  color: var(--lc-dim);
  font-size: 15px;
  cursor: pointer;
  transition: transform .3s var(--lc-pop), color .15s, border-color .15s;
}
.lc-close:hover { color: var(--lc-text); border-color: var(--lc-pink); transform: scale(1.08); }

.lc-lead { color: var(--lc-dim); font-size: 14px; line-height: 1.7; margin-bottom: 12px; }
.lc-dim { color: var(--lc-mute); }
.lc-warn { color: #ff8fb8; }

.lc-field { display: grid; gap: 6px; font-size: 13px; color: var(--lc-mute); }
.lc-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--lc-line);
  background: rgba(12, 5, 24, .55);
  color: var(--lc-text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color .2s, box-shadow .2s;
}
.lc-input::placeholder { color: #6d5c85; }
.lc-input:focus {
  outline: none;
  border-color: rgba(255, 154, 217, .6);
  box-shadow: 0 0 0 3px rgba(255, 92, 200, .18);
}
.lc-code { letter-spacing: 8px; font-size: 20px; text-align: center; font-family: var(--mono, monospace); }

.lc-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--lc-dim);
  background: rgba(167, 120, 255, .1);
  border: 1px solid rgba(167, 120, 255, .22);
}
.lc-note:empty { display: none; }
.lc-note.is-warn {
  color: #ffc2da;
  background: rgba(255, 92, 200, .12);
  border-color: rgba(255, 92, 200, .35);
}
.lc-devcode { color: var(--lc-pink); font-family: var(--mono, monospace); letter-spacing: 2px; }

.lc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.lc-btn {
  flex: 1 1 auto;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--lc-line);
  background: var(--lc-fill), rgba(255, 255, 255, .04);
  color: var(--lc-text);
  font-family: inherit;
  font-size: 14.5px;
  cursor: pointer;
  transition: transform .34s var(--lc-pop), filter .18s, box-shadow .25s, border-color .2s;
}
.lc-btn:hover:not(:disabled) { transform: translateY(-2px) scale(1.04); border-color: rgba(255, 154, 217, .5); }
.lc-btn:active:not(:disabled) { transform: scale(.97); transition-duration: .12s; }
.lc-btn:disabled { opacity: .55; cursor: not-allowed; }
.lc-btn.primary {
  background: linear-gradient(135deg, var(--lc-violet), var(--lc-magenta) 62%, var(--lc-pink));
  border-color: rgba(255, 255, 255, .22);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 16px 34px -16px rgba(255, 92, 200, .95);
}
.lc-btn.ghost { background: transparent; }
.lc-foot { margin-top: 14px; font-size: 12px; color: var(--lc-mute); line-height: 1.7; }
.lc-foot code {
  font-family: var(--mono, monospace);
  color: var(--lc-dim);
  background: rgba(255, 255, 255, .06);
  border-radius: 6px;
  padding: 1px 5px;
}
body.lc-modal-open { overflow: hidden; }

/* ---------- 头像 ---------- */
.lc-avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 17px;
  line-height: 1;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(140deg, rgba(167, 120, 255, .5), rgba(255, 92, 200, .38));
  border: 1px solid rgba(255, 255, 255, .16);
}
.lc-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lc-avatar.is-empty { font-size: 13px; font-weight: 700; }
.lc-avatar.is-xs,
.lc-avatar.is-sm { width: 22px; height: 22px; font-size: 12px; }
.lc-avatar.is-xs.is-empty, .lc-avatar.is-sm.is-empty { font-size: 11px; }
.lc-avatar.is-lg { width: 52px; height: 52px; font-size: 27px; }

/* ---------- 账号面板 ---------- */
.lc-me {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--lc-soft);
}
.lc-me-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.lc-me-text b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-me-text span { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-btn-sm { flex: none; padding: 7px 14px; font-size: 13px; }
.lc-grow { flex: 1; min-width: 0; }

/* ---------- 改昵称 / 换头像 ---------- */
.lc-edit-top { display: flex; align-items: center; gap: 14px; }
.lc-pick-label { margin: 16px 0 8px; font-size: 12.5px; color: var(--lc-mute); }
.lc-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.lc-pick {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 19px;
  font-family: inherit;
  color: var(--lc-text);
  border-radius: 13px;
  border: 1px solid var(--lc-line);
  background: rgba(255, 255, 255, .04);
  cursor: pointer;
  transition: transform .3s var(--lc-pop), border-color .2s, background .2s, box-shadow .2s;
}
.lc-pick:hover { transform: translateY(-2px) scale(1.08); border-color: rgba(255, 154, 217, .5); }
.lc-pick.is-on {
  border-color: rgba(255, 154, 217, .75);
  background: linear-gradient(140deg, rgba(167, 120, 255, .4), rgba(255, 92, 200, .3));
  box-shadow: 0 0 0 2px rgba(255, 92, 200, .22);
}
.lc-pick.is-upload { width: auto; padding: 0 12px; font-size: 12.5px; color: var(--lc-dim); }
.lc-pick.is-clear { color: var(--lc-mute); font-size: 15px; }

/* ---------- 账号面板（数字块） ---------- */
.lc-account .lc-row-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: var(--lc-mute);
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--lc-soft);
}
.lc-account .lc-row-line b { color: var(--lc-text); font-weight: 600; }
.lc-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.lc-stat {
  display: grid;
  gap: 3px;
  padding: 13px;
  border-radius: 14px;
  border: 1px solid var(--lc-line);
  background: var(--lc-fill), rgba(255, 255, 255, .03);
}
.lc-stat-t { font-size: 12px; color: var(--lc-mute); }
.lc-stat-v {
  font-size: 24px;
  font-weight: 650;
  line-height: 1.2;
  background: linear-gradient(120deg, var(--lc-pink), var(--lc-violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lc-stat-v i { font-size: 12px; font-style: normal; margin-left: 3px; }
.lc-stat-s { font-size: 11.5px; color: var(--lc-mute); }
.lc-mine { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.lc-rank-pill {
  font-size: 12.5px;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--lc-pink);
  background: rgba(255, 92, 200, .12);
  border: 1px solid rgba(255, 122, 217, .3);
}
.lc-rank-pill.is-dim { color: var(--lc-mute); background: rgba(255, 255, 255, .04); border-color: var(--lc-line); }

/* ---------- 轻提示 ---------- */
.lc-toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 70;
  transform: translate(-50%, 14px);
  max-width: min(92vw, 460px);
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  text-align: center;
  border: 1px solid var(--lc-line);
  background: var(--lc-fill), rgba(20, 8, 36, .85);
  -webkit-backdrop-filter: var(--lc-blur);
  backdrop-filter: var(--lc-blur);
  color: var(--lc-text);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .95);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s, transform .28s;
}
.lc-toast.is-in { opacity: 1; transform: translate(-50%, 0); }
.lc-toast.is-ok { border-color: rgba(255, 92, 200, .5); color: var(--lc-pink); }
.lc-toast.is-warn { border-color: rgba(255, 77, 126, .5); color: #ffb3ce; }

/* ---------- 排行榜 ---------- */
.lc-board-loading { color: var(--lc-mute); font-size: 13.5px; padding: 10px 2px; }
.lc-board-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.lc-board-title { font-size: 15px; font-weight: 650; color: var(--lc-text); }
.lc-board-count { font-size: 12px; color: var(--lc-mute); }
.lc-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.lc-tab {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--lc-line);
  background: rgba(255, 255, 255, .03);
  color: var(--lc-dim);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: transform .3s var(--lc-pop), color .2s, border-color .2s, background .2s;
}
.lc-tab:hover { color: var(--lc-text); transform: scale(1.06); }
.lc-tab.is-on {
  color: #fff;
  border-color: rgba(255, 255, 255, .22);
  background: linear-gradient(135deg, var(--lc-violet), var(--lc-magenta));
}
.lc-rows { list-style: none; display: grid; gap: 6px; }
.lc-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 10px;
  padding: 9px 11px;
  border-radius: 13px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, .03);
  transition: transform .3s var(--lc-pop), border-color .2s, background .2s;
}
.lc-row:hover { transform: translateX(3px) scale(1.01); border-color: var(--lc-line); background: rgba(255, 255, 255, .06); }
.lc-row.is-me {
  border-color: rgba(255, 154, 217, .45);
  background: linear-gradient(120deg, rgba(167, 120, 255, .18), rgba(255, 92, 200, .14));
}
.lc-row.is-empty { color: var(--lc-mute); font-size: 13px; grid-template-columns: 1fr; text-align: center; }
.lc-rank {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 9px;
  font-size: 12px;
  font-family: var(--mono, monospace);
  color: var(--lc-dim);
  background: rgba(255, 255, 255, .05);
}
.lc-rank.r1 { background: linear-gradient(140deg, #ffd166, #ff9ad9); color: #3a1030; font-weight: 700; }
.lc-rank.r2 { background: linear-gradient(140deg, #e3c7ff, #b98cff); color: #2a1040; font-weight: 700; }
.lc-rank.r3 { background: linear-gradient(140deg, #ffb3e4, #ff5cc8); color: #3a1030; font-weight: 700; }
.lc-name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: var(--lc-text);
}
.lc-name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-tag-me {
  margin-left: 6px;
  font-style: normal;
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--lc-violet), var(--lc-magenta));
}
.lc-value { font-size: 15px; font-weight: 650; color: var(--lc-pink); font-variant-numeric: tabular-nums; }
.lc-value i { font-size: 11px; font-style: normal; margin-left: 2px; color: var(--lc-mute); font-weight: 400; }
.lc-extra { grid-column: 2 / -1; font-size: 11.5px; color: var(--lc-mute); }

/* 首页的排行榜两栏 */
.boards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 820px) {
  .boards { grid-template-columns: minmax(0, 1fr); }
  .lc-split { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 手机 ---------- */
@media (max-width: 620px) {
  /* 16px 是 iOS 的底线：输入框小于 16px，聚焦时 Safari 会把整页放大 */
  .lc-input { font-size: 16px; min-height: 48px; padding: 12px 14px; }
  .lc-code { font-size: 20px; letter-spacing: 6px; }
  .lc-btn { min-height: 46px; font-size: 15px; }
  .lc-btn-sm { min-height: 38px; font-size: 13px; padding: 8px 13px; }
  .lc-chip { min-height: 40px; padding: 8px 13px; font-size: 13px; }
  .lc-chip .lc-avatar.is-sm { width: 20px; height: 20px; font-size: 11px; }

  /* 弹窗从底部升起，更像手机上的原生弹层 */
  .lc-modal { padding: 12px; align-items: flex-end; }
  .lc-modal-card { padding: 18px; border-radius: 20px; max-height: 90dvh; }
  .lc-modal-head { margin-bottom: 12px; }
  .lc-modal-head h3 { font-size: 17px; }
  .lc-actions { gap: 8px; }
  .lc-actions .lc-btn { flex: 1 1 100%; }

  /* 排行榜：条目更紧凑，指标胶囊做成手指点得中的高度 */
  .lc-board-head { margin-bottom: 10px; }
  .lc-board-title { font-size: 14.5px; }
  .lc-tabs { gap: 6px; margin-bottom: 10px; }
  .lc-tab { min-height: 40px; padding: 9px 13px; font-size: 12.5px; }
  .lc-rows { gap: 5px; }
  .lc-row { padding: 9px 10px; grid-template-columns: 24px minmax(0, 1fr) auto; }
  .lc-rank { width: 22px; height: 22px; font-size: 11.5px; }
  .lc-name { font-size: 13px; gap: 6px; }
  .lc-value { font-size: 14.5px; }
  .lc-extra { font-size: 11px; }

  .lc-me { gap: 10px; padding-bottom: 12px; }
  .lc-avatar.is-lg { width: 46px; height: 46px; font-size: 24px; }
  .lc-me-text b { font-size: 15px; }
  .lc-stat { padding: 11px; }
  .lc-stat-v { font-size: 21px; }
  .lc-picks { gap: 7px; }
  .lc-pick { width: 38px; height: 38px; font-size: 18px; border-radius: 12px; }
  .lc-pick.is-upload { padding: 0 11px; font-size: 12px; }
  .lc-toast { font-size: 13px; padding: 11px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .lc-chip:hover, .lc-btn:hover, .lc-tab:hover, .lc-row:hover, .lc-close:hover { transform: none; }
  .lc-modal, .lc-modal-card { animation: none; }
}
