/**
 * 我的页面样式 - 使用全站设计变量
 */
@import "variables.css";

body.my-page {
  background-color: var(--bg-page);
  padding-bottom: 30px;
}

/* 导航栏样式已迁移到 common.css 的 .unified-navbar */

/* 主内容区（与全站统一间距） */
.my-content {
  padding: 15px var(--content-padding) 20px;
}

/* 用户卡片 / 个人信息框（与小程序 settings 100% 一致） */
.user-card-white {
  margin-bottom: 15px;
}

.profile-card {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
  border-radius: 14px;
  padding: 16px 16px 16px 16px;
  box-shadow: 0 4px 16px rgba(58, 90, 249, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.8);
  min-height: auto;
}

.profile-card-inner,
.user-card-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
  min-height: 80px;
}

.profile-card-inner:hover,
.user-card-inner:hover {
  background: transparent;
}

/* 复制按钮 - 右上角（与小程序 copy-btn-text 一致） */
.copy-btn-text {
  position: absolute;
  top: 6px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f0f4ff 0%, #e3e7ff 100%);
  font-size: 11px;
  color: #3a5af9;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(58, 90, 249, 0.15);
  border: none;
  cursor: pointer;
  z-index: 10;
}

.copy-btn-text:active {
  transform: scale(0.98);
  background: linear-gradient(135deg, #e3e7ff 0%, #d6e0ff 100%);
}

.profile-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar-circle,
.avatar {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  background: linear-gradient(135deg, #e8edff 0%, #d6e0ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(58, 90, 249, 0.15);
  position: relative;
  cursor: pointer;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.avatar-img.show {
  display: block;
}

.avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.avatar-fallback.hide {
  display: none;
}

.avatar-edit-icon {
  position: absolute;
  right: 2px;
  bottom: 2px;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.avatar-person {
  font-size: 24px;
}

.profile-name-area {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.profile-name,
.user-card-name {
  font-size: 18px;
  font-weight: 700;
  color: #1a1f2e;
  letter-spacing: 0.3px;
}

/* 身份标签（与小程序 identity-badge 一致） */
.identity-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.identity-badge {
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  padding: 1px 6px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  display: inline-block;
}

.identity-badge.boss {
  color: #ff6b00;
  background: linear-gradient(135deg, #fff5e6 0%, #ffe8cc 100%);
  border: 1px solid #ffb84d;
  box-shadow: 0 1px 4px rgba(255, 107, 0, 0.2);
}

.identity-badge.expert {
  color: #059669;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border: 1px solid #34d399;
  box-shadow: 0 1px 4px rgba(5, 150, 105, 0.2);
}

.identity-badge.vip {
  color: #2563eb;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border: 1px solid #60a5fa;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.2);
}

.profile-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.profile-middle {
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-mingju,
.user-card-mingju {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* 识别码 - 右下角绝对定位，底边与头像底边对齐 */
.profile-usercode-absolute {
  position: absolute;
  top: 16px;
  right: 36px;
  height: 80px;
  display: flex;
  align-items: flex-end;
}

.profile-usercode,
.user-card-id {
  font-size: 10px;
  color: #6b7280;
  font-weight: normal;
  font-family: ui-monospace, monospace;
}

.item-arrow,
.user-card-arrow {
  font-size: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: auto;
}

/* 升级福星卡片（Kimi 风格） */
.upgrade-card {
  margin-bottom: 15px;
}

.upgrade-card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to right, #fef3c7, #fffbeb);
  border-radius: 16px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.upgrade-card-link:hover {
  opacity: 0.95;
}

.upgrade-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.upgrade-icon {
  display: block;
}

.upgrade-info {
  flex: 1;
  margin-left: 12px;
  min-width: 0;
}

.upgrade-title {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
}

.upgrade-desc {
  font-size: 13px;
  color: #6b7280;
  margin-top: 2px;
}

/* 去升级按钮：橙边浅黄底，与图片一致 */
.upgrade-cta {
  padding: 8px 16px;
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #f59e0b;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  flex-shrink: 0;
}

/* 功能菜单网格（Kimi 风格 4 列） */
.menu-grid-section {
  margin-bottom: 15px;
}

.menu-grid {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 16px 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 8px;
}

.menu-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  transition: background 0.2s;
}

.menu-grid-item:hover {
  background: var(--bg-page);
}

.menu-grid-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 600;
  color: #374151;
}

.menu-grid-icon.i-gray {
  background: #f3f4f6;
  color: #4b5563;
}

.menu-grid-icon.i-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.menu-grid-icon.i-pink {
  background: #fce7f3;
  color: #be185d;
}

.menu-grid-icon.i-green {
  background: #d1fae5;
  color: #047857;
}

.menu-grid-icon.i-yellow {
  background: #fef3c7;
  color: #b45309;
}

.menu-grid-icon.i-orange {
  background: #fff3e6;
  color: #ea580c;
}

.menu-grid-icon.i-gift {
  background: #fff3e6;
  color: #ea580c;
}

.menu-grid-icon.i-book {
  background: #fff6ea;
  color: #c2410c;
}

.menu-grid-icon.i-purple {
  background: #f3e8ff;
  color: #7c3aed;
}

.menu-grid-icon.i-amber {
  background: #fef3c7;
  color: #b45309;
}

.grid-icon-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.menu-grid-text {
  font-size: 14px;
  color: #4b5563;
  text-align: center;
  line-height: 1.3;
  font-weight: 500;
}

/* 列表卡片（导入与关联、帮助与反馈、超级 BOSS、设置） */
.list-card {
  background: var(--bg-card);
  border-radius: 16px;
  margin-bottom: 15px;
  overflow: hidden;
}

.list-card-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background 0.2s;
}

.list-card-item:last-child {
  border-bottom: none;
}

.list-card-item:hover {
  background: #fafafa;
}

.list-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.list-card-icon.icon-blue {
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 18px;
  font-weight: bold;
}

.list-card-icon.icon-doc {
  background: #e0e7ff;
}

.list-card-icon.icon-crown {
  background: #fef3c7;
  font-size: 22px;
}

.list-card-body {
  flex: 1;
  min-width: 0;
}

.list-card-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.list-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.list-card-arrow {
  font-size: 18px;
  color: #ccc;
  flex-shrink: 0;
}

/* 功能列表（保留原样式供兼容） */
.menu-section {
  padding: 0 15px;
}

.menu-group {
  background: var(--bg-card);
  border-radius: 12px;
  margin-bottom: 15px;
  overflow: hidden;
}

.menu-title {
  padding: 12px 15px;
  font-size: 13px;
  color: var(--text-muted);
  background: #fafafa;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 14px 15px;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item:hover {
  background: #fafafa;
}

.menu-icon {
  font-size: 20px;
  margin-right: 12px;
}

.menu-text {
  flex: 1;
  font-size: 15px;
  color: var(--text-primary);
}

.menu-arrow {
  font-size: 18px;
  color: #ccc;
}

/* 版本信息 */
.version-info {
  text-align: center;
  padding: 24px 20px;
  color: var(--text-muted);
  font-size: 12px;
}

.version-info p {
  margin: 4px 0;
}

/* 响应式 */
@media screen and (min-width: 768px) {
  .my-content {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
  }
}