/* 用户中心 · Apollo-User-Center-Design v1.0 */

:root {
  --uc-bg: #f4f4f5;
  --uc-card: #fff;
  --uc-border: #e5e7eb;
  --uc-text: #0f172a;
  --uc-muted: #64748b;
  --uc-accent: #6366f1;
  --font: "DM Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.uc-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--uc-bg);
  color: var(--uc-text);
  -webkit-font-smoothing: antialiased;
}

.uc-header {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--uc-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.uc-header-brand {
  flex-shrink: 0;
  line-height: 0;
}

.uc-breadcrumb {
  font-size: 14px;
  color: var(--uc-muted);
}

.uc-breadcrumb a {
  color: var(--uc-accent);
  text-decoration: none;
  font-weight: 500;
}

.uc-breadcrumb a:hover {
  text-decoration: underline;
}

.uc-header-user {
  font-size: 14px;
  font-weight: 500;
  color: var(--uc-muted);
}

.uc-main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.uc-card {
  background: var(--uc-card);
  border: 1px solid var(--uc-border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 20px;
}

.uc-profile-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.uc-avatar-lg {
  width: 88px;
  height: 88px;
  border-radius: 16px;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.uc-avatar-lg .uc-avatar-img,
.uc-avatar-lg [data-avatar-img] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.uc-profile-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.uc-btn {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid var(--uc-border);
  background: #fff;
  cursor: pointer;
  transition: background 0.15s;
}

.uc-btn:hover {
  background: #f8fafc;
}

.uc-btn-primary {
  background: var(--uc-accent);
  border-color: var(--uc-accent);
  color: #fff;
}

.uc-btn-primary:hover {
  background: #4f46e5;
}

.uc-info-grid {
  flex: 1;
  min-width: 240px;
  display: grid;
  gap: 12px;
}

.uc-info-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.uc-info-line span:first-child {
  color: var(--uc-muted);
  min-width: 88px;
}

.uc-link {
  margin-left: auto;
  font-size: 13px;
  color: var(--uc-accent);
  text-decoration: none;
  font-weight: 500;
}

.uc-section-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--uc-border);
}

.uc-assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.uc-asset-box {
  border: 1px solid var(--uc-border);
  border-radius: 10px;
  padding: 16px;
  background: #fafafa;
}

.uc-asset-label {
  font-size: 12px;
  color: var(--uc-muted);
  margin-bottom: 8px;
}

.uc-asset-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.uc-tier-ladder {
  font-size: 13px;
  color: var(--uc-muted);
  margin-bottom: 12px;
  line-height: 1.6;
}

.uc-progress {
  height: 10px;
  border-radius: 5px;
  background: #e2e8f0;
  overflow: hidden;
  margin: 10px 0 14px;
}

.uc-progress-bar {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--uc-accent), #06b6d4);
  width: 51.6%;
}

.uc-benefits {
  margin-top: 20px;
}

.uc-benefits h4 {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--uc-text);
}

.uc-skill-showcase {
  border-radius: 14px;
  padding: 18px 18px 20px;
  background:
    linear-gradient(165deg, rgba(99, 102, 241, 0.07) 0%, transparent 42%),
    linear-gradient(15deg, rgba(6, 182, 212, 0.06) 0%, transparent 38%),
    #f8fafc;
  border: 1px solid var(--uc-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.uc-skill-showcase-hint {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--uc-muted);
  line-height: 1.5;
}

.uc-skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}

.uc-skill-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 168px;
  padding: 10px 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--uc-border);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 4px 12px rgba(15, 23, 42, 0.04);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.uc-skill-card.is-unlocked:hover {
  transform: translateY(-3px);
  box-shadow:
    0 6px 16px rgba(99, 102, 241, 0.12),
    0 2px 6px rgba(15, 23, 42, 0.06);
  border-color: rgba(99, 102, 241, 0.35);
}

.uc-skill-card.is-locked {
  background: #f1f5f9;
  border-style: dashed;
  border-color: #cbd5e1;
}

.uc-skill-card.is-locked .uc-skill-art {
  filter: grayscale(0.85) brightness(0.92);
  opacity: 0.72;
}

.uc-skill-frame {
  position: relative;
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 10px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.6));
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.04);
}

.uc-skill-card--violet .uc-skill-frame {
  background: linear-gradient(145deg, rgba(129, 140, 248, 0.12), rgba(99, 102, 241, 0.04));
}

.uc-skill-card--indigo .uc-skill-frame {
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.16), rgba(79, 70, 229, 0.05));
}

.uc-skill-card--emerald .uc-skill-frame {
  background: linear-gradient(145deg, rgba(52, 211, 153, 0.14), rgba(5, 150, 105, 0.04));
}

.uc-skill-card--sky .uc-skill-frame {
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.14), rgba(2, 132, 199, 0.04));
}

.uc-skill-card--purple .uc-skill-frame {
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.16), rgba(124, 58, 237, 0.05));
}

.uc-skill-card--cyan .uc-skill-frame {
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.14), rgba(8, 145, 178, 0.05));
}

.uc-skill-card--amber .uc-skill-frame {
  background: linear-gradient(145deg, rgba(253, 224, 71, 0.18), rgba(234, 88, 12, 0.05));
}

.uc-skill-art {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
}

.uc-skill-art svg {
  width: 56px;
  height: 56px;
  display: block;
}

.uc-skill-lock {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.uc-skill-body {
  flex: 1;
  text-align: center;
  padding: 0 4px;
}

.uc-skill-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--uc-text);
  letter-spacing: 0.01em;
}

.uc-skill-desc {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--uc-muted);
}

.uc-skill-badge {
  align-self: center;
  margin-top: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}

.uc-skill-card.is-unlocked .uc-skill-badge {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.uc-skill-card.is-locked .uc-skill-badge {
  color: #64748b;
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.uc-skill-card--placeholder {
  opacity: 0.6;
  pointer-events: none;
}

@media (max-width: 480px) {
  .uc-skill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.uc-page-outline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 18px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--uc-border);
  border-radius: 12px;
  font-size: 13px;
}

.uc-page-outline a {
  color: var(--uc-accent);
  text-decoration: none;
  font-weight: 500;
}

.uc-page-outline a:hover {
  text-decoration: underline;
}

.uc-section-lead {
  margin: -6px 0 14px;
  font-size: 13px;
  color: var(--uc-muted);
  line-height: 1.55;
}

.uc-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  justify-content: center;
  padding: 8px 0 0;
}

.uc-footer-links a,
.uc-footer-links button {
  font-size: 13px;
  color: var(--uc-muted);
  text-decoration: none;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}

.uc-footer-links a:hover,
.uc-footer-links button:hover {
  color: var(--uc-accent);
}

/* T1–T8 阶梯（§2.1） */
.uc-tier-track {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4px;
  margin: 20px 0 10px;
  position: relative;
  padding: 0 4px;
}

.uc-tier-track::before {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  top: 11px;
  height: 2px;
  background: #e2e8f0;
  z-index: 0;
}

.uc-tier-step {
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  max-width: 12.5%;
}

.uc-tier-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #e2e8f0;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #94a3b8;
}

.uc-tier-step.is-done .uc-tier-dot {
  background: #6366f1;
  border-color: #6366f1;
  color: #fff;
}

.uc-tier-step.is-done span:last-child {
  color: #475569;
}

.uc-tier-step.is-current .uc-tier-dot {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border-color: #d97706;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.35);
  font-size: 11px;
}

.uc-tier-step.is-current span:last-child {
  color: var(--uc-text);
}

.uc-tier-rail-legend {
  text-align: center;
  font-size: 12px;
  color: var(--uc-muted);
  margin: 0 0 16px;
}

.uc-tier-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-top: 12px;
}

.uc-tier-quick-links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--uc-accent);
  text-decoration: none;
}

.uc-tier-quick-links a:hover {
  text-decoration: underline;
}

/* 子页通用 */
.uc-page-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

.uc-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.uc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.uc-table th,
.uc-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--uc-border);
}

.uc-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--uc-muted);
  background: #fafafa;
}

.uc-muted {
  color: var(--uc-muted);
  font-size: 14px;
  line-height: 1.6;
}

.uc-field {
  margin-bottom: 18px;
}

.uc-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.uc-field input[type="text"],
.uc-field input[type="email"],
.uc-field select {
  width: 100%;
  max-width: 400px;
  padding: 10px 12px;
  border: 1px solid var(--uc-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
}

.uc-field input:focus,
.uc-field select:focus {
  outline: none;
  border-color: var(--uc-accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.uc-radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
}

.uc-radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  cursor: pointer;
}

.uc-inline-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  max-width: 400px;
}

.uc-inline-row input {
  flex: 1;
  min-width: 0;
}

.uc-btn-sm {
  flex-shrink: 0;
  padding: 10px 12px;
  font-size: 13px;
  white-space: nowrap;
}

.uc-subpanel {
  margin-top: 12px;
  padding: 16px;
  border: 1px dashed var(--uc-border);
  border-radius: 10px;
  background: #f8fafc;
  max-width: 480px;
}

.uc-subpanel[hidden] {
  display: none;
}

.uc-msg {
  font-size: 13px;
  margin: 8px 0 0;
  color: var(--uc-muted);
}

.uc-msg.is-error {
  color: #b91c1c;
}

.uc-msg.is-ok {
  color: #047857;
}

.uc-readonly-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 480px;
}

.uc-readonly-row input {
  flex: 1;
  min-width: 180px;
}

.uc-recharge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.uc-amount-pill {
  padding: 12px 16px;
  border: 1px solid var(--uc-border);
  border-radius: 10px;
  background: #fafafa;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s;
}

.uc-amount-pill:hover,
.uc-amount-pill.is-selected {
  border-color: var(--uc-accent);
  background: rgba(99, 102, 241, 0.08);
}

.uc-pay-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 14px;
  cursor: pointer;
}

.uc-redeem-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--uc-border);
}

.uc-redeem-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.uc-redeem-row:first-child {
  padding-top: 0;
}

/* 积分账户 */
.uc-points-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 18px;
}

.uc-points-head-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 140px;
}

.uc-checkin-status {
  margin: 0;
  font-size: 12px;
  color: var(--uc-muted);
  text-align: right;
  line-height: 1.4;
}

.uc-ledger-hint {
  margin: 0 0 8px;
  font-size: 12px;
}

.uc-points-lead {
  margin: 0;
  font-size: 13px;
  color: var(--uc-muted);
  line-height: 1.55;
  max-width: 520px;
}

.uc-points-hero {
  border: 1px solid var(--uc-border);
  border-radius: 12px;
  padding: 20px 22px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(6, 182, 212, 0.05));
  margin-bottom: 16px;
}

.uc-points-balance-label {
  font-size: 12px;
  color: var(--uc-muted);
  margin-bottom: 6px;
}

.uc-points-balance {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.uc-points-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.uc-points-stat {
  border: 1px solid var(--uc-border);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fafafa;
}

.uc-points-stat-label {
  display: block;
  font-size: 12px;
  color: var(--uc-muted);
  margin-bottom: 6px;
}

.uc-points-stat-val {
  font-size: 16px;
  font-weight: 600;
  word-break: break-word;
}

.uc-pos {
  color: #16a34a;
}

.uc-neg {
  color: #dc2626;
}

.uc-points-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 18px;
  font-size: 14px;
}

.uc-points-actions a {
  color: var(--uc-accent);
  text-decoration: none;
}

.uc-points-actions a:hover {
  text-decoration: underline;
}

.uc-subsection-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--uc-text);
}

.uc-points-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--uc-border);
  border-radius: 10px;
}

.uc-points-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.uc-points-table th,
.uc-points-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--uc-border);
}

.uc-points-table th {
  background: #f8fafc;
  font-weight: 600;
  color: var(--uc-muted);
  font-size: 12px;
}

.uc-points-table tr:last-child td {
  border-bottom: none;
}

.uc-points-table .uc-num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.uc-empty-cell {
  text-align: center;
  padding: 24px 12px !important;
}

.uc-points-foot {
  margin: 12px 0 0;
  font-size: 13px;
}

.uc-checkin-msg {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--uc-muted);
}

.uc-checkin-msg.is-ok {
  color: #16a34a;
}

.uc-checkin-msg.is-error {
  color: #dc2626;
}

@media (max-width: 640px) {
  .uc-profile-row {
    flex-direction: column;
  }

  .uc-link {
    margin-left: 0;
  }

  .uc-points-stats {
    grid-template-columns: 1fr;
  }

  .uc-points-head-actions {
    width: 100%;
    align-items: stretch;
  }

  .uc-checkin-status {
    text-align: left;
  }

  .uc-points-head .uc-btn {
    width: 100%;
  }
}
