/* ====== 个人中心页面 ====== */
#page-profile {
  background: var(--bg-primary);
  padding-bottom: 16px;
}

/* 头部卡片 */
.profile-header-card {
  background: linear-gradient(135deg, var(--bg-card), rgba(0, 240, 255, 0.08));
  border-bottom: 1px solid var(--border-color);
  padding: 20px 16px 16px;
  text-align: center;
  flex-shrink: 0;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 8px;
  font-size: 28px;
}

.profile-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.profile-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.profile-level-badge {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(0, 240, 255, 0.15);
  padding: 2px 8px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.profile-exp-bar {
  position: relative;
  width: 80%;
  max-width: 240px;
  height: 18px;
  margin: 0 auto;
  background: var(--bg-input);
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.profile-exp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-gold-light));
  border-radius: 9px;
  transition: width 0.6s ease;
}

.profile-exp-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* 区块 */
.profile-section {
  padding: 12px 16px;
}

.profile-section h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-section h3::before {
  content: '';
  width: 3px;
  height: 12px;
  background: var(--accent-gold);
  border-radius: 2px;
}

/* 权益网格 */
.benefits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.benefit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-align: center;
}

.benefit-icon {
  font-size: 24px;
  margin-bottom: 2px;
}

.benefit-label {
  font-size: 11px;
  color: var(--text-muted);
}

.benefit-value {
  font-size: 16px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent-gold);
}

/* 资产行 */
.asset-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.asset-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.asset-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.asset-value {
  font-size: 20px;
  font-weight: 900;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

/* 功能列表 */
.func-list {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.func-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
  border-bottom: 1px solid var(--border-color);
}

.func-item:last-child {
  border-bottom: none;
}

.func-item:active {
  background: var(--bg-card-hover);
}

.func-icon {
  font-size: 20px;
}

.func-label {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.func-arrow {
  font-size: 18px;
  color: var(--text-muted);
  font-weight: 300;
}

/* 设置列表 */
.settings-list {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.lang-select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  color: var(--text-primary);
  font-size: 13px;
  min-width: 140px;
  text-align: center;
}

.lang-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.clear-cache-btn {
  padding: 6px 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-red);
  background: rgba(255, 45, 123, 0.1);
  border: 1px solid rgba(255, 45, 123, 0.3);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.clear-cache-btn:active {
  background: var(--accent-red);
  color: #fff;
}

/* 小屏幕适配（≤360px） */
@media (max-width: 360px) {
  .profile-header-card {
    padding: 14px 10px 12px;
  }

  .profile-avatar {
    width: 52px;
    height: 52px;
    font-size: 22px;
  }

  .profile-name { font-size: 16px; }

  .profile-level-badge {
    font-size: 11px;
    padding: 2px 6px;
  }

  .profile-exp-bar {
    width: 85%;
    height: 16px;
  }

  .profile-exp-text { font-size: 9px; }

  .profile-section {
    padding: 10px 10px;
  }

  .profile-section h3 { font-size: 13px; }

  .benefits-grid {
    gap: 6px;
  }

  .benefit-item {
    padding: 10px 6px;
  }

  .benefit-icon { font-size: 20px; }
  .benefit-label { font-size: 10px; }
  .benefit-value { font-size: 14px; }

  .asset-row {
    gap: 6px;
  }

  .asset-item { padding: 10px; }
  .asset-label { font-size: 11px; }
  .asset-value { font-size: 18px; }

  .func-item {
    padding: 10px;
    gap: 8px;
  }

  .func-icon { font-size: 18px; }
  .func-label { font-size: 13px; }

  .setting-item { padding: 10px; }
  .setting-label { font-size: 13px; }

  .lang-select {
    padding: 5px 8px;
    font-size: 12px;
    min-width: 120px;
  }

  .clear-cache-btn {
    padding: 5px 16px;
    font-size: 11px;
  }
}

/* 超小屏幕（≤320px） */
@media (max-width: 320px) {
  .profile-header-card { padding: 10px 8px; }
  .profile-avatar { width: 44px; height: 44px; font-size: 18px; }
  .profile-name { font-size: 14px; }

  .benefits-grid { gap: 4px; }
  .benefit-item { padding: 8px 4px; }
  .benefit-value { font-size: 13px; }

  .asset-value { font-size: 16px; }
  .func-label { font-size: 12px; }
  .setting-label { font-size: 12px; }
}

/* 邀请链接区域 */
.invite-link-box {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 4px 0;
}

.invite-link-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  color: #88ccff;
  font-size: 12px;
  outline: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-link-input:focus {
  border-color: rgba(0, 255, 255, 0.5);
}

.invite-copy-btn {
  background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.invite-copy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.invite-copy-btn:active {
  transform: translateY(0);
}

/* 积分记录列表 */
.records-list {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
}

.records-loading,
.records-empty {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-muted);
  font-size: 13px;
}

.record-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.record-item:last-child {
  border-bottom: none;
}

.record-info {
  flex: 1;
  min-width: 0;
}

.record-desc {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.record-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.record-points {
  font-size: 15px;
  font-weight: 800;
  font-family: var(--font-mono);
  min-width: 70px;
  text-align: right;
}

.record-positive {
  color: #00e676;
}

.record-negative {
  color: #ff5252;
}

.records-more-wrap {
  padding: 10px 0 0;
  text-align: center;
}

.records-more-btn {
  background: linear-gradient(135deg, rgba(0,240,255,0.15) 0%, rgba(0,212,255,0.1) 100%);
  border: 1px solid rgba(0, 255, 255, 0.25);
  border-radius: 8px;
  color: #00d4ff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 24px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.records-more-btn:hover {
  background: linear-gradient(135deg, rgba(0,240,255,0.25) 0%, rgba(0,212,255,0.2) 100%);
}

.records-more-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
