/* ==========================================================================
 * auth.css — 登录 / 注册弹窗 + 右上角账号信息
 * 深色底 + 主色渐变按钮，登录/注册弹窗的样式。
 * ========================================================================== */

html.auth-open { overflow: hidden; }

.auth {
  position: fixed; inset: 0; z-index: 9000;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.auth.is-on { display: flex; }

.auth__mask {
  position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% 0%, rgba(28, 28, 34, .92), rgba(6, 6, 8, .96));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.auth__box {
  position: relative;
  width: min(420px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 36px 26px 26px;
  border-radius: 22px;
  background: linear-gradient(180deg, #111113 0%, #0B0B0D 100%);
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  color: #fff;
  animation: authIn .22s ease-out;
}
@keyframes authIn {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.auth__close {
  position: absolute; right: 14px; top: 14px;
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 0; border-radius: 12px; cursor: pointer;
  background: rgba(255, 255, 255, .07); color: #9a9aa2;
  transition: background .16s, color .16s;
}
.auth__close:hover { background: rgba(255, 255, 255, .13); color: #fff; }
.auth__close svg { width: 16px; height: 16px; }

.auth__brand {
  text-align: center;
  font-size: 30px; font-weight: 800; letter-spacing: .4px;
  line-height: 1.1; margin-bottom: 14px;
}
.auth__stat { text-align: center; margin-bottom: 26px; }
.auth__stat b {
  display: block; font-size: 40px; font-weight: 800; line-height: 1.05;
  font-variant-numeric: tabular-nums; letter-spacing: -.5px;
}
.auth__stat span { display: block; margin-top: 4px; font-size: 13px; color: #8b8b93; }

.auth__form { display: none; }
.auth__form.is-on { display: block; }

.auth__f { display: block; margin-bottom: 16px; }
.auth__f > span {
  display: block; margin-bottom: 8px;
  font-size: 13px; font-weight: 600; color: #a2a2aa;
}

.auth__inp {
  width: 100%; height: 54px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid #26262b;
  background: #131315;
  color: #fff; font-size: 15px;
  font-family: inherit;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.auth__inp::placeholder { color: #55555e; }
.auth__inp:focus {
  outline: none; background: #17171a;
  border-color: var(--primary, #12B5CB);
  box-shadow: 0 0 0 3px rgba(18, 181, 203, .16);
}

.auth__pwd { position: relative; display: block; }
.auth__pwd .auth__inp { padding-right: 54px; }
.auth__eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 10px; background: none;
  color: #8b8b93; cursor: pointer;
  transition: color .16s, background .16s;
}
.auth__eye:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.auth__eye svg { width: 20px; height: 20px; }

.auth__err {
  min-height: 18px; margin: 2px 0 12px;
  font-size: 13px; color: #ff6b5e;
  opacity: 0; transition: opacity .16s;
}
.auth__err.is-on { opacity: 1; }

.auth__submit {
  width: 100%; height: 54px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--primary, #12B5CB);
  color: #fff; font-size: 16px; font-weight: 700;
  font-family: inherit;
  transition: filter .16s, transform .12s;
}
.auth__submit:hover { filter: brightness(1.07); }
.auth__submit:active { transform: scale(.99); }

.auth__link {
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--primary, #12B5CB); font: inherit; font-size: 14px; font-weight: 600;
}
.auth__link:hover { text-decoration: underline; }
.auth__link--blk { display: block; width: 100%; margin-top: 18px; text-align: center; font-size: 15px; }

.auth__sep { height: 1px; background: rgba(255, 255, 255, .08); margin: 22px 0 16px; }
.auth__foot { text-align: center; font-size: 14px; color: #a2a2aa; margin: 0; }

/* 18 岁确认勾选 */
.auth__agree {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 4px 0 16px;
  font-size: 12.5px; line-height: 1.5; color: #9a9aa2;
  cursor: pointer;
}
/* 勾选框视觉上由后面的 <i> 承担，但保留 1px 尺寸让键盘与读屏仍能拿到焦点 */
.auth__agree input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.auth__agree i {
  flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px;
  border-radius: 5px; border: 1.5px solid #3a3a42; background: #131315;
  position: relative; transition: background .16s, border-color .16s;
}
.auth__agree input:checked + i {
  background: var(--primary, #12B5CB); border-color: var(--primary, #12B5CB);
}
.auth__agree input:checked + i::after {
  content: ''; position: absolute; left: 5px; top: 2px;
  width: 4px; height: 8px;
  border: 2px solid #fff; border-top: 0; border-left: 0;
  transform: rotate(42deg);
}
.auth__agree input:focus-visible + i { box-shadow: 0 0 0 3px rgba(18, 181, 203, .22); }

/* 轻提示 */
.auth__toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 16px);
  z-index: 9200;
  padding: 12px 20px; border-radius: 999px;
  background: rgba(20, 20, 24, .96);
  border: 1px solid rgba(255, 255, 255, .1);
  color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: 0 16px 44px rgba(0, 0, 0, .5);
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.auth__toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ================= 右上角账号信息 ================= */
.uchip {
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
.uchip__btn {
  height: 36px; padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px; background: rgba(255, 255, 255, .06);
  color: #fff; font: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background .16s, border-color .16s;
}
.uchip__btn:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); }

.uchip__ava {
  width: 30px; height: 30px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary, #12B5CB), var(--primary2, #5B6BF5));
  color: #fff; font-size: 13px; font-weight: 800;
}
.uchip__name { font-size: 13px; font-weight: 700; color: #fff; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
/* 钻石余额 = 充值入口：做成按钮，hover 时右侧冒出一个「+」提示可点 */
.uchip__dia {
  position: relative;
  display: inline-flex; align-items: center; gap: 4px;
  height: 28px; padding: 0 10px;
  border: 1px solid rgba(18, 181, 203, .28);
  border-radius: 999px;
  background: rgba(18, 181, 203, .14);
  color: #FFB27A; font: inherit; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: background .16s, border-color .16s, color .16s;
}
.uchip__dia:hover { background: rgba(18, 181, 203, .26); border-color: rgba(18, 181, 203, .55); color: #FFD3B4; }
.uchip__dia svg { width: 14px; height: 14px; }
.uchip__dia b { font-variant-numeric: tabular-nums; }
.uchip__dia b::after {
  content: '+'; margin-left: 3px; font-weight: 800;
  opacity: .55; transition: opacity .16s;
}
.uchip__dia:hover b::after { opacity: 1; }
.uchip__out {
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .07);
  color: #9a9aa2; cursor: pointer; transition: color .16s, background .16s;
}
.uchip__out:hover { color: #fff; background: rgba(255, 255, 255, .14); }
.uchip__out svg { width: 15px; height: 15px; }

/* ================= 移动端：整屏弹层 ================= */
@media (max-width: 560px) {
  .auth { padding: 0; align-items: stretch; }
  .auth__box {
    width: 100%; max-height: none; height: 100%;
    border: 0; border-radius: 0;
    padding: 52px 22px 28px;
    animation: none;
  }
  .auth__brand { font-size: 27px; }
  .auth__stat b { font-size: 36px; }
  .auth__close { right: 12px; top: 12px; }
  .uchip__name { display: none; }
}
