/* ============================================================
   AI 生图平台 V2 — 全局样式
   移动端优先 · 渐变紫色主题 · 卡片式布局
   ============================================================ */

/* ---------- 全局 CSS 变量 ---------- */
:root {
  --primary:        #6366f1;
  --primary-dark:   #4f46e5;
  --primary-light:  #818cf8;
  --secondary:      #8b5cf6;
  --gradient:       linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --gradient-hover: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --bg:             #f5f3ff;
  --bg-card:        #ffffff;
  --bg-input:       #f9fafb;
  --text-primary:   #1f2937;
  --text-secondary: #6b7280;
  --text-muted:     #9ca3af;
  --border:         #e5e7eb;
  --border-focus:   #6366f1;
  --shadow-card:    0 2px 12px rgba(99, 102, 241, 0.08);
  --shadow-btn:     0 4px 14px rgba(99, 102, 241, 0.35);
  --radius:         12px;
  --radius-sm:      8px;
  --max-width:      480px;
}

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

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- 应用容器 ---------- */
#app {
  max-width: var(--max-width);
  margin: 0 auto;
  /* min-height: 100vh; */
  background: var(--bg);
  position: relative;
 /*  padding-bottom: 70px; */
}

/* ---------- 页面容器 ---------- */
.page {
  display: none;
  padding: 8px;
  animation: fadeIn 0.25s ease;
}
.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 页面标题 ---------- */
.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 12px;
  margin-bottom: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:active {
  transform: scale(0.98);
}

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

.card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover {
  background: var(--gradient-hover);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}
.btn-primary:active {
  transform: scale(0.96);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.btn-secondary.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

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

.btn-block {
  width: 100%;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
}
.btn-danger:hover {
  background: #dc2626;
}

/* ---------- 输入框 ---------- */
.input-group {
  margin-bottom: 12px;
}

.input-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-input);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.input::placeholder {
  color: var(--text-muted);
}

textarea.input {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

/* ---------- 选择器组 ---------- */
.select-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.select-item {
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.select-item.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99, 102, 241, 0.06);
  font-weight: 600;
}
.select-item:active {
  transform: scale(0.95);
}
.select-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #9ca3af;
}

/* ---------- 尺寸选择器组（Grid 7列两排对齐） ---------- */
.size-select-group {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 0;
}
.size-select-group .select-item {
  padding: 6px 0;
  font-size: 12px;
  text-align: center;
  border-radius: 8px;
  min-width: 0;
  white-space: nowrap;
}

/* 锁定比例提示条 */
.ratio-locked-tip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.07);
  border: 1.5px solid rgba(99, 102, 241, 0.25);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--primary);
  margin-top: 2px;
}
.ratio-locked-tip .lock-icon {
  font-size: 15px;
}

/* ---------- 底部 Tab 导航 ---------- */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 6px 0 env(safe-area-inset-bottom, 8px);
  z-index: 100;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 12px;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
  font-size: 10px;
}
.tab-item.active {
  color: var(--primary);
}
.tab-item .tab-icon {
  font-size: 22px;
  line-height: 1;
}
.tab-item .tab-text {
  font-weight: 500;
}

/* ---------- 全屏登录页（强制登录） ---------- */
body.auth-mode .tab-bar {
  display: none;
}
body.auth-mode #site-footer {
  display: none;
}

.auth-page {
  min-height: calc(100vh - 16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.auth-brand {
  text-align: center;
  margin-bottom: 24px;
}
.auth-logo {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 10px;
}
.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}
.auth-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}
.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 24px;
}
.auth-foot {
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* ---------- Toast 提示 ---------- */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: #fff;
  background: rgba(0, 0, 0, 0.75);
  z-index: 99999;
  pointer-events: none;
  animation: toastIn 0.2s ease;
  text-align: center;
  max-width: 260px;
}
.toast.toast-success { background: rgba(34, 197, 94, 0.9); }
.toast.toast-error   { background: rgba(239, 68, 68, 0.9); }
.toast.toast-warning { background: rgba(234, 179, 8, 0.9); }

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ---------- Loading 遮罩 ---------- */
.loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- 图片网格 ---------- */
.image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.image-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-input);
  aspect-ratio: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--bg-input);
}
.image-item img:not([src]), .image-item img[src=""] {
  visibility: hidden;
}

.image-item .image-status {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}
.image-status.processing {
  background: rgba(99, 102, 241, 0.85);
  color: #fff;
}
.image-status.succeeded {
  background: rgba(34, 197, 94, 0.85);
  color: #fff;
}
.image-status.failed {
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
}

.image-item .image-delete {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.88);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  opacity: 1;
  -webkit-tap-highlight-color: transparent;
  z-index: 2;
}

/* ---------- 图片预览弹窗 ---------- */
.image-preview-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9997;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y;
}
.image-preview-img {
  max-width: 95%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* 微信环境：恢复图片原生交互（长按保存） */
.image-preview-wechat .image-preview-img {
  pointer-events: auto;
  user-select: auto;
  -webkit-user-drag: auto;
  -webkit-touch-callout: default;
  touch-action: auto;
}

/* 关闭按钮 */
.image-preview-close {
  position: fixed;
  top: max(16px, env(safe-area-inset-top, 16px));
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  z-index: 100;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: background 0.2s;
}
.image-preview-close:active {
  background: rgba(255,255,255,0.3);
}

/* 计数器 */
.image-preview-counter {
  position: fixed;
  top: max(16px, env(safe-area-inset-top, 16px));
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 16px;
  border-radius: 16px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  z-index: 99;
  user-select: none;
  white-space: nowrap;
}

/* 左右箭头 */
.image-preview-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 300;
  cursor: pointer;
  z-index: 100;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: background 0.2s, opacity 0.2s;
}
.image-preview-arrow:active {
  background: rgba(255,255,255,0.3);
}
.image-preview-arrow-left  { left: 12px; }
.image-preview-arrow-right { right: 12px; }

/* 下载按钮 */
.image-preview-download {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom, 24px));
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 24px;
  border-radius: 22px;
  background: rgba(99,102,241,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  z-index: 100;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}
.image-preview-download:active {
  background: rgba(99,102,241,1);
  transform: translateX(-50%) scale(0.96);
}

/* 微信底部栏 */
.image-preview-bottom-bar {
  position: fixed;
  bottom: max(16px, env(safe-area-inset-bottom, 16px));
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 100;
}
.image-preview-wx-tip {
  padding: 10px 20px;
  border-radius: 20px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  user-select: none;
  white-space: nowrap;
}
.image-preview-wx-copy {
  padding: 10px 20px;
  border-radius: 20px;
  background: rgba(99,102,241,0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}
.image-preview-wx-copy:active {
  background: rgba(99,102,241,1);
  transform: scale(0.96);
}

/* 缩放控制条 */
.image-preview-zoom-bar {
  position: fixed;
  left: 50%;
  bottom: max(84px, env(safe-area-inset-bottom, 24px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  z-index: 100;
}
.image-preview-zoom-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: background 0.2s, transform 0.15s;
}
.image-preview-zoom-btn:active {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0.92);
}

/* 放大状态：允许拖拽平移、手势缩放 */
.image-preview-modal.image-preview-zoomed { touch-action: none; }
.image-preview-zoomed .image-preview-img {
  cursor: grab;
  touch-action: none;
}
.image-preview-zoomed .image-preview-img:active { cursor: grabbing; }

/* ---------- 生成进度 ---------- */
.generate-progress {
  text-align: center;
  padding: 40px 20px;
}
.generate-progress .progress-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: pulse 1.5s ease infinite;
}
.generate-progress .progress-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.generate-progress .progress-sub {
  font-size: 13px;
  color: var(--text-muted);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(1.05); }
}

/* ---------- 参考图预览 ---------- */
.ref-images-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.ref-images-preview .ref-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.ref-images-preview .ref-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ref-images-preview .ref-thumb .ref-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
}

/* ---------- 充值套餐 ---------- */
.package-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.package-item {
  position: relative;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.package-item.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.package-item .package-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}
.package-item .package-points {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin: 4px 0;
}
.package-item .package-price {
  font-size: 14px;
  color: var(--text-secondary);
}
.package-item .package-original {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 12px;
  margin-left: 6px;
}

/* ---------- 技能首页容器 ---------- */
#skillContent {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 70px - 16px);
}

/* ---------- Banner ---------- */
.skill-banner {
  position: relative;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 22px 20px;
  margin-bottom: 10px;
  overflow: hidden;
  color: #fff;
  flex-shrink: 0;
}
.skill-banner::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}
.skill-banner::after {
  content: '';
  position: absolute;
  bottom: -25px;
  left: 40px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.skill-banner-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}
.skill-banner-sub {
  font-size: 12px;
  opacity: 0.78;
  position: relative;
  z-index: 1;
}

.batch-pc-entry {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 16px;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  background: rgba(255,255,255,0.15);
  padding: 4px 10px;
  border-radius: 12px;
  z-index: 2;
  transition: all 0.15s;
}

.batch-pc-entry:hover {
  color: #fff;
  background: rgba(255,255,255,0.25);
}

/* ---------- 搜索框 ---------- */
.skill-search-wrap {
  position: relative;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.skill-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  pointer-events: none;
  z-index: 1;
  line-height: 1;
}
.skill-search-input {
  width: 100%;
  padding: 10px 38px 10px 36px;
  border: none;
  border-radius: 22px;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-card);
  outline: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s;
}
.skill-search-input:focus {
  box-shadow: 0 2px 14px rgba(99,102,241,0.14);
}
.skill-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 2px;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- 技能首页左右布局 ---------- */
.skill-page-layout {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.skill-sidebar {
  width: 80px;
  min-width: 80px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 6px 4px;
  box-shadow: var(--shadow-card);
  overflow-y: auto;
}
.skill-cat-item {
  padding: 14px 6px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  word-break: break-all;
  line-height: 1.3;
}
.skill-cat-item.active {
  color: #fff;
  background: var(--primary);
  font-weight: 600;
}

.skill-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
}

/* ---------- 技能卡片网格（单列） ---------- */
.skill-card-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-card-item {
  display: flex;
  align-items: stretch;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.skill-card-item:active {
  transform: scale(0.98);
  box-shadow: 0 2px 10px rgba(99,102,241,0.1);
}

.skill-card-thumb {
  width: 90px;
  min-width: 90px;
  height: 90px;
  overflow: hidden;
  background: var(--bg-input);
}
.skill-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.skill-card-icon {
  width: 90px;
  min-width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f4ff, #faf5ff);
  font-size: 32px;
}

.skill-card-body {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.skill-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.skill-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 旧版技能卡片（兼容） */
.skill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.skill-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.skill-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.skill-card .skill-icon {
  font-size: 36px;
  margin-bottom: 8px;
}
.skill-card .skill-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.skill-card .skill-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ---------- 技能详情页样式 ---------- */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--primary);
  cursor: pointer;
  padding: 8px 0;
  margin-bottom: 12px;
  transition: opacity 0.2s;
}
.back-btn:active {
  opacity: 0.7;
}

.skill-hint {
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--primary);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ---------- 子页面顶部导航条 ---------- */
.detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: rgba(99, 102, 241, 0.06);
  border-radius: var(--radius);
  gap: 10px;
}
.detail-topbar-back {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
  padding: 4px 0;
  -webkit-tap-highlight-color: transparent;
  font-weight: 500;
}
.detail-topbar-back:active {
  opacity: 0.6;
}
.detail-topbar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-topbar-extra {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ---------- 技能详情页紧凑布局 ---------- */
#skillDetailContent .card {
  padding: 12px;
  margin-bottom: 10px;
}

/* ---------- 案例图2x2网格 ---------- */
.example-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.example-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  background: var(--bg-input);
}
.example-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.example-item:active img {
  transform: scale(1.05);
}

/* ---------- 短信验证码行 ---------- */
.sms-code-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.sms-code-row .input {
  flex: 1;
  min-width: 0;
}
.sms-code-btn {
  white-space: nowrap;
  flex-shrink: 0;
  padding: 8px 14px;
  font-size: 13px;
  min-width: 100px;
}
.sms-code-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- "我的"页面样式 ---------- */
.my-menu-list {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.my-menu-item {
  display: flex;
  align-items: center;
  padding: 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border);
}
.my-menu-item:last-child {
  border-bottom: none;
}
.my-menu-item:active {
  background: var(--bg-input);
}

.my-menu-icon {
  font-size: 20px;
  margin-right: 12px;
  width: 24px;
  text-align: center;
}

.my-menu-text {
  flex: 1;
  font-size: 15px;
  color: var(--text-primary);
}

.my-menu-arrow {
  font-size: 18px;
  color: var(--text-muted);
}

.my-subpage {
  margin-top: 16px;
}

/* ---------- 用户信息 ---------- */
.profile-header {
  text-align: center;
  padding: 24px 16px;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.profile-nickname {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}
.profile-phone {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.points-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 16px;
  background: var(--gradient);
  color: #fff;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 12px;
}

/* ---------- 模态框 ---------- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9990;
  padding: 20px;
}

.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 380px;
  max-height: 90vh;
  overflow-y: auto;
}

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

/* ---------- 积分流水 ---------- */

/* 类型筛选栏 */
.transactions-filter {
  display: flex;
  gap: 8px;
  padding: 0 0 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.transactions-filter-item {
  flex-shrink: 0;
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 18px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  user-select: none;
}
.transactions-filter-item.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99, 102, 241, 0.06);
  font-weight: 600;
}

/* 流水列表容器 */
.transactions-list {
  min-height: 120px;
}

/* 单条流水 */
.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.transaction-item:last-child {
  border-bottom: none;
}

/* 左侧：图标 + 信息 */
.transaction-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.transaction-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.transaction-info {
  min-width: 0;
}
.transaction-type {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}
.transaction-remark {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 右侧：金额 + 余额 + 时间 */
.transaction-right {
  flex-shrink: 0;
  text-align: right;
  min-width: 80px;
}
.transaction-amount {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}
.transaction-amount.amount-positive {
  color: #22c55e;
}
.transaction-amount.amount-negative {
  color: #ef4444;
}
.transaction-balance {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}
.transaction-time {
  font-size: 11px;
  color: var(--text-muted);
}

/* ---------- 空状态 ---------- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.empty-state .empty-text {
  font-size: 14px;
}
.empty-state .empty-sub {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 6px;
}

/* ---------- 工具类 ---------- */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.hidden { display: none !important; }
.w-full { width: 100%; }

/* ========== 美化版"我的"页面 ========== */

/* Hero 头部 */
.mypage-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 18px 20px 16px;
  text-align: center;
  color: #fff;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.mypage-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
/* 合伙人以下级身份查看的提示条 */
.impersonate-banner {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.25);
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}
.mypage-hero::after {
  content: '';
  position: absolute;
  bottom: -30px; left: -20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.mypage-avatar {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
  border: 3px solid rgba(255,255,255,0.3);
}
.mypage-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}
.mypage-phone {
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 10px;
}
.mypage-points {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 6px 18px;
  font-size: 14px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.mypage-login-btn {
  margin-top: 16px;
  background: rgba(255,255,255,0.2) !important;
  border: 1.5px solid rgba(255,255,255,0.4) !important;
  color: #fff !important;
}

/* 菜单 */
.mypage-menu {
  background: var(--bg-card);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.mypage-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  font-size: 15px;
  color: var(--text-primary);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.mypage-menu-item:last-child { border-bottom: none; }
.mypage-menu-item:active { background: var(--bg-input); }
.mypage-menu-left { display: flex; align-items: center; gap: 10px; }
.mypage-menu-danger { color: #ef4444; }

/* 子页面容器 */
.mypage-subpage {
  animation: fadeIn 0.25s ease;
}
.mypage-sub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 16px;
}
.mypage-back {
  font-size: 14px;
  color: var(--primary);
  cursor: pointer;
  padding: 4px 0;
}
.mypage-sub-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

/* 表单卡片 */
.form-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 20px 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.form-card .input { margin-top: 8px; }
.form-card-phone {
  margin-top: 6px;
  padding: 10px 14px;
  background: var(--bg-input);
  border-radius: 8px;
  font-size: 15px;
  color: var(--text-secondary);
}
.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* 充值余额 */
.partner-contact-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 24px;
  margin: 16px 0;
  border: 1px solid var(--border-color);
}
.partner-contact-header {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  text-align: center;
}
.partner-contact-row {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle, #f1f5f9);
}
.partner-contact-row:last-of-type {
  border-bottom: none;
}
.partner-contact-label {
  width: 64px;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-muted);
}
.partner-contact-value {
  font-size: 14px;
  color: var(--text-primary);
  word-break: break-all;
}
.partner-contact-qrcode {
  text-align: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle, #f1f5f9);
}
.partner-contact-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 12px 0 0;
}

.referral-card {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid var(--border-subtle, #f1f5f9);
}
.referral-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.referral-card-id {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  min-width: 40px;
}
.referral-card-phone {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
  padding: 0 8px;
}
.referral-card-points {
  font-size: 14px;
  font-weight: 600;
  color: #10b981;
  white-space: nowrap;
}
.referral-card-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 12px;
}
.referral-card-nickname {
  color: var(--text-secondary);
}
.referral-card-time {
  color: var(--text-muted);
  white-space: nowrap;
}
.referral-card-actions {
  display: flex;
  gap: 8px;
}

.recharge-balance {
  text-align: center;
  padding: 20px 0 16px;
}
.recharge-balance-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.recharge-balance-val {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
}

/* 套餐卡片 */
.package-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.package-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.package-card-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}
.package-card-points {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.package-card-price {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.package-card-amount { font-weight: 600; }
.package-card-original {
  text-decoration: line-through;
  color: var(--text-muted);
  margin-left: 8px;
  font-size: 12px;
}
.package-card-btn {
  width: 100%;
  padding: 10px 0;
  font-size: 14px;
}

/* 套餐说明 */
.package-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  padding: 6px 10px;
  background: var(--bg-input);
  border-radius: 6px;
  line-height: 1.5;
}

/* 卡密兑换区域（模态框内） */
.modal-content .input {
  margin-bottom: 4px;
}

/* 技能自定义字段多图预览 */
.custom-field-images-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.custom-field-image-item {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.custom-field-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.custom-field-image-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
  border: none;
  font-size: 12px;
  line-height: 18px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 生成任务列表 */
.mypage-history-list {
  min-height: 120px;
}
.image-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 32px;
  border-radius: 10px;
  min-height: 120px;
}

/* 生成历史页面 */
.history-hero {
  background: linear-gradient(135deg, #1e293b, #334155);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 16px;
  color: #fff;
}
.history-hero .mypage-sub-title { color: #fff; }
.history-hero .mypage-back { color: #94a3b8; }
.history-notice {
  background: rgba(255,193,7,0.08);
  border: 1px solid rgba(255,193,7,0.2);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: #b45309;
  margin-bottom: 14px;
  text-align: center;
}

/* ========== 批量生成 ========== */
.batch-page {
  padding: 0;
}

.batch-instruction-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.batch-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.batch-checkbox-input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.batch-instruction-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-instruction-id {
  flex-shrink: 0;
  margin-left: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 1px 6px;
  white-space: nowrap;
}

.batch-edit-id {
  font-size: 12px;
  font-weight: 600;
  color: #6366f1;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 4px;
  padding: 2px 8px;
  margin-bottom: 10px;
  display: inline-block;
}

.batch-search-input {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-input);
  outline: none;
  min-width: 0;
}

.batch-search-input:focus {
  border-color: var(--primary);
}

@keyframes batchSheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.batch-checkall {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.batch-checkall input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.batch-instruction-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.batch-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.batch-action-btn:active {
  background: var(--bg-input);
}

.batch-action-del {
  color: #ef4444;
  border-color: rgba(239,68,68,0.3);
}

.batch-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.batch-category-chip {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--primary);
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.batch-category-chip:active {
  background: var(--primary);
  color: #fff;
}

.btn-sort-active {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
}

.agreement-body {
  max-height: 40vh;
  overflow-y: auto;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.agreement-modal-content {
  max-height: 85vh;
  overflow-y: auto;
}

/* ========== PC端响应式 ========== */
@media (min-width: 768px) {
  #app {
    max-width: 900px;
  }

  .batch-instruction-name {
    font-size: 15px;
  }

  .tab-bar {
    max-width: 900px;
  }

  .mypage-history-list .image-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 15px;
  line-height: 28px;
  text-align: center;
  cursor: pointer;
  z-index: 10;
}

.modal-close:hover {
  background: #e5e7eb;
  color: var(--text-primary);
}

.modal-content {
  position: relative;
}

.batch-category-gear {
  font-size: 12px;
  cursor: pointer;
  margin-left: 4px;
  opacity: 0.5;
  vertical-align: middle;
}

.batch-category-gear:hover {
  opacity: 1;
}

.batch-category-popup {
  position: fixed;
  z-index: 9999;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  min-width: 140px;
  overflow: hidden;
}

.batch-category-popup-item {
  padding: 10px 16px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.batch-category-popup-item:hover {
  background: var(--bg-input);
}

.batch-category-popup-item:first-child {
  border-bottom: 1px solid var(--border);
}

.batch-category-sort-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  background: rgba(99,102,241,0.03);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}

.batch-category-sort-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

.batch-category-sort-count {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.batch-category-header {
  padding: 8px 4px 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  border-bottom: 1px solid rgba(99,102,241,0.15);
  margin-bottom: 4px;
}

.batch-category-count {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 12px;
}

.batch-category-sep {
  height: 8px;
}

.batch-sort-num {
  width: 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  flex-shrink: 0;
}

.batch-action-placeholder {
  visibility: hidden;
}

.batch-cat-badge {
  display: inline-block;
  font-size: 11px;
  color: var(--primary);
  background: rgba(99,102,241,0.08);
  padding: 1px 8px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
}

.hd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

.hd-dialog {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.hd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 0;
}

.hd-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.hd-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.hd-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
}

.hd-type-tag {
  font-size: 12px;
  font-weight: 600;
  color: #6366f1;
  background: #eef2ff;
  padding: 2px 10px;
  border-radius: 10px;
}

.hd-time {
  font-size: 12px;
  color: #94a3b8;
}

.hd-info-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 20px;
}

.hd-row {
  display: flex;
  gap: 10px;
  font-size: 13px;
  line-height: 1.6;
}

.hd-label {
  color: #64748b;
  white-space: nowrap;
  min-width: 60px;
  font-weight: 500;
}

.hd-value {
  color: #1e293b;
  word-break: break-all;
}

.img-expired {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: #f1f5f9;
  border-radius: 4px;
  font-size: 11px;
  color: #94a3b8;
}

.hd-prompt-section {
  padding: 12px 20px 0;
}

.hd-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}

.hd-prompt-text {
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: #1e293b;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.hd-copy-btn {
  margin-top: 8px;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hd-copy-btn:active {
  background: #4f46e5;
}

.hd-id {
  font-weight: 700;
  color: #6366f1;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.hd-id:hover {
  background: #e0e7ff;
  border-color: #a5b4fc;
}

.hd-copy-id {
  background: transparent;
  border: 1px solid #c7d2fe;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
  cursor: pointer;
  color: #6366f1;
  -webkit-tap-highlight-color: transparent;
  vertical-align: middle;
}

.hd-copy-id:active {
  background: #eef2ff;
}

.hd-footer {
  padding: 16px 20px;
  text-align: right;
}

.image-item .image-detail-btn {
  position: absolute;
  bottom: 6px;
  left: 6px;
  font-size: 11px;
  color: #fff;
  background: rgba(99,102,241,0.85);
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  z-index: 2;
  white-space: nowrap;
}

.image-item .image-detail-btn:active {
  background: rgba(79,70,229,0.95);
}
