/* ==========================================================
   元能台 · 统一主题 CSS (v1.0)
   设计系统：简洁 / 亮色 / 留白多 / 微信&扣子风格
   ========================================================== */

/* ---------- 0. CSS 变量（设计 Token） ---------- */
:root {
  /* 品牌色（主色：元能蓝绿系） */
  --color-primary: #10b981;           /* 主色（微信绿，呼应智能、生命力） */
  --color-primary-hover: #059669;
  --color-primary-light: #ecfdf5;
  --color-primary-bg: #f0fdf4;

  /* 辅助色 */
  --color-accent: #1677ff;            /* 辅助蓝（元能蓝） */
  --color-accent-hover: #0958d9;
  --color-accent-light: #e6f4ff;
  --color-warn: #fa8c16;
  --color-danger: #ff4d4f;
  --color-success: #52c41a;

  /* 中性色（文字） */
  --color-text-primary: #1f2329;      /* 主文字 */
  --color-text-secondary: #4e5969;    /* 次文字 */
  --color-text-tertiary: #86909c;     /* 辅助文字 */
  --color-text-quaternary: #c9cdd4;   /* 禁用/占位 */
  --color-text-white: #ffffff;

  /* 背景色 */
  --color-bg-page: #f5f6f7;           /* 页面底色 */
  --color-bg-card: #ffffff;           /* 卡片底色 */
  --color-bg-sidebar: #f7f8fa;        /* 侧边栏底色 */
  --color-bg-hover: #f2f3f5;          /* hover 底色 */
  --color-bg-active: #e8f5e9;         /* active 底色 */
  --color-bg-input: #f2f3f5;          /* 输入框底色 */

  /* 边框/分割线 */
  --color-border: #e5e6eb;
  --color-border-light: #f0f1f2;
  --color-border-primary: #07c160;

  /* 间距 */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 24px;
  --space-3xl: 32px;

  /* 圆角 */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-top: 0 -2px 12px rgba(0, 0, 0, 0.06);

  /* 尺寸 */
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 64px;
  --mobile-tabbar-height: 50px;
  --topbar-height: 48px;

  /* 字体 */
  --font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Helvetica Neue", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --font-size-xs: 12px;
  --font-size-sm: 13px;
  --font-size-base: 14px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --font-size-2xl: 22px;
  --font-size-3xl: 28px;
  --font-size-4xl: 36px;

  /* 过渡 */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.35s ease;

  /* z-index */
  --z-sidebar: 100;
  --z-tabbar: 999;
  --z-modal: 1000;
  --z-toast: 2000;
}

/* ---------- 1. Reset & 基础 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  background: var(--color-bg-page);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--color-accent-hover);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  outline: none;
}

img {
  max-width: 100%;
  display: block;
}

ul,
ol {
  list-style: none;
}

/* ---------- 2. 通用组件：按钮 ---------- */
.app-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: var(--font-size-sm);
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
}
.app-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-bg);
}
.app-btn--primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.app-btn--primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: #fff;
}
.app-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--color-text-secondary);
}
.app-btn--ghost:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}
.app-btn--sm {
  padding: 4px 10px;
  font-size: var(--font-size-xs);
}
.app-btn--lg {
  padding: 10px 20px;
  font-size: var(--font-size-base);
}
.app-btn--icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* ---------- 3. 通用组件：卡片 ---------- */
.app-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
}

/* ---------- 4. 通用组件：输入框 ---------- */
.app-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-card);
  font-size: var(--font-size-sm);
  transition: border-color var(--transition-fast);
}
.app-input:focus {
  border-color: var(--color-primary);
}

/* ---------- 5. 通用组件：标签/徽章 ---------- */
.app-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: var(--font-size-xs);
  border-radius: var(--radius-full);
  background: var(--color-bg-hover);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-light);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.app-tag:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.app-tag--active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: var(--color-primary-light);
  font-weight: 500;
}

/* ---------- 6. 布局系统（PC 三栏 + 手机端底部 Tab） ---------- */

/* 主应用容器 */
.app-layout {
  display: flex;
  min-height: 100vh;
  background: var(--color-bg-page);
  position: relative;
}

/* 主内容区（PC 端带侧边栏偏移） */
.app-main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-width);
  transition: margin-left var(--transition-base);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 侧边栏折叠状态 */
.app-layout.sidebar-collapsed .app-main {
  margin-left: var(--sidebar-collapsed-width);
}

/* ---------- 7. 侧边栏（.app-sidebar）微信PC风格 ---------- */
.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--color-bg-sidebar);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  z-index: var(--z-sidebar);
  transition: width var(--transition-base);
  overflow: hidden;
  flex-shrink: 0;
}

/* 折叠状态 */
.app-sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.app-sidebar.collapsed .sb-text,
.app-sidebar.collapsed .sb-user-info,
.app-sidebar.collapsed .sb-footer-label {
  display: none;
}

.app-sidebar.collapsed .sb-nav-item {
  justify-content: center;
  padding: 12px 0;
}

.app-sidebar.collapsed .sb-nav-icon {
  margin: 0;
}

.app-sidebar.collapsed .sb-logo-text {
  display: none;
}

.app-sidebar.collapsed .sb-toggle-btn {
  transform: rotate(180deg);
}

/* 侧边栏顶部：Logo + 折叠按钮 */
.sb-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 14px;
  min-height: 64px;
  border-bottom: 1px solid var(--color-border-light);
  position: relative;
  flex-shrink: 0;
}

.sb-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #07c160, #10b981);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.sb-logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-primary);
  white-space: nowrap;
}

/* 品牌行容器 */
.sb-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.sb-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sb-brand-sep {
  margin: 0 6px;
  color: var(--color-text-tertiary);
  font-weight: 400;
  font-size: 14px;
}

.sb-brand-sub {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.sb-slogan {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-tertiary);
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.sb-toggle-btn {
  position: absolute;
  top: 20px;
  right: -12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--color-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary);
  font-size: 12px;
  z-index: 10;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}
.sb-toggle-btn:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* 侧边栏：用户区 */
.sb-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border-light);
  flex-shrink: 0;
}

.sb-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), #10b981);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.sb-user-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.sb-user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.sb-user-status {
  font-size: 11px;
  color: var(--color-primary);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.sb-user-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  display: inline-block;
}

/* 侧边栏：导航 */
.sb-nav {
  flex: 1;
  padding: 8px 0;
  overflow-y: auto;
}

.sb-nav-section {
  padding: 8px 14px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-tertiary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sb-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  cursor: pointer;
  font-size: 14px;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
  position: relative;
}

.sb-nav-item:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.sb-nav-item.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-left-color: var(--color-primary);
  font-weight: 600;
}

.sb-nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sb-nav-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sb-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--color-danger);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* 侧边栏：底部 */
.sb-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.sb-footer-label {
  font-size: 13px;
  color: var(--color-text-tertiary);
}

/* ---------- 8. 底部 Tab 栏（.mobile-tabbar） ---------- */
.mobile-tabbar {
  display: none;
}

/* ---------- 9. 响应式断点（1200px 为界） ---------- */

/* 手机 / 平板：宽度 <= 1200px */
@media (max-width: 1200px) {
  /* 隐藏侧边栏 */
  .app-sidebar {
    display: none !important;
  }

  /* 主内容区不留侧边栏偏移 */
  .app-main {
    margin-left: 0 !important;
  }

  .app-layout.sidebar-collapsed .app-main {
    margin-left: 0 !important;
  }

  /* 显示底部 Tab 栏 */
  .mobile-tabbar {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: var(--mobile-tabbar-height) !important;
    background: #ffffff !important;
    border-top: 1px solid var(--color-border) !important;
    z-index: var(--z-tabbar) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04) !important;
  }

  .tabbar-inner {
    display: flex;
    width: 100%;
    height: 100%;
    max-width: 640px;
    margin: 0 auto;
  }

  .tabbar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    color: var(--color-text-tertiary);
    text-decoration: none;
    font-size: 10px;
    padding: 4px 0;
    line-height: 1.2;
    -webkit-tap-highlight-color: transparent;
    transition: color var(--transition-fast);
  }

  .tabbar-item.active {
    color: var(--color-primary);
    font-weight: 500;
  }

  .tabbar-item svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .tabbar-label {
    font-size: 10px;
    line-height: 1;
  }

  /* body 底部留 70px 空间给 Tab 栏 */
  body {
    padding-bottom: var(--mobile-tabbar-height);
  }

  /* 对话页：输入框在 Tab 上方，不能被 Tab 遮挡 */
  .chat-input-wrapper {
    bottom: calc(var(--mobile-tabbar-height) + env(safe-area-inset-bottom)) !important;
  }
}

/* 大屏 PC：宽度 > 1200px */
@media (min-width: 1201px) {
  .mobile-tabbar {
    display: none !important;
  }
}

/* ---------- 10. 首页专属样式 ---------- */

/* Hero 区域 */
.home-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 60px;
  text-align: center;
  min-height: calc(100vh - 80px);
  box-sizing: border-box;
}

.home-hero-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.home-hero-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #07c160, #10b981);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(7, 193, 96, 0.2);
  flex-shrink: 0;
  padding: 0;
}

.home-hero-title-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-hero-title {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  color: var(--color-text-primary);
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.home-hero-skillbody {
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin: 0;
  font-weight: 500;
  letter-spacing: 2px;
}

.home-hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-tertiary);
  margin-bottom: 28px;
  font-weight: 400;
}

/* 首页输入框 */
.home-input-card {
  width: 100%;
  max-width: 600px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.home-input-card:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 4px 20px rgba(7, 193, 96, 0.15);
}

.home-input-area {
  padding: 16px 18px 8px;
}

.home-input-area textarea {
  width: 100%;
  border: none;
  background: transparent;
  font-size: var(--font-size-lg);
  resize: none;
  line-height: 1.6;
  color: var(--color-text-primary);
  min-height: 48px;
  max-height: 200px;
  outline: none;
}

.home-input-area textarea::placeholder {
  color: var(--color-text-quaternary);
}

.home-input-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 12px;
  flex-wrap: wrap;
}

.home-input-toolbar .tb-left {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.home-input-toolbar .tb-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tb-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary);
  transition: all var(--transition-fast);
  cursor: pointer;
  background: transparent;
  border: none;
}
.tb-btn:hover {
  background: var(--color-bg-hover);
  color: var(--color-primary);
}
.tb-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tb-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}
.tb-send:hover {
  background: var(--color-primary-hover);
  transform: scale(1.05);
}
.tb-send svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

/* 快捷标签 */
.home-quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
  max-width: 560px;
}

.quick-tag {
  padding: 8px 16px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.quick-tag:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-bg);
  transform: translateY(-1px);
}

.quick-tag-icon {
  font-size: 16px;
  line-height: 1;
}

/* 首页内容区（分类 / 推荐等） */
.home-sections {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.home-section {
  margin-bottom: 36px;
}

.home-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.home-section-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text-primary);
}

.home-section-more {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
}

/* 手机端首页调整 */
@media (max-width: 1200px) {
  .home-hero {
    padding: 32px 16px 40px;
    min-height: calc(100vh - 120px);
  }

  .home-hero-brand {
    gap: 10px;
    margin-bottom: 10px;
  }

  .home-hero-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(7, 193, 96, 0.2);
  }

  .home-hero-title {
    font-size: var(--font-size-2xl);
    margin: 0;
  }

  .home-hero-skillbody {
    font-size: 10px;
    letter-spacing: 1.5px;
  }

  .home-hero-subtitle {
    font-size: var(--font-size-base);
    margin-bottom: 20px;
  }

  .home-quick-tags {
    gap: 8px;
    margin-top: 18px;
  }

  .quick-tag {
    padding: 6px 12px;
    font-size: var(--font-size-xs);
  }

  .home-sections {
    padding: 24px 16px 40px;
  }
}

/* ---------- 11. 对话页专属样式 ---------- */

.chat-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* 对话顶栏 */
.chat-topbar {
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: var(--color-bg-card);
  border-bottom: 1px solid var(--color-border);
  gap: 10px;
}

.chat-topbar-title {
  flex: 1;
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: transparent;
  border: none;
}
.topbar-icon-btn:hover {
  background: var(--color-bg-hover);
  color: var(--color-primary);
}
.topbar-icon-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 菜单按钮：仅手机端显示 */
.chat-menu-btn {
  display: none;
}

@media (max-width: 1200px) {
  .chat-menu-btn {
    display: flex !important;
  }
}

/* 消息区 */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  background: var(--color-bg-page);
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}
.chat-messages::-webkit-scrollbar-thumb {
  background: #c9cdd4;
  border-radius: 2px;
}

.msg-list {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px;
}

.welcome-box {
  text-align: center;
  padding: 40px 20px 20px;
}

.welcome-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), #10b981);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  margin: 0 auto 16px;
}

.welcome-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 6px;
}

.welcome-desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.msg {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  align-items: flex-start;
}

.msg.msg-me {
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.msg-bot .msg-avatar {
  background: linear-gradient(135deg, var(--color-primary), #10b981);
  color: #fff;
}

.msg-me .msg-avatar {
  background: var(--color-accent);
  color: #fff;
}

.msg-bubble {
  max-width: 70%;
  padding: 10px 14px;
  font-size: var(--font-size-base);
  line-height: 1.7;
  word-break: break-word;
  border-radius: 2px 14px 14px 14px;
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm);
}

.msg-me .msg-bubble {
  background: linear-gradient(135deg, var(--color-primary), #10b981);
  color: #fff;
  border-radius: 14px 2px 14px 14px;
}

.msg-bubble p {
  margin: 0 0 6px;
}
.msg-bubble p:last-child {
  margin: 0;
}

.msg-bubble code {
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 13px;
}
.msg-me .msg-bubble code {
  background: rgba(255, 255, 255, 0.2);
}

.typing-dots {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}
.typing-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-text-quaternary);
  animation: typingBounce 1.2s infinite;
}
.typing-dots i:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-dots i:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes typingBounce {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

/* 输入区 */
.chat-input-wrapper {
  flex-shrink: 0;
  background: var(--color-bg-card);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  transition: bottom var(--transition-base);
}

.chat-selector-bar {
  padding: 6px 12px 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.chat-input-bar {
  display: flex;
  align-items: flex-end;
  padding: 8px 12px 10px;
  gap: 8px;
}

.chat-input-bar textarea {
  flex: 1;
  background: var(--color-bg-input);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  padding: 10px 14px;
  border-radius: 20px;
  font-size: 15px;
  resize: none;
  outline: none;
  max-height: 160px;
  min-height: 42px;
  line-height: 1.5;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.chat-input-bar textarea:focus {
  border-color: var(--color-primary);
  background: #fff;
}

.chat-input-bar .input-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: transparent;
  border: none;
  flex-shrink: 0;
}
.chat-input-bar .input-btn:hover {
  background: var(--color-bg-hover);
  color: var(--color-primary);
}
.chat-input-bar .input-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-input-bar .send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  flex-shrink: 0;
}
.chat-input-bar .send-btn:hover {
  background: var(--color-primary-hover);
  transform: scale(1.05);
}
.chat-input-bar .send-btn:disabled {
  background: #c9cdd4;
  transform: none;
  cursor: not-allowed;
}
.chat-input-bar .send-btn svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

/* 对话页手机端调整 */
@media (max-width: 1200px) {
  .chat-layout {
    /* 底部 Tab 栏 + 输入框都要在可视区内 */
    padding-bottom: 0;
  }

  .msg-bubble {
    max-width: 78%;
    font-size: 15px;
  }

  .chat-input-bar {
    padding: 8px 10px 10px;
  }

  .chat-input-bar textarea {
    font-size: 16px;
    min-height: 40px;
    max-height: 120px;
    padding: 9px 14px;
  }

  /* 输入框工具栏在底部Tab上方 */
  .chat-input-wrapper {
    position: relative;
    bottom: 0;
  }

  /* 侧边栏浮层（手机端点击菜单弹出） */
  .sidebar-mask {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 150;
  }
  .sidebar-mask.show {
    display: block;
  }

  /* 手机端侧边栏改为抽屉 */
  .app-sidebar.mobile-drawer {
    display: flex !important;
    transform: translateX(-100%);
    transition: transform var(--transition-base);
    z-index: 200;
  }
  .app-sidebar.mobile-drawer.open {
    transform: translateX(0);
  }
}

/* ---------- 12. 工具类 ---------- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.text-center { text-align: center; }
.text-sm { font-size: var(--font-size-sm); }
.text-lg { font-size: var(--font-size-lg); }
.text-muted { color: var(--color-text-tertiary); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

/* 隐藏滚动条但保留滚动功能 */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}


/* ==========================================================
   顶部导航栏（PC端） sb-topnavbar
   微信PC风简洁审美，亮色鲜明
   ========================================================== */

.sb-topnavbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: #ffffff;
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  display: none;
}

.sb-topnav-inner {
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.sb-topnav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.sb-topnav-brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: linear-gradient(135deg, #07c160, #10b981);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(7, 193, 96, 0.25);
}

.sb-topnav-brand-logo .paw-logo {
  width: 20px !important;
  height: 20px !important;
}

.sb-topnav-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.3;
}

.sb-topnav-brand-title {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.sb-topnav-brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.3px;
}

.sb-topnav-brand-sep {
  color: var(--color-text-tertiary);
  font-weight: 400;
  font-size: 14px;
}

.sb-topnav-brand-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.sb-topnav-brand-slogan {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-tertiary);
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.sb-topnav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 320px;
  flex-shrink: 0;
  visibility: visible;
  opacity: 1;
  z-index: 1;
}

.sb-topnav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  height: 34px;
  line-height: 34px;
  border-radius: 10px;
  color: #4e5969 !important;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  visibility: visible;
  opacity: 1;
  flex-shrink: 0;
}

.sb-topnav-item:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.sb-topnav-item.active {
  color: var(--color-text-primary) !important;
  font-weight: 700;
}

.sb-topnav-item.active::after {
  content: "";
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: var(--color-accent);
}

.sb-topnav-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 100px;
  justify-content: flex-end;
}

.sb-topnav-avatar-wrapper {
  position: relative;
}

.sb-topnav-avatar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition-fast);
  background: transparent;
  border: none;
}

.sb-topnav-avatar-btn:hover {
  background: var(--color-bg-hover);
}

.sb-topnav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #07c160, #10b981);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.sb-topnav-avatar .paw-logo {
  width: 20px !important;
  height: 20px !important;
}

.sb-topnav-arrow {
  color: var(--color-text-tertiary);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.sb-topnav-avatar-btn[aria-expanded="true"] .sb-topnav-arrow {
  transform: rotate(180deg);
}

.sb-topnav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all var(--transition-fast);
  z-index: calc(var(--z-modal) + 1);
}

.sb-topnav-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sb-dropdown-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px 14px;
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: 4px;
}

.sb-dropdown-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #07c160, #10b981);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sb-dropdown-avatar .paw-logo {
  width: 24px !important;
  height: 24px !important;
}

/* 头像内容：用户头像图片 / 昵称首字（登录态统一） */
.sb-topnav-avatar {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}
.sb-topnav-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.sb-dropdown-avatar {
  overflow: hidden;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
}
.sb-dropdown-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* 未登录：登录/注册按钮组 */
.sb-topnav-auth-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sb-topnav-auth-buttons .sb-nav-btn-login,
.sb-topnav-auth-buttons .sb-nav-btn-register {
  padding: 6px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.4;
  transition: background 0.2s, border-color 0.2s;
}
.sb-topnav-auth-buttons .sb-nav-btn-login {
  color: #10b981;
  border: 1px solid #10b981;
  background: #fff;
}
.sb-topnav-auth-buttons .sb-nav-btn-login:hover { background: #f0fdf4; }
.sb-topnav-auth-buttons .sb-nav-btn-register {
  background: #10b981;
  color: #fff;
  border: 1px solid #10b981;
}
.sb-topnav-auth-buttons .sb-nav-btn-register:hover { background: #059669; border-color: #059669; }

.sb-dropdown-userinfo {
  flex: 1;
  min-width: 0;
}

.sb-dropdown-username {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.3;
}

.sb-dropdown-vip {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--color-text-tertiary);
  background: var(--color-bg-hover);
  border-radius: 4px;
  font-weight: 500;
}

.sb-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--color-text-primary);
  text-decoration: none;
  border-radius: 8px;
  transition: background var(--transition-fast);
  cursor: pointer;
}

.sb-dropdown-item:hover {
  background: var(--color-bg-hover);
}

.sb-dropdown-item--danger {
  color: var(--color-danger);
}

.sb-dropdown-item--danger:hover {
  background: #fff1f0;
}

.sb-dropdown-item-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sb-dropdown-item-text {
  flex: 1;
}

.sb-dropdown-divider {
  height: 1px;
  background: var(--color-border-light);
  margin: 6px 6px;
}

@media (min-width: 1201px) {
  .sb-topnavbar {
    display: block;
  }

  .app-main {
    margin-left: 0 !important;
    padding-top: 64px;
  }

  .app-layout.sidebar-collapsed .app-main {
    margin-left: 0 !important;
  }

  body[data-page="home"] .home-hero {
    min-height: calc(100vh - 64px);
    padding-top: 40px;
  }

  body[data-page="home"] .home-hero-logo {
    width: 38px;
    height: 38px;
    box-shadow: 0 3px 10px rgba(7, 193, 96, 0.2);
  }

  body[data-page="home"] .home-hero-title {
    font-size: 32px;
    margin: 0;
  }

  body[data-page="home"] .home-hero-subtitle {
    margin-bottom: 22px;
    font-size: 15px;
  }
}

@media (max-width: 1200px) {
  .sb-topnavbar {
    display: none !important;
  }
}


/* ==========================================================
   我的页面 (body[data-page="mine"])
   资产总览风格：微信式极简 / 白色卡片 / 绿色主调
   ========================================================== */

body[data-page="mine"] {
  background: var(--color-bg-page);
}

/* mine 页面布局：PC 端 左200px侧栏 + 右内容区 */
body[data-page="mine"] .app-layout {
  display: flex;
  min-height: 100vh;
}

body[data-page="mine"] .app-main {
  margin-left: 200px;
  padding-top: 64px;
  overflow-y: auto;
  height: 100vh;
}

/* 手机端顶部标题栏 */
.mine-mobile-header {
  display: none;
}

/* ========== 左侧空间菜单 ========== */
.mine-sidebar {
  position: fixed;
  top: 64px;
  left: 0;
  bottom: 0;
  width: 200px;
  background: var(--color-bg-sidebar);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  z-index: var(--z-sidebar);
  flex-shrink: 0;
  overflow-y: auto;
}

.mine-sidebar-nav {
  padding: 12px 0;
}

.mine-sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 14px;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  position: relative;
  border-left: 3px solid transparent;
}

.mine-sidebar-item:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.mine-sidebar-item.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-left-color: var(--color-primary);
  font-weight: 600;
}

.mine-sidebar-icon {
  font-size: 18px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.mine-sidebar-text {
  flex: 1;
}

/* ========== 内容区 ========== */
.mine-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
}

/* ========== 用户信息条 ========== */
.mine-user-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  margin-bottom: 16px;
}

.mine-user-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mine-user-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), #10b981);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(7, 193, 96, 0.2);
}

.mine-user-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mine-user-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.3;
}

.mine-user-level {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  color: var(--color-text-tertiary);
  background: var(--color-bg-hover);
  border-radius: 999px;
  font-weight: 500;
  width: fit-content;
}

.mine-upgrade-btn {
  font-weight: 600;
  padding: 8px 18px;
}

/* ========== 通用卡片 ========== */
.mine-card {
  padding: 20px 24px;
  margin-bottom: 16px;
}

.mine-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.mine-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
}

.mine-card-more {
  font-size: 13px;
  color: var(--color-text-tertiary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.mine-card-more:hover {
  color: var(--color-primary);
}

/* 两列行 */
.mine-row {
  display: grid;
  gap: 16px;
  margin-bottom: 0;
}

.mine-row-2 {
  grid-template-columns: repeat(2, 1fr);
}

.mine-row-2 .mine-card {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

/* ========== 技能体横向滚动 ========== */
.mine-skill-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding-left: 4px;
  padding-right: 4px;
}

.mine-skill-scroll::-webkit-scrollbar {
  height: 4px;
}

.mine-skill-scroll::-webkit-scrollbar-thumb {
  background: #c9cdd4;
  border-radius: 2px;
}

.mine-skill-card {
  flex-shrink: 0;
  width: 140px;
  padding: 16px 12px;
  background: var(--color-bg-page);
  border-radius: var(--radius-lg);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.mine-skill-card:hover {
  background: var(--color-primary-bg);
  border-color: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.mine-skill-icon {
  font-size: 32px;
  margin-bottom: 8px;
  line-height: 1;
}

.mine-skill-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.mine-skill-desc {
  font-size: 11px;
  color: var(--color-text-tertiary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========== 对话历史列表 ========== */
.mine-chat-list {
  display: flex;
  flex-direction: column;
}

.mine-chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border-light);
  cursor: pointer;
  transition: background var(--transition-fast);
  margin: 0 -4px;
  padding-left: 4px;
  padding-right: 4px;
  border-radius: var(--radius-sm);
}

.mine-chat-item:hover {
  background: var(--color-bg-hover);
}

.mine-chat-item:last-child {
  border-bottom: none;
}

.mine-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.mine-chat-content {
  flex: 1;
  min-width: 0;
}

.mine-chat-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 2px;
}

.mine-chat-msg {
  font-size: 12px;
  color: var(--color-text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mine-chat-time {
  font-size: 12px;
  color: var(--color-text-quaternary);
  flex-shrink: 0;
}

/* ========== 收藏列表 ========== */
.mine-fav-group + .mine-fav-group {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-light);
}

.mine-fav-group-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-tertiary);
  margin-bottom: 8px;
}

.mine-fav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mine-fav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 13px;
  color: var(--color-text-secondary);
  transition: background var(--transition-fast);
}

.mine-fav-item:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.mine-fav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.mine-fav-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========== 创作网格 ========== */
.mine-creation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.mine-creation-item {
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.mine-creation-item:hover {
  transform: translateY(-2px);
}

.mine-creation-thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 6px;
}

.mine-creation-thumb--doc {
  background: linear-gradient(135deg, #e6f4ff, #f0f7ff);
}

.mine-creation-thumb--img {
  background: linear-gradient(135deg, #fff0f5, #fdf2f8);
}

.mine-creation-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.mine-creation-time {
  font-size: 11px;
  color: var(--color-text-tertiary);
}

/* ========== 数据统计 ========== */
.mine-stats-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mine-stats-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.mine-stats-item:last-child {
  border-bottom: none;
}

.mine-stats-label {
  font-size: 14px;
  color: var(--color-text-secondary);
}

.mine-stats-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.mine-stats-unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-tertiary);
  margin-left: 2px;
}

/* ========== 空状态卡片 ========== */
.mine-empty {
  padding: 60px 24px;
  text-align: center;
}

.mine-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.mine-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.mine-empty-desc {
  font-size: 13px;
  color: var(--color-text-tertiary);
}

/* ===================== 响应式 ===================== */

/* 平板：768-1023px —— 隐藏左侧栏 */
@media (max-width: 1023px) and (min-width: 768px) {
  body[data-page="mine"] .app-main {
    margin-left: 0 !important;
    padding-top: 64px;
  }

  .mine-sidebar {
    display: none !important;
  }

  .mine-content {
    padding: 20px;
    max-width: 100%;
  }
}

/* 手机：<768px */
@media (max-width: 767px) {
  body[data-page="mine"] .app-main {
    margin-left: 0 !important;
    padding-top: 0;
    height: auto;
    overflow: visible;
  }

  .mine-sidebar {
    display: none !important;
  }

  /* 手机端顶部标题栏 */
  .mine-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 16px;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .mine-mobile-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-text-primary);
  }

  .mine-mobile-setting {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
  }

  .mine-mobile-setting:active {
    background: var(--color-bg-hover);
  }

  .mine-content {
    padding: 16px;
    max-width: 100%;
  }

  /* 用户信息条 - 手机端 */
  .mine-user-bar {
    padding: 16px;
    margin-bottom: 12px;
  }

  .mine-user-avatar {
    width: 56px;
    height: 56px;
    padding: 8px;
  }

  .mine-user-name {
    font-size: 18px;
  }

  .mine-upgrade-btn {
    padding: 6px 14px;
    font-size: 12px;
  }

  /* 卡片 - 手机端 */
  .mine-card {
    padding: 16px;
    margin-bottom: 12px;
  }

  .mine-card-header {
    margin-bottom: 12px;
  }

  .mine-card-title {
    font-size: 15px;
  }

  /* 两列变一列 */
  .mine-row-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* 技能体卡片 - 手机端 */
  .mine-skill-card {
    width: 120px;
    padding: 14px 10px;
  }

  .mine-skill-icon {
    font-size: 28px;
  }

  .mine-skill-name {
    font-size: 13px;
  }

  /* 创作网格 - 手机端 3列不变 */
  .mine-creation-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .mine-creation-thumb {
    font-size: 24px;
  }

  /* 数据统计 - 手机端 */
  .mine-stats-value {
    font-size: 20px;
  }
}
