/**
 * dg-user-figma.css
 * 会员中心 / 用户主页 Figma 换皮
 * Figma: tJUUizA7NdeuwCZBBte1ta  3.0-3.24
 * 仅覆盖前端视觉，不改支付逻辑
 */

/* ── Figma 扩展 token ── */
:root {
  --dg-surface2:  #232429;
  --dg-input:     #27282d;
  --dg-line:      #35363c;
  --dg-text:      #f4f4f5;
  --dg-muted:     #7f8189;
  --dg-muted2:    #b0b1b3;
  --dg-gold:      #f7c948;
}

/* 顶栏：搜索 370×38；导航 Figma 80×38 单行 */
.dg-detail-page .nav-links a {
  height: 38px !important;
  width: 80px !important;
  min-width: 80px !important;
  max-width: 80px !important;
  padding: 0 12px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  flex-shrink: 0;
}
.dg-detail-page .nav-search-wrap {
  min-width: 280px !important;
  max-width: 370px !important;
  flex: 0 1 370px !important;
  width: 370px !important;
}
.dg-detail-page .nav-search-box {
  height: 38px !important;
}

/* ══════════════════════════════════════════
   user-home.html  公开个人主页 (3.0 风格)
   body.dg-detail-page 作用域
   ══════════════════════════════════════════ */

/* 页面主体偏移固定顶栏 */
.dg-detail-page .page {
  padding-top: 88px;
  max-width: 1230px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 80px;
}

/* 主卡片 — Figma surface + surface2 border */
.dg-detail-page .card {
  background: var(--dg-surface, #1a1b1e) !important;
  border: 1px solid var(--dg-surface2, #232429) !important;
  border-radius: 12px !important;
  padding: 0 !important;
  overflow: hidden;
}

/* 个人信息英雄区 — Figma 模糊玻璃卡 */
.dg-detail-page .profile {
  display: flex !important;
  align-items: center !important;
  gap: 20px !important;
  padding: 28px 32px !important;
  background: rgba(0, 0, 0, 0.2) !important;
  backdrop-filter: blur(11px) !important;
  border-radius: 20px !important;
  margin: 16px 16px 0 !important;
}

/* 头像 — 100px 圆形 */
.dg-detail-page .avatar {
  width: 100px !important;
  height: 100px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #ff2d78, #c2185b) !important;
  font-size: 42px !important;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 18, 144, 0.3);
}

/* 昵称 */
.dg-detail-page .name {
  font-size: 24px !important;
  font-weight: 700 !important;
  color: #fff !important;
  font-family: 'Noto Sans SC', sans-serif !important;
  line-height: 1.2;
}

/* UID / 角色徽标 */
.dg-detail-page .meta {
  font-size: 14px !important;
  color: var(--dg-muted2, #b0b1b3) !important;
  margin-top: 6px !important;
  font-family: 'Noto Sans SC', sans-serif !important;
}

/* ── 水平 Tab 栏 (Figma 3.0) ── */
.dg-detail-page .tabs {
  display: flex !important;
  gap: 0 !important;
  padding: 0 28px !important;
  margin: 20px 0 0 !important;
  border-bottom: 1px solid var(--dg-surface2, #232429) !important;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.dg-detail-page .tabs::-webkit-scrollbar { display: none; }

.dg-detail-page .tab {
  position: relative;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  color: var(--dg-muted, #7f8189) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  padding: 0 20px 14px !important;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s;
  font-family: 'Noto Sans SC', sans-serif;
}

/* 激活态下划线 — Figma #ff1290 2px */
.dg-detail-page .tab::after {
  content: '';
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  height: 2px;
  border-radius: 15px;
  background: transparent;
  transition: background 0.2s;
}

.dg-detail-page .tab.active {
  color: #fff !important;
}

.dg-detail-page .tab.active::after {
  background: var(--dg-accent, #ff1290) !important;
}

/* 作品区 — Figma 225:37196 四列 content-card 网格 */
.dg-detail-page .uh-works-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 20px 10px !important;
  padding: 20px 20px 28px !important;
  flex-direction: unset !important;
}

.dg-detail-page .uh-works-grid .ccard,
.dg-detail-page .uh-works-grid .uh-ccard {
  display: flex;
  flex-direction: column;
  background: var(--dg-surface, #1a1b1e);
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  min-height: 280px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.dg-detail-page .uh-works-grid .ccard:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.dg-detail-page .uh-works-grid .ccard-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #111;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dg-detail-page .uh-works-grid .ccard-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dg-detail-page .uh-works-grid .ccard-emoji {
  font-size: 36px;
}

.dg-detail-page .uh-works-grid .ccard-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 10px 8px;
  background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.85));
  pointer-events: none;
}

.dg-detail-page .uh-works-grid .ccard-duration {
  font-size: 11px;
  background: rgba(0, 0, 0, 0.5);
  padding: 3px 8px;
  border-radius: 6px;
  color: #f4f4f5;
}

.dg-detail-page .uh-works-grid .ccard-body {
  padding: 14px 12px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dg-detail-page .uh-works-grid .ccard-title {
  font-size: 14px !important;
  color: var(--dg-text, #f4f4f5) !important;
  font-weight: 500;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dg-detail-page .uh-works-grid .ccard-meta {
  font-size: 11px;
  color: var(--dg-muted, #7f8189) !important;
  margin-top: auto;
}

/* 女友资料 — 用同城女友卡样式，不再套视频 16:10 封面 */
.dg-detail-page .uh-works-grid.is-girls {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px 12px !important;
}

.dg-detail-page .uh-works-grid.is-girls .streamer-card,
.dg-detail-page .uh-works-grid.is-girls .uh-girl-card {
  display: flex;
  flex-direction: column;
  width: 100% !important;
  max-width: none !important;
  min-height: 0;
  text-decoration: none;
  color: inherit;
}

.dg-detail-page .uh-works-grid.is-girls .streamer-cover {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 220 / 214 !important;
  position: relative;
  overflow: hidden;
  background: #121214;
}

.dg-detail-page .uh-works-grid.is-girls .streamer-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dg-detail-page .uh-works-grid.is-girls .streamer-cover-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
}

.dg-detail-page .uh-works-grid.is-girls .streamer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
}

.dg-detail-page .uh-works-grid.is-girls .streamer-name {
  word-break: break-word;
}

@media (max-width: 900px) {
  .dg-detail-page .uh-works-grid.is-girls {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* legacy 行列表（保留类名兼容） */
.dg-detail-page .list {
  padding: 20px 20px 28px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

/* 列表项 — Figma item style */
.dg-detail-page .item {
  display: flex !important;
  gap: 14px !important;
  padding: 14px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255, 107, 157, 0.1) !important;
  background: rgba(0, 0, 0, 0.2) !important;
  color: inherit;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.dg-detail-page .item:hover {
  background: rgba(255, 18, 144, 0.07) !important;
  border-color: rgba(255, 18, 144, 0.2) !important;
}

.dg-detail-page .cover {
  width: 80px !important;
  height: 60px !important;
  border-radius: 8px !important;
  background: rgba(255, 18, 144, 0.15) !important;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dg-detail-page .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dg-detail-page .title {
  font-size: 14px !important;
  color: var(--dg-text, #f4f4f5) !important;
  font-weight: 500;
  line-height: 1.4;
}

.dg-detail-page .sub {
  font-size: 12px !important;
  color: var(--dg-muted, #7f8189) !important;
  margin-top: 6px !important;
}

.dg-detail-page .empty {
  text-align: center;
  padding: 56px 0;
  color: var(--dg-muted, #7f8189) !important;
}

/* ══════════════════════════════════════════
   个人中心弹窗  yiri-community.html
   #profile-modal-overlay > .dg-pm-modal
   覆盖 Figma 3.0-3.24 各 Tab 状态
   ══════════════════════════════════════════ */

/* 弹窗内容容器 — Figma #1a1b1e surface */
.dg-pm-modal {
  background: var(--dg-surface, #1a1b1e) !important;
  border: 1px solid var(--dg-surface2, #232429) !important;
  border-radius: 20px !important;
  width: 600px !important;
  max-width: 96vw;
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 弹窗头部区域 */
.dg-pm-modal .dg-pm-header {
  padding: 24px 28px 0;
  flex-shrink: 0;
}

/* 头像 — Figma border ring */
#pm-avatar {
  border: 2px solid rgba(255, 18, 144, 0.3) !important;
}

/* ── Tab 栏 (Figma 3.0 横向 tab) ── */
.pm-tab {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--dg-muted, #7f8189) !important;
  padding: 10px 8px !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  background: none !important;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  font-family: 'Noto Sans SC', sans-serif !important;
  white-space: nowrap;
}

.pm-tab.active {
  color: #fff !important;
  border-bottom-color: var(--dg-accent, #ff1290) !important;
}

/* Tab 分隔线 */
.dg-pm-tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--dg-surface2, #232429);
  overflow-x: auto;
  scrollbar-width: none;
}
.dg-pm-tab-bar::-webkit-scrollbar { display: none; }

/* 弹窗主体滚动区 */
.dg-pm-body {
  overflow-y: auto;
  flex: 1;
  padding: 24px 28px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 18, 144, 0.3) transparent;
}
.dg-pm-body::-webkit-scrollbar { width: 4px; }
.dg-pm-body::-webkit-scrollbar-thumb {
  background: rgba(255, 18, 144, 0.3);
  border-radius: 2px;
}

/* ── 面板卡片 (3.0 账号信息 / 3.1 编辑 / 3.2 会员中心…) ── */
.dg-pm-card {
  background: var(--dg-input, #27282d) !important;
  border: 1px solid var(--dg-surface2, #232429) !important;
  border-radius: 12px !important;
  padding: 20px !important;
  margin-bottom: 14px;
}

/* ── 子分类按钮 (.pm-sub-btn 已有类，覆盖 token) ── */
.pm-sub-btn {
  background: transparent !important;
  border: 1px solid var(--dg-surface2, #232429) !important;
  color: var(--dg-muted, #7f8189) !important;
  font-size: 13px !important;
  padding: 5px 14px !important;
  border-radius: 16px !important;
  cursor: pointer;
  font-family: 'Noto Sans SC', sans-serif;
  transition: all 0.2s;
}

.pm-sub-btn.active,
.pm-sub-btn:hover {
  background: rgba(255, 18, 144, 0.18) !important;
  border-color: rgba(255, 18, 144, 0.4) !important;
  color: #ff6b9d !important;
}

/* ── 会员套餐卡 (.vip-plan-card 已有类) ── */
.vip-plan-card {
  background: var(--dg-input, #27282d) !important;
  border: 2px solid var(--dg-surface2, #232429) !important;
  border-radius: 12px !important;
  cursor: pointer;
  transition: all 0.2s;
}

.vip-plan-card:hover {
  border-color: var(--dg-accent, #ff1290) !important;
  background: rgba(255, 18, 144, 0.1) !important;
}

.vip-plan-card.selected {
  border-color: var(--dg-accent, #ff1290) !important;
  background: rgba(255, 18, 144, 0.12) !important;
}

/* ── 输入框 (3.1 编辑个人信息 / 3.3 充值) ── */
#profile-modal-overlay input[type="email"],
#profile-modal-overlay input[type="password"],
#profile-modal-overlay input[type="text"],
#profile-modal-overlay input[type="number"] {
  background: var(--dg-input, #27282d) !important;
  border: 1px solid var(--dg-line, #35363c) !important;
  border-radius: 8px !important;
  color: var(--dg-text, #f4f4f5) !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  outline: none !important;
  transition: border-color 0.2s;
  width: 100%;
  box-sizing: border-box;
  font-family: 'Noto Sans SC', sans-serif;
}

#profile-modal-overlay input:focus {
  border-color: var(--dg-accent, #ff1290) !important;
}

/* ── 保存/主要操作按钮 ── */
#profile-modal-overlay button[onclick="saveProfileEdit()"],
#profile-modal-overlay button[onclick="showVipModal()"] {
  background: var(--dg-accent, #ff1290) !important;
  border: none !important;
  border-radius: 8px !important;
  color: #fff !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: opacity 0.2s;
}

#profile-modal-overlay button[onclick="saveProfileEdit()"]:hover,
#profile-modal-overlay button[onclick="showVipModal()"]:hover {
  opacity: 0.88;
}

/* VIP 开通按钮保持金色风格 */
#profile-modal-overlay button[onclick="showVipModal()"] {
  background: linear-gradient(135deg, #f7c948, #e8a020) !important;
  color: #1a1200 !important;
}

/* ── 数据统计格子 (3.0 个人信息面板) ── */
.dg-pm-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  text-align: center;
}

.dg-pm-stat-item {
  background: rgba(255, 18, 144, 0.08);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.dg-pm-stat-item:hover {
  background: rgba(255, 18, 144, 0.16);
}

.dg-pm-stat-num {
  font-size: 26px;
  font-weight: 700;
  color: #ff6b9d;
}

.dg-pm-stat-label {
  font-size: 11px;
  color: var(--dg-muted, #7f8189);
  margin-top: 4px;
}

/* ── 收藏 / 历史记录项 ── */
.dg-pm-list-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 107, 157, 0.08);
  background: rgba(0, 0, 0, 0.2);
  transition: background 0.2s;
}

.dg-pm-list-item:hover {
  background: rgba(255, 18, 144, 0.07);
  border-color: rgba(255, 18, 144, 0.18);
}

/* 关闭按钮 */
#profile-modal-overlay button[onclick="closeProfileModal()"] {
  background: rgba(255, 18, 144, 0.12) !important;
  border: none !important;
  color: #ff6b9d !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  cursor: pointer;
  font-size: 16px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

#profile-modal-overlay button[onclick="closeProfileModal()"]:hover {
  background: rgba(255, 18, 144, 0.24) !important;
}

/* ── 响应式 ── */
@media (max-width: 680px) {
  .dg-pm-modal {
    width: 100% !important;
    max-height: 92vh;
    border-radius: 16px !important;
  }

  .dg-detail-page .profile {
    padding: 18px 16px !important;
    margin: 12px 12px 0 !important;
  }

  .dg-detail-page .avatar {
    width: 72px !important;
    height: 72px !important;
    font-size: 32px !important;
  }

  .dg-detail-page .name {
    font-size: 18px !important;
  }

  .dg-detail-page .tabs {
    padding: 0 12px !important;
    gap: 0 !important;
  }

  .dg-detail-page .tab {
    font-size: 14px !important;
    padding: 0 12px 12px !important;
  }

  .dg-detail-page .uh-works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px 8px !important;
    padding: 16px 12px 24px !important;
  }
}
