/* 账号中心 · 样式
   只覆盖这一页需要的东西，变量和顶栏都从 ../assets/style.css 来。 */

/* ---------- 顶栏里的返回 ---------- */
.acc-back{
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 7px 13px 7px 9px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.acc-back svg{ width: 14px; height: 14px; flex: none; opacity: .65; }
.acc-back:hover{ color: var(--text); border-color: var(--border-hover); }

/* ---------- 主区 ---------- */
.acc{
  flex: 1 0 auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 64px;
  padding-bottom: 80px;
}

.acc-card{
  width: 100%;
  max-width: 420px;
  padding: 34px 30px 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-2);
}

.acc-card__head{ margin-bottom: 24px; }

.acc-title{
  margin: 0 0 9px;
  font-size: 24px;
  font-weight: 680;
  letter-spacing: -.4px;
  line-height: 1.25;
}

.acc-lead{
  margin: 0;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ---------- 注册 / 登录 切换 ---------- */
.acc-tabs{
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 22px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
}

.acc-tab{
  flex: 1;
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease);
}
.acc-tab:hover{ color: var(--text); }
.acc-tab.is-on{
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-1);
}
.acc-tab:focus-visible{ outline: 2px solid var(--accent); outline-offset: 1px; }

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

/* hidden 属性得压得住 display:block，否则三个屏会一起露出来 */
.acc-card [hidden]{ display: none !important; }

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

.acc-field__name{
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  color: var(--text-dim);
}

.acc-input{
  width: 100%;
  height: 46px;
  padding: 0 13px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
}
.acc-input::placeholder{ color: var(--text-mute); }
.acc-input:focus{
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.acc-input.is-bad{
  border-color: #c0453c;
  box-shadow: 0 0 0 3px rgba(192,69,60,.10);
}

/* ---------- 密码可见 ----------
   眼睛按钮压在输入框右侧，输入框留出位置，别让字跑到图标底下。 */
.acc-pw{ display: block; position: relative; }
.acc-pw .acc-input{ padding-right: 46px; }

/* Edge / IE 自带的那只眼睛要关掉，不然框里会长出两只。 */
.acc-pw .acc-input::-ms-reveal,
.acc-pw .acc-input::-ms-clear{ display: none; }

.acc-eye{
  position: absolute;
  top: 50%;
  right: 5px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-mute);
  cursor: pointer;
  transition: color .16s var(--ease), background .16s var(--ease);
}
.acc-eye svg{ width: 18px; height: 18px; display: block; }
/* 用两根类选择 .acc-eye svg 压得住（单独一根类会被上面那条盖掉，两只眼并排出现） */
.acc-eye svg.acc-eye__on{ display: none; }
.acc-eye.is-on{ color: var(--text-dim); }
.acc-eye.is-on svg.acc-eye__on{ display: block; }
.acc-eye.is-on svg.acc-eye__off{ display: none; }
.acc-eye:hover{ color: var(--text); background: var(--border-soft); }
.acc-eye:focus-visible{ outline: 2px solid var(--accent); outline-offset: 1px; }

.acc-submit{
  width: 100%;
  height: 47px;
  margin-top: 8px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: .5px;
  cursor: pointer;
  transition: filter .16s var(--ease), transform .16s var(--ease);
}
.acc-submit:hover{ filter: brightness(1.06); }
.acc-submit:active{ transform: translateY(1px); }
.acc-submit:disabled{ opacity: .55; cursor: default; transform: none; }
.acc-submit:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }

.acc-msg{
  min-height: 20px;
  margin: 14px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-mute);
}
.acc-msg.is-bad{ color: #b8433a; }
.acc-msg.is-ok{ color: #2e7d62; }
html[data-theme="dark"] .acc-msg.is-bad{ color: #e88b81; }
html[data-theme="dark"] .acc-msg.is-ok{ color: #6fc39c; }

/* ---------- 已经登录 ---------- */
.acc-hi{
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--text-mute);
}

.acc-nick{
  margin: 0 0 4px;
  font-size: 26px;
  font-weight: 680;
  letter-spacing: -.4px;
  line-height: 1.3;
  word-break: break-word;
}

.acc-submit--link{
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  text-decoration: none;
}

.acc-ops{
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}

.acc-op{
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-mute);
  font: inherit;
  font-size: 13.5px;
  line-height: 1;
  cursor: pointer;
  transition: color .16s var(--ease), background .16s var(--ease);
}
.acc-op:hover{ color: var(--text); background: var(--border-soft); }
.acc-op:focus-visible{ outline: 2px solid var(--accent); outline-offset: 1px; }

.acc-op--block{
  display: block;
  width: 100%;
  margin-top: 10px;
  height: 40px;
}

/* 改昵称 / 改密码这两个屏，标题跟卡片头一样收着 */
.acc-panel .acc-card__head{ margin-bottom: 18px; }
.acc-panel .acc-title{ font-size: 21px; }

/* ---------- 响应式 ---------- */
@media (max-width: 640px){
  .acc{ padding-top: 34px; padding-bottom: 48px; }
  .acc-card{ padding: 26px 20px 24px; border-radius: 14px; }
  .acc-title{ font-size: 21px; }
}
