/* 玩家登录/注册 — 遮罩弹层 + 会员中心 */

body.auth-open {
  overflow: hidden;
}

.auth-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(6, 5, 4, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-sizing: border-box;
}

.auth-mask[hidden] {
  display: none !important;
}

.auth-dialog {
  position: relative;
  width: min(440px, 100%);
  max-height: min(90vh, 920px);
  overflow: auto;
  padding: 2rem 1.75rem 1.75rem;
  background: linear-gradient(165deg, rgba(32, 26, 18, 0.98), rgba(14, 12, 10, 0.99));
  border: 1px solid rgba(184, 137, 60, 0.4);
  border-radius: var(--radius, 6px);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  animation: auth-pop 0.22s ease-out;
}

.auth-dialog.auth-dialog--wide {
  width: min(720px, 100%);
}

@keyframes auth-pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.auth-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  z-index: 2;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  background: transparent;
  color: #a89470;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
}

.auth-close:hover {
  color: #f3df9d;
}

.auth-panel h2 {
  margin: 0.35rem 0 0.5rem;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  color: #f2e6c4;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.auth-panel[hidden] {
  display: none !important;
}

.player-page .head {
  position: sticky;
}

.player-main {
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 7rem 1.25rem 3rem;
}

.player-card {
  width: min(720px, 100%);
  padding: 2rem 1.75rem 1.75rem;
  background: linear-gradient(165deg, rgba(32, 26, 18, 0.96), rgba(14, 12, 10, 0.98));
  border: 1px solid rgba(184, 137, 60, 0.35);
  border-radius: var(--radius, 6px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.player-card h1 {
  margin: 0.35rem 0 0.5rem;
  font-size: clamp(1.6rem, 3vw, 2rem);
  color: #f2e6c4;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.player-lead {
  color: #9a825c;
  margin-bottom: 1.4rem;
  font-size: 0.95rem;
}

.player-err {
  margin-bottom: 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(180, 70, 50, 0.55);
  border-radius: var(--radius, 6px);
  background: rgba(90, 28, 18, 0.35);
  color: #f0c4b0;
  font-size: 0.92rem;
}

.player-form {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.player-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.95rem 1rem;
}

.player-grid--register {
  grid-template-columns: 1fr 1fr;
  gap: 0.95rem 1.25rem;
  align-items: start;
}

.player-col {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  min-width: 0;
}

.player-col--quiz {
  padding-left: 0.15rem;
  border-left: 1px solid rgba(184, 137, 60, 0.16);
  padding-left: 1.1rem;
}

.player-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.player-field--full {
  grid-column: 1 / -1;
}

.player-field span {
  color: #cbb892;
  font-size: 0.86rem;
}

.player-field em {
  color: #b8893c;
  font-style: normal;
  margin-left: 0.25rem;
  font-size: 0.78rem;
}

.player-field input {
  height: 44px;
  padding: 0 0.85rem;
  border: 1px solid #3a3022;
  border-radius: var(--radius, 6px);
  background: #12100d;
  color: #f0dfb0;
  font: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}

.player-field input::placeholder {
  color: rgba(122, 104, 72, 0.42);
  opacity: 1;
}

.player-field input::-webkit-input-placeholder {
  color: rgba(122, 104, 72, 0.42);
}

.player-field input::-moz-placeholder {
  color: rgba(122, 104, 72, 0.42);
  opacity: 1;
}

.player-field textarea::placeholder,
.me-form textarea::placeholder {
  color: rgba(122, 104, 72, 0.42);
  opacity: 1;
}

.player-field textarea::-webkit-input-placeholder,
.me-form textarea::-webkit-input-placeholder {
  color: rgba(122, 104, 72, 0.42);
}

.player-field textarea::-moz-placeholder,
.me-form textarea::-moz-placeholder {
  color: rgba(122, 104, 72, 0.42);
  opacity: 1;
}

.player-field input:focus {
  border-color: #b8893c;
}

.player-submit {
  margin-top: 0.55rem;
  width: 100%;
  min-height: 48px;
  padding: 0.85rem 1.6rem;
  text-align: center;
  border: 1px solid #b8893c;
  border-radius: var(--radius, 6px);
  background: linear-gradient(180deg, #8a6230 0%, #5a3c18 100%);
  color: #fff2d0 !important;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.player-submit:hover {
  background: linear-gradient(180deg, #9c7038 0%, #6a4820 100%);
  color: #fff8e4 !important;
  transform: translateY(-1px);
}

.player-submit:active {
  transform: translateY(0);
}

.player-switch {
  margin-top: 1.25rem;
  text-align: center;
  color: #8a7350;
  font-size: 0.92rem;
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.player-switch a {
  color: #e0c878;
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
}

.player-switch a:hover {
  color: #f3df9d;
}

.player-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1.25rem 0 1.5rem;
}

.player-stats > div {
  padding: 0.85rem 1rem;
  border: 1px solid #2a2318;
  border-radius: var(--radius, 6px);
  background: rgba(0, 0, 0, 0.25);
}

.player-stats .k {
  display: block;
  color: #8a7350;
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
}

.player-stats .v {
  color: #f0dfb0;
  font-size: 1.05rem;
}

.player-h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  color: #e0c878;
  font-weight: 500;
}

.player-chars {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  border: 1px solid #2a2318;
  border-radius: var(--radius, 6px);
  overflow: hidden;
}

.player-chars li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #2a2318;
  color: #cbb892;
}

.player-chars li:last-child {
  border-bottom: 0;
}

.player-chars strong {
  color: #f2e6c4;
  min-width: 6rem;
}

.player-empty {
  color: #8a7350;
  margin-bottom: 1.5rem;
}

.player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.player-note {
  color: #6e5a40;
  font-size: 0.85rem;
}

.player-logout-form {
  display: inline;
  margin: 0 0 0 1.4rem;
}

.nav-text-btn {
  background: none;
  border: 0;
  color: rgba(203, 184, 146, 0.78);
  font: inherit;
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  vertical-align: middle;
}

.nav-text-btn:hover {
  color: #f0dfb0;
}

@media (max-width: 640px) {
  .player-grid,
  .player-grid--register,
  .player-stats {
    grid-template-columns: 1fr;
  }

  .player-col--quiz {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid rgba(184, 137, 60, 0.16);
    padding-top: 0.95rem;
  }

  .player-main {
    padding-top: 5.5rem;
  }
}

/* —— 个人中心 —— */
.me-page {
  position: relative;
  min-height: 100vh;
  background: #0b0a09;
}

.me-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(11, 10, 9, 0.72) 0%, rgba(11, 10, 9, 0.88) 45%, rgba(11, 10, 9, 0.96) 100%),
    linear-gradient(90deg, rgba(11, 10, 9, 0.55) 0%, rgba(11, 10, 9, 0.35) 50%, rgba(11, 10, 9, 0.7) 100%),
    url("/assets/hero-bg.jpg") center 28% / cover no-repeat;
  opacity: 1;
}

.me-page .head,
.me-page .me,
.me-page .foot {
  position: relative;
  z-index: 1;
}

.me-page .head {
  position: fixed;
  z-index: 40;
}

.me-page .auth-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.me {
  max-width: 1120px;
  margin: 0 auto;
  padding: 7.2rem clamp(1.2rem, 4vw, 2.5rem) 3.5rem;
}

.me-hero {
  margin-bottom: 1.75rem;
}

.me-hero__lead {
  color: #9a825c;
  font-size: 0.95rem;
  max-width: 36em;
  margin-top: 0.35rem;
}

.me-flash {
  margin-bottom: 1.1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius, 6px);
  font-size: 0.92rem;
}

.me-flash--ok {
  border: 1px solid rgba(120, 160, 90, 0.45);
  background: rgba(40, 60, 28, 0.35);
  color: #d4e8b8;
}

.me-flash--err {
  border: 1px solid rgba(180, 70, 50, 0.55);
  background: rgba(90, 28, 18, 0.35);
  color: #f0c4b0;
}

.me-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1.35rem;
  align-items: start;
}

.me-side {
  position: sticky;
  top: 5.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.me-side__card {
  padding: 1.25rem 1.15rem;
  border: 1px solid rgba(184, 137, 60, 0.28);
  border-radius: var(--radius, 6px);
  background: linear-gradient(165deg, rgba(32, 26, 18, 0.96), rgba(14, 12, 10, 0.98));
}

.me-side__label {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: #8a7350;
  margin-bottom: 0.45rem;
}

.me-side__id {
  font-size: 1.2rem;
  color: #f2e6c4;
  letter-spacing: 0.06em;
  word-break: break-all;
}

.me-side__zone {
  margin-top: 0.25rem;
  color: #e0c878;
  font-size: 0.9rem;
}

.me-side__stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.45rem;
  margin: 1.1rem 0 0.85rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(203, 184, 146, 0.1);
}

.me-side__stats li {
  text-align: center;
}

.me-side__stats span {
  display: block;
  font-size: 0.7rem;
  color: #8a7350;
  letter-spacing: 0.08em;
}

.me-side__stats strong {
  display: block;
  margin-top: 0.2rem;
  color: #f0dfb0;
  font-size: 1.05rem;
  font-weight: 500;
}

.me-side__ok {
  font-size: 0.78rem;
  color: #9bb87a;
}

.me-side__warn {
  font-size: 0.78rem;
  color: #d4a078;
  line-height: 1.45;
}

.me-side__nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem;
  border: 1px solid #2a2318;
  border-radius: var(--radius, 6px);
  background: #12100c;
}

.me-side__nav a {
  padding: 0.65rem 0.8rem;
  border-radius: calc(var(--radius, 6px) - 1px);
  color: #cbb892;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.me-side__nav a:hover {
  background: rgba(224, 200, 120, 0.08);
  color: #f3df9d;
}

.me-main {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  min-width: 0;
}

.me-panel {
  padding: 1.45rem 1.4rem 1.5rem;
  border: 1px solid rgba(184, 137, 60, 0.28);
  border-radius: var(--radius, 6px);
  background: linear-gradient(165deg, rgba(32, 26, 18, 0.94), rgba(14, 12, 10, 0.98));
  scroll-margin-top: 5.5rem;
}

.me-panel__head {
  margin-bottom: 1.15rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(203, 184, 146, 0.1);
}

.me-panel__head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  font-weight: 500;
  color: #f2e6c4;
  letter-spacing: 0.12em;
}

.me-panel__head p {
  margin: 0;
  color: #8a7350;
  font-size: 0.86rem;
}

.me-dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1.25rem;
}

.me-dl > div {
  min-width: 0;
}

.me-dl dt {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: #8a7350;
  margin-bottom: 0.2rem;
}

.me-dl dd {
  margin: 0;
  color: #e8dcc0;
  font-size: 0.95rem;
  word-break: break-word;
}

.me-code {
  margin-left: 0.45rem;
  color: #6e5a40;
  font-style: normal;
  font-size: 0.82rem;
}

.me-badge {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 3px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.me-badge--ok {
  color: #c8e0a8;
  background: rgba(80, 110, 50, 0.28);
}

.me-badge--bad {
  color: #f0c4b0;
  background: rgba(120, 50, 40, 0.35);
}

.me-badge--muted {
  color: #9a825c;
  background: rgba(60, 50, 36, 0.45);
}

.me-table-wrap {
  overflow-x: auto;
}

.me-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.me-table th,
.me-table td {
  padding: 0.7rem 0.55rem;
  text-align: left;
  border-bottom: 1px solid rgba(203, 184, 146, 0.08);
}

.me-table th {
  color: #8a7350;
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

.me-table td {
  color: #dcc99a;
}

.me-table tr.is-deleted td {
  opacity: 0.55;
}

.me-empty {
  color: #8a7350;
  font-size: 0.92rem;
  padding: 0.5rem 0;
}

.me-form {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  max-width: 640px;
}

.me-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.95rem 1rem;
}

.me-form .player-submit {
  width: auto;
  align-self: flex-start;
  min-width: 10rem;
  margin-top: 0.25rem;
}

@media (max-width: 900px) {
  .me-layout {
    grid-template-columns: 1fr;
  }

  .me-side {
    position: static;
  }

  .me-side__nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .me {
    padding-top: 5.8rem;
  }

  .me-dl,
  .me-form__row {
    grid-template-columns: 1fr;
  }

  .me-side__stats {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.btn-line { display:inline-flex; align-items:center; justify-content:center; padding:.7rem 1.25rem; border:1px solid #6a5a40; border-radius:var(--radius, 6px); color:#dcc99a; background:transparent; text-decoration:none; }
.btn-line:hover{ color:#f3df9d; border-color:#b8893c; }
