/* 星河 AI — 账号中心（深色简洁，参考结构不照搬） */
.xh-account-center {
  position: fixed;
  inset: 0;
  z-index: 12050;
  display: none;
}

.xh-account-center.is-open {
  display: block;
}

.xh-ac-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 14, 0.45);
  backdrop-filter: blur(2px);
}

.xh-ac-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(360px, calc(100vw - 24px));
  max-height: min(560px, calc(100vh - 24px));
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(180deg, rgba(22, 26, 40, 0.98), rgba(14, 16, 28, 0.98));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  color: #f5f7fb;
  padding: 16px;
}

.xh-ac-panel.is-anchored {
  transform: none;
}

.xh-ac-head,
.xh-ac-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.xh-ac-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.xh-ac-avatar,
.xh-ac-profile-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7b4be8, #6c9af6);
  color: #fff;
  font-weight: 800;
  flex: 0 0 auto;
}

.xh-ac-profile-avatar {
  width: 72px;
  height: 72px;
  font-size: 28px;
  margin: 4px auto 12px;
}

.xh-ac-avatar img,
.xh-ac-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.xh-ac-user-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.xh-ac-user-meta strong,
.xh-ac-subhead h3 {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xh-ac-user-meta span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.48);
}

.xh-ac-link {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  padding: 4px 0;
}

.xh-ac-link.accent {
  color: #c4b5fd;
}

.xh-ac-link:hover {
  color: #fff;
}

.xh-ac-back {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.xh-ac-card {
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(123, 75, 232, 0.18), rgba(108, 154, 246, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.xh-ac-card.solid {
  background: rgba(255, 255, 255, 0.04);
}

.xh-ac-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  margin-bottom: 8px;
}

.xh-ac-card-metric {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.xh-ac-card-metric strong {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
}

.xh-ac-card-metric span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 13px;
}

.xh-ac-list {
  display: grid;
  gap: 2px;
}

.xh-ac-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: #f5f7fb;
  text-align: left;
  padding: 12px 8px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
}

.xh-ac-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.xh-ac-item > i:first-child {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.82);
}

.xh-ac-item-label {
  font-weight: 650;
}

.xh-ac-item-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.42);
  justify-self: end;
}

.xh-ac-chevron {
  color: rgba(255, 255, 255, 0.35);
  font-size: 18px;
}

.xh-ac-body {
  display: grid;
  gap: 12px;
}

.xh-ac-hint {
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.48);
  text-align: center;
}

.xh-ac-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.48);
  font-weight: 700;
}

.xh-ac-field-value {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
}

.xh-ac-form label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 700;
}

.xh-ac-form input {
  width: 100%;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 10, 18, 0.85);
  color: #fff;
  padding: 0 12px;
  outline: none;
}

.xh-ac-form input:focus {
  border-color: rgba(123, 75, 232, 0.55);
}

.xh-ac-form input[readonly] {
  opacity: 0.72;
  cursor: not-allowed;
}

.xh-ac-form-msg {
  min-height: 18px;
  font-size: 12px;
  color: #fbbf24;
}

.xh-ac-form-msg.is-ok {
  color: #86efac;
}

.xh-ac-primary {
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, #7b4be8, #6c9af6);
}

.xh-ac-placeholder {
  text-align: center;
  padding: 28px 8px 18px;
  color: rgba(255, 255, 255, 0.58);
}

.xh-ac-placeholder i {
  font-size: 36px;
  color: #a78bfa;
  display: block;
  margin-bottom: 10px;
}

.xh-ac-placeholder strong {
  display: block;
  color: #fff;
  margin-bottom: 8px;
  font-size: 15px;
}

.xh-ac-placeholder p {
  font-size: 13px;
  line-height: 1.6;
}

.xh-ac-about strong {
  display: block;
  font-size: 18px;
  margin-bottom: 6px;
}

.xh-ac-about p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  margin-bottom: 14px;
}

.xh-ac-about ul {
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}

.xh-auth-extra {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}

.xh-auth-forgot {
  border: 0;
  background: transparent;
  color: rgba(255, 209, 92, 0.85);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.xh-auth-forgot:hover {
  color: #ffd15c;
  text-decoration: underline;
}

@media (max-width: 720px) {
  .xh-ac-panel,
  .xh-ac-panel.is-anchored {
    left: 12px !important;
    right: 12px;
    top: auto !important;
    bottom: 12px;
    width: auto !important;
    transform: none;
    max-height: min(78vh, 560px);
  }
}
