/* 官网会员区：套餐 / 登录 / 账户 */

.mem-page {
  padding-bottom: 48px;
}

.mem-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  background: var(--bg-subtle);
  border-radius: 12px;
  margin: 8px 0 28px;
}

.mem-tab {
  border: none;
  background: transparent;
  padding: 10px 18px;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.mem-tab[aria-selected="true"] {
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.mem-section {
  margin-top: 40px;
}

.mem-section h2 {
  font-size: 1.25rem;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.mem-section .mem-sec-desc {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 14px;
}

.pkg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.pkg-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.pkg-card.is-rec {
  border-color: rgb(108 92 231 / 0.35);
  box-shadow: 0 8px 28px rgb(108 92 231 / 0.12);
}

.pkg-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(165deg, var(--accent), #5b4fd6);
  padding: 3px 8px;
  border-radius: 999px;
}

.pkg-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  padding-right: 64px;
}

.pkg-price {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
}

.pkg-price span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 2px;
}

.pkg-meta {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.pkg-meta li + li {
  margin-top: 4px;
}

.pkg-card .btn {
  width: 100%;
  margin-top: 4px;
}

.auth-card {
  max-width: 420px;
  margin: 0 auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 0 0 6px;
  font-size: 1.5rem;
}

.auth-card .auth-lead {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 14px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.auth-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  background: #fff;
}

.auth-field input:focus {
  outline: 2px solid rgb(108 92 231 / 0.25);
  border-color: var(--accent);
}

.auth-field input[readonly] {
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.auth-row {
  display: flex;
  gap: 10px;
}

.auth-row input {
  flex: 1;
}

.auth-row .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.auth-switch {
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-switch a {
  color: var(--accent-hover);
  font-weight: 600;
}

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

.account-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin: 20px 0 32px;
}

.account-stat {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.account-stat .label {
  font-size: 12px;
  color: var(--text-soft);
  margin: 0 0 6px;
}

.account-stat .value {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.account-stat .sub {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.pay-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgb(18 10 28 / 0.48);
}

.pay-modal.is-open {
  display: flex;
}

.pay-dialog {
  width: min(400px, 100%);
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: center;
}

.pay-dialog h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.pay-dialog p {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.pay-qr {
  width: 220px;
  height: 220px;
  margin: 0 auto 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.pay-qr canvas,
.pay-qr img {
  max-width: 200px;
  max-height: 200px;
}

.pay-status {
  font-size: 13px;
  color: var(--accent-hover);
  min-height: 1.4em;
  margin-bottom: 12px;
}

.custom-recharge {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.custom-recharge input {
  width: 120px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font: inherit;
}

.invite-hero {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 28px;
  box-shadow: var(--shadow);
}

.invite-hero .code-pill {
  display: inline-block;
  margin: 12px 0 20px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.mem-note {
  margin-top: 28px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--accent-soft-2);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

.mem-note a {
  color: var(--accent-hover);
  font-weight: 600;
}

.header-actions .btn-ghost.mem-nav-auth {
  padding: 9px 14px;
}

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