/* ================================================================
   方舟一号 — 个人中心页面样式
   五大板块：我的资料 / 会员中心 / 积分明细 / 合作咨询 / 积分兑换
   设计语言：深色基调 + 琥珀金点缀 + 极简现代
   ================================================================ */

:root {
  --bg-primary: #06080d;
  --bg-secondary: #0d1117;
  --bg-card: #111827;
  --bg-card-hover: #1a2235;
  --bg-elevated: #1c2438;
  --border: #1e293b;
  --border-light: #2a3444;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --accent-dark: #d97706;
  --blue: #3b82f6;
  --blue-light: #60a5fa;
  --green: #10b981;
  --green-light: #34d399;
  --red: #ef4444;
  --red-light: #f87171;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,.3);
  --shadow-lg: 0 8px 48px rgba(0,0,0,.5);
  --transition: 0.2s cubic-bezier(.4,0,.2,1);
  --max-width: 1200px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--blue-light); cursor: pointer; text-decoration: none; }
a:hover { color: var(--blue); }

/* ---------- 顶部导航栏 ---------- */
.profile-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 1px;
}
.topbar-back {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}
.topbar-back:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}
.topbar-points {
  color: var(--accent);
  font-weight: 700;
}

/* ---------- 页面容器 ---------- */
.profile-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* ---------- 用户信息头部卡片 ---------- */
.profile-header-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.profile-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  flex-shrink: 0;
}
.profile-header-info { flex: 1; min-width: 200px; }
.profile-header-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.profile-header-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.profile-header-meta span { display: flex; align-items: center; gap: 4px; }
.profile-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge-free { background: rgba(100,116,139,.2); color: var(--text-secondary); }
.badge-basic { background: rgba(59,130,246,.15); color: var(--blue-light); }
.badge-premium { background: rgba(245,158,11,.15); color: var(--accent-light); }

.profile-header-stats {
  display: flex;
  gap: 32px;
}
.ph-stat { text-align: center; }
.ph-stat-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
}
.ph-stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- Tab 导航 ---------- */
.profile-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 6px;
  margin-bottom: 24px;
  overflow-x: auto;
  border: 1px solid var(--border);
}
.profile-tab {
  flex: 1;
  min-width: 120px;
  padding: 12px 20px;
  text-align: center;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  border: none;
  background: transparent;
}
.profile-tab:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.profile-tab.active {
  background: var(--accent);
  color: #06080d;
  font-weight: 700;
}

/* ---------- Tab 内容区 ---------- */
.tab-content { display: none; animation: fadeIn .3s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- 表单 ---------- */
.profile-form { max-width: 600px; }
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245,158,11,.1);
}
.form-input:read-only {
  background: var(--bg-secondary);
  color: var(--text-muted);
  cursor: not-allowed;
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #06080d; }
.btn-primary:hover:not(:disabled) { background: var(--accent-light); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-primary);
}
.btn-outline:hover { background: var(--bg-card-hover); }
.btn-danger { background: rgba(239,68,68,.15); color: var(--red-light); border: 1px solid rgba(239,68,68,.3); }
.btn-danger:hover { background: rgba(239,68,68,.25); }
.btn-full { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ---------- 会员中心 ---------- */
.membership-current {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  text-align: center;
}
.mc-level {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 8px;
}
.mc-level.free { color: var(--text-secondary); }
.mc-level.basic { color: var(--blue-light); }
.mc-level.premium { color: var(--accent-light); }
.mc-expire { color: var(--text-muted); font-size: 14px; margin-bottom: 16px; }
.mc-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.benefit-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
}
.benefit-item .check { color: var(--green); font-size: 16px; }
.benefit-item .cross { color: var(--red); font-size: 16px; }

.membership-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
  position: relative;
}
.plan-card:hover { border-color: var(--border-light); transform: translateY(-2px); }
.plan-card.featured {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(245,158,11,.05) 100%);
}
.plan-card.featured::before {
  content: '推荐';
  position: absolute;
  top: -10px;
  right: 16px;
  background: var(--accent);
  color: #06080d;
  padding: 2px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}
.plan-name { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.plan-price {
  font-size: 32px;
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 4px;
}
.plan-price small { font-size: 14px; color: var(--text-muted); font-weight: 400; }
.plan-desc { color: var(--text-muted); font-size: 13px; margin-bottom: 16px; }
.plan-features { list-style: none; margin-bottom: 20px; }
.plan-features li {
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.plan-features li::before { content: '✓'; color: var(--green); font-weight: 700; flex-shrink: 0; }

/* ---------- 积分明细 ---------- */
.points-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.ps-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.ps-card-num {
  font-size: 28px;
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 4px;
}
.ps-card-label { font-size: 13px; color: var(--text-muted); }

.points-checkin {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.checkin-info { display: flex; align-items: center; gap: 12px; }
.checkin-streak {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: var(--bg-elevated);
  border-radius: 20px;
  font-size: 13px;
  color: var(--accent-light);
}

.points-log-list { display: flex; flex-direction: column; gap: 8px; }
.points-log-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.points-log-item:hover { background: var(--bg-card-hover); }
.pli-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.pli-icon.plus { background: rgba(16,185,129,.15); }
.pli-icon.minus { background: rgba(239,68,68,.15); }
.pli-main { flex: 1; }
.pli-desc { font-size: 14px; color: var(--text-primary); margin-bottom: 2px; }
.pli-date { font-size: 12px; color: var(--text-muted); }
.pli-amount {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pli-amount.plus { color: var(--green-light); }
.pli-amount.minus { color: var(--red-light); }

/* ---------- 合作咨询 ---------- */
.coop-section { margin-bottom: 32px; }
.coop-section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}
.team-card:hover { border-color: var(--border-light); transform: translateY(-2px); }
.team-emoji { font-size: 40px; margin-bottom: 12px; }
.team-name { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.team-role { font-size: 13px; color: var(--accent); margin-bottom: 12px; }
.team-intro { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.6; }
.team-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.team-tag {
  padding: 2px 10px;
  background: var(--bg-elevated);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-muted);
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.case-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
}
.case-card:hover { border-color: var(--border-light); }
.case-category {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 8px;
}
.case-category.线上流量 { background: rgba(59,130,246,.15); color: var(--blue-light); }
.case-category.陈列视觉 { background: rgba(245,158,11,.15); color: var(--accent-light); }
.case-category.线下经营 { background: rgba(16,185,129,.15); color: var(--green-light); }
.case-title { font-size: 15px; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.case-summary { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 12px; }
.case-results { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.case-result-tag {
  padding: 2px 8px;
  background: rgba(16,185,129,.1);
  border-radius: 6px;
  font-size: 11px;
  color: var(--green-light);
}
.case-timeline { font-size: 12px; color: var(--text-muted); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}
.price-card:hover { border-color: var(--border-light); transform: translateY(-2px); }
.price-card-header { margin-bottom: 16px; }
.price-card-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.price-card-desc { font-size: 13px; color: var(--text-muted); }
.price-card-amount {
  font-size: 28px;
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 4px;
}
.price-card-amount small { font-size: 13px; color: var(--text-muted); font-weight: 400; }
.price-card-duration {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding: 4px 10px;
  background: var(--bg-elevated);
  border-radius: 6px;
  display: inline-block;
}
.price-card-items { list-style: none; margin-bottom: 16px; }
.price-card-items li {
  padding: 4px 0;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.price-card-items li::before { content: '▸'; color: var(--accent); flex-shrink: 0; }

.service-map-list { display: flex; flex-direction: column; gap: 10px; }
.map-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.map-city { font-size: 16px; font-weight: 700; min-width: 60px; }
.map-region {
  padding: 2px 10px;
  background: var(--bg-elevated);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-muted);
}
.map-type {
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.map-type.总部 { background: rgba(245,158,11,.15); color: var(--accent-light); }
.map-type.办事处 { background: rgba(59,130,246,.15); color: var(--blue-light); }
.map-type.合作点 { background: rgba(16,185,129,.15); color: var(--green-light); }
.map-services { display: flex; gap: 6px; flex-wrap: wrap; }
.map-service-tag {
  padding: 2px 8px;
  background: var(--bg-elevated);
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-secondary);
}

.contact-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}
.contact-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 15px;
}
.contact-item .label { color: var(--text-muted); min-width: 80px; text-align: right; }
.contact-item .value { color: var(--text-primary); font-weight: 600; }

/* ---------- 积分兑换 ---------- */
.exchange-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.exchange-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}
.exchange-card:hover { border-color: var(--border-light); transform: translateY(-2px); }
.exchange-icon { font-size: 40px; margin-bottom: 12px; }
.exchange-name { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.exchange-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; line-height: 1.5; }
.exchange-cost {
  font-size: 20px;
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 12px;
}
.exchange-cost small { font-size: 13px; color: var(--text-muted); font-weight: 400; }
.exchange-btn { width: 100%; }
.exchange-card.disabled { opacity: .5; }
.exchange-card.disabled .exchange-btn { cursor: not-allowed; }

/* ---------- Toast ---------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.toast {
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  animation: toastIn .3s ease;
  box-shadow: var(--shadow-lg);
}
.toast.success { background: rgba(16,185,129,.95); color: #fff; }
.toast.error { background: rgba(239,68,68,.95); color: #fff; }
.toast.info { background: rgba(59,130,246,.95); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- 加载状态 ---------- */
.loading-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 12px;
}
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .profile-topbar { padding: 10px 16px; }
  .topbar-logo { font-size: 16px; }
  .topbar-back { padding: 6px 12px; font-size: 13px; }
  .profile-container { padding: 16px 12px 40px; }
  .profile-header-card { padding: 20px; flex-direction: column; text-align: center; }
  .profile-header-stats { justify-content: center; }
  .profile-tabs { flex-wrap: nowrap; }
  .profile-tab { min-width: 100px; padding: 10px 12px; font-size: 13px; }
  .membership-plans, .case-grid, .pricing-grid, .exchange-grid { grid-template-columns: 1fr; }
  .form-input, .form-select, .form-textarea { font-size: 16px; }
}

@media (max-width: 480px) {
  .profile-topbar { padding: 10px 12px; }
  .topbar-logo { font-size: 15px; }
  .topbar-back { padding: 5px 10px; font-size: 12px; }
  .profile-container { padding: 12px 10px 32px; }
  .profile-header-card { padding: 16px; gap: 12px; }
  .profile-header-avatar { width: 64px; height: 64px; font-size: 28px; }
  .profile-header-name { font-size: 18px; }
  .profile-header-level { font-size: 12px; padding: 2px 10px; }
  .profile-header-stats { gap: 12px; }
  .profile-stat-value { font-size: 18px; }
  .profile-stat-label { font-size: 10px; }
  .profile-tabs { gap: 4px; padding: 4px; }
  .profile-tab { min-width: 80px; padding: 8px 10px; font-size: 12px; }
  .membership-plans, .case-grid, .pricing-grid, .exchange-grid { gap: 12px; }
  .membership-card, .case-card { padding: 16px; }
  .plan-price { font-size: 22px; }
  .plan-name { font-size: 16px; }
  .form-input, .form-select, .form-textarea { font-size: 14px; padding: 10px 12px; }
  .btn-primary, .btn-secondary { padding: 10px 16px; font-size: 13px; }
  .exchange-item { padding: 12px; }
}
