/* === 全局基础 === */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f7;
  color: #111;
}

/* 顶部 Apple 风导航栏（普通页面显示，登录页已手动隐藏） */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.logo {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #111111;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
}

.username {
  font-size: 13px;
  color: #4b5563;
  opacity: 0.9;
}

.nav-link,
.btn-link {
  border: none;
  background: none;
  cursor: pointer;
  color: #111827;
  text-decoration: none;
  font-size: 13px;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.nav-link:hover {
  color: #0071e3;
  border-color: #0071e3;
}

.btn-link {
  padding: 4px 10px;
  border-radius: 999px;
  color: #6b7280;
}

.btn-link:hover {
  background: #f3f4f6;
  color: #111827;
}

/* 主容器（非登录页） */
.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 16px 40px;   /* ⬅ 减少底部空白 */
  box-sizing: border-box;
}
/* 表单基础 */
label {
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

input[type="text"],
input[type="password"],
input[type="number"],
select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
  box-sizing: border-box;
}

/* 按钮基础 */
.btn-primary,
.btn-secondary,
.btn-danger,
button {
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: #0070c9;
  color: white;
}

.btn-primary:hover {
  background: #005fa3;
}

.btn-secondary {
  background: #e5e5ea;
  color: #111827;
}

.btn-danger {
  background: #ff3b30;
  color: white;
}

/* 提示消息 */
.flash {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.flash-error {
  background: #ffecec;
  color: #c0392b;
}

.flash-success {
  background: #e8fbe8;
  color: #1e7e34;
}

/* 底部警示条（登录页已隐藏） */
.footer-warning {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 16px;
  text-align: center;
  font-size: 13px;
  background: #fff3cd;
  border-top: 1px solid #ffeeba;
  z-index: 999;
}

/* === 老搜索页的一些基础样式（保留兼容） === */
.search-box-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 20px;
}

/* 通用结果列表容器（备用） */
.results {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 通用模型卡片（部分页面可能还用到） */
.model-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f9f9fb;
}

/* 封面（全站统一为 200x200） */
.cover-thumb {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 16px;
}

/* 用户管理表格 */
.user-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 13px;
}

.user-table th,
.user-table td {
  padding: 8px 6px;
  border-bottom: 1px solid #eee;
}

.inline-form {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

/* === Spotlight 搜索框（全站可用） === */
.spotlight-form {
  display: flex;
  width: 100%;
  gap: 12px;
  align-items: center;
}

/* 搜索框外壳 */
.spotlight-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 999px;
  padding: 0 14px 0 40px;
  height: 52px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
}

/* 焦点态 */
.spotlight-wrap:focus-within {
  border-color: #0071e3;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.22),
              0 6px 18px rgba(0, 0, 0, 0.12);
}

/* 图标 */
.spotlight-icon {
  position: absolute;
  left: 14px;
  font-size: 18px;
  opacity: 0.55;
}

/* 内部输入框 */
.spotlight-input {
  width: 100%;
  height: 100%;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 16px;
  color: #111827;
}

/* 右侧按钮 */
.spotlight-btn {
  height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 15px;
}

/* === 以图搜图页面基础 === */
.search-image-page {
  background: #f5f5f7;
  min-height: 100vh;
  padding: 60px 20px 40px;
  box-sizing: border-box;
  text-align: center;
}

/* 顶部信息栏 */
.user-info-bar {
  font-size: 14px;
  color: #555;
  margin-bottom: 20px;
}
.user-info-bar div {
  margin: 4px 0;
}

/* 标题与描述 */
.page-title {
  font-size: 32px;
  font-weight: 600;
  margin-top: 20px;
}
.page-desc {
  font-size: 14px;
  color: #777;
  margin-bottom: 25px;
}

/* 粘贴卡片 */
.image-card {
  background: #fff;
  border-radius: 24px;
  padding: 32px;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* 粘贴区 */
.paste-zone {
  border: 2px dashed #ccc;
  border-radius: 16px;
  padding: 40px;
  min-height: 140px;
  background: #fafafa;
  cursor: text;
}
.paste-zone:focus {
  border-color: #0071e3;
  background: #f0f6ff;
}
.paste-zone .hint {
  color: #999;
  font-size: 14px;
}

/* 无结果文字 */
.no-result {
  margin-top: 20px;
  color: #888;
}

/* 以图搜图结果卡片（老版结构的兼容） */
.model-cover img {
  width: 80px;
  border-radius: 8px;
}
.cover-placeholder {
  width: 80px;
  height: 60px;
  background: #ddd;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.model-info {
  text-align: left;
  margin-left: 20px;
  flex: 1;
}
.btn-download {
  padding: 8px 16px;
  background: #0071e3;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
}
.btn-download:hover {
  background: #005bb5;
}

/* === Apple 风：图片左上角类型标签 === */
.card-image-wrapper {
  position: relative;
}

.type-badge {
  position: absolute;
  top: 12px;
  left: 12px;

  padding: 6px 12px;
  border-radius: 999px;

  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;

  color: rgba(0, 0, 0, 0.85);
  background: rgba(255, 255, 255, 0.68);

  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);

  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.12),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.6);

  z-index: 5;
  user-select: none;
}

/* 不同类型：低饱和、轻提示（Apple 风） */
.type-badge.type-3d {
  color: #0a3d91;
  background: rgba(225, 235, 255, 0.68);
}

.type-badge.type-su {
  color: #065f46;
  background: rgba(209, 250, 229, 0.68);
}

.type-badge.type-texture {
  color: #92400e;
  background: rgba(254, 243, 199, 0.68);
}

/* 兜底 */
.type-badge.type- {
  color: #374151;
  background: rgba(243, 244, 246, 0.68);
}


/* === 点击放大封面的图片查看器 === */
.image-viewer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.image-viewer-img {
  max-width: 1000px;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  animation: zoomIn 0.15s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 24px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.nav-left {
  display: flex;
  align-items: center;
}

.nav-quota {
  display: inline-flex;
  gap: 16px;
  font-size: 13px;
  color: #444;
  white-space: nowrap;
}

.nav-quota strong {
  font-weight: 600;
}

/* 让顶部左侧配额信息字体风格与右侧一致 */
.header .logo span {
  font-size: 14px;
  color: #333;
  font-weight: 400;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

/* 加粗部分保持视觉一致 */
.header .logo strong {
  font-weight: 600;
  margin-left: 2px;
}



/* ==== 管理员上传页面：超大号版本，适配触屏 / 远程操作 ==== */
.admin-upload {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 120px;
}

.admin-upload-title {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 26px;
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-label {
  font-size: 18px;
  font-weight: 600;
}

.field-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* 输入框加大尺寸 */
.admin-upload input[type="text"],
.admin-upload input[type="file"] {
  padding: 16px 18px;
  border-radius: 14px;
  font-size: 18px;
}

/* 所有按钮加大尺寸 */
.admin-upload .btn-primary,
.admin-upload .btn-secondary,
.admin-upload button {
  padding: 16px 26px;
  font-size: 18px;
  border-radius: 999px;
}

/* 粘贴按钮稍微小一点，但仍加大 */
.btn-paste-id {
  padding: 14px 20px;
  font-size: 16px;
  white-space: nowrap;
}

/* 模型类型按钮大号版本 */
.type-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.type-btn {
  padding: 14px 24px;
  border-radius: 999px;
  border: 2px solid #d1d5db;
  background: #f9fafb;
  font-size: 16px;
  cursor: pointer;
  min-width: 120px;
  text-align: center;
}

.type-btn.active {
  background: #0071e3;
  color: #fff;
  border-color: #0071e3;
}

/* 提交按钮更醒目 */
.admin-submit-btn {
  margin-top: 10px;
  align-self: flex-start;
  padding: 18px 36px !important;
  font-size: 20px !important;
  border-radius: 999px;
}

/* 提示文字也放大 */
.admin-tip {
  margin-top: 12px;
  font-size: 16px;
  color: #444;
}

/* 上传任务标题更大 */
.upload-tasks h2 {
  margin-top: 30px;
  margin-bottom: 14px;
  font-size: 22px;
}

/* 上传任务卡片加大 */
.task-card {
  padding: 20px 22px !important;
  border-radius: 14px !important;
  font-size: 16px;
}
.task-status {
  margin-top: 10px;
  font-size: 15px;
}
.task-copy {
  margin-top: 12px;
  font-size: 14px;
}
.task-copy .copy-btn {
  padding: 10px 16px;
  font-size: 15px;
  border-radius: 999px;
}

/* 全局隐藏滚动条，但保留滚动功能 */
* {
  scrollbar-width: none;              /* Firefox */
}
*::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

/* ===============================
   底部广告位（600 × 250）
=============================== */
.ad-wrap {
  margin: 28px auto 8px;
  display: flex;
  justify-content: center;
}

.ad-card {
  width: 600px;
  height: 250px;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,0.86);
  box-shadow: 0 18px 45px rgba(0,0,0,0.10);
  border: 1px solid rgba(0,0,0,0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.ad-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 680px) {
  .ad-card {
    width: 94vw;
    height: calc(94vw * 250 / 600);
  }
}

/* 左上角刷新按钮（文字版） */
.refresh-btn {
  border: none;
  background: transparent;
  font-size: 13px;
  color: #0071e3;
  cursor: pointer;
  margin-right: 12px;
  padding: 4px 6px;
  border-radius: 6px;
  line-height: 1;
}

.refresh-btn:hover {
  background: rgba(0, 113, 227, 0.08);
}

.refresh-btn:active {
  background: rgba(0, 113, 227, 0.15);
}

/* =========================
   全局底部下载记录栏（dlbar）
   悬浮 / 常驻 / 最前
   ========================= */

/* 给主内容留出空间，避免被底部栏遮挡 */
.container {
  padding-bottom: 120px; /* 比 footer-warning 稍大，确保不重叠 */
}

/* dlbar 容器本身不吃点击 */
.dlbar {
  pointer-events: none;
}

/* 只有真正需要交互的部分可以点 */
.dlbar .dlbar-btn,
.dlbar .dlbar-panel {
  pointer-events: auto;
}

/* “下载记录”按钮（风格与顶部一致） */
.dlbar-btn {
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
  cursor: pointer;
  font-size: 13px;
  color: #111827;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dlbar-btn:hover {
  box-shadow: 0 14px 34px rgba(0,0,0,0.16);
}

/* 右上角数字徽标 */
.dlbar-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #0071e3;
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

/* 抽屉面板 */
.dlbar-panel {
  width: 420px;
  max-width: calc(100vw - 32px);
  max-height: 60vh;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 18px 50px rgba(0,0,0,0.18);
  display: none;
}

.dlbar-panel.open {
  display: block;
}

/* 面板头部 */
.dlbar-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.dlbar-title {
  font-size: 14px;
  font-weight: 600;
  color: #111;
}

.dlbar-close {
  border: none;
  background: transparent;
  color: #0071e3;
  cursor: pointer;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 8px;
}

.dlbar-close:hover {
  background: rgba(0,113,227,0.08);
}

/* 列表区域 */
.dlbar-list {
  padding: 10px;
  overflow-y: auto;
  max-height: calc(60vh - 52px);
}

.dlbar-empty {
  font-size: 13px;
  color: #6b7280;
  padding: 14px 8px;
}

/* 单条下载记录 */
.dlitem {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.06);
  background: rgba(245,245,247,0.92);
  margin-bottom: 10px;
}

/* 缩略图 */
.dlthumb {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  overflow: hidden;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #6b7280;
}

.dlthumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 右侧信息 */
.dlmeta {
  min-width: 0;
}

.dltop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.dlname {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dlstatus {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
}

.dlbarrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.dlsize {
  font-size: 12px;
  color: #6b7280;
}

/* 操作按钮 */
.dlactions {
  display: flex;
  gap: 8px;
}

.dlbtn {
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.92);
  cursor: pointer;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
}

.dlbtn.primary {
  border-color: rgba(0,113,227,0.25);
  color: #0071e3;
}

.dlbtn.danger {
  border-color: rgba(239,68,68,0.25);
  color: #ef4444;
}

/* ✅ 底部提示条只显示，不拦截任何点击 */
.footer-warning {
  pointer-events: none;
}
/* 用户管理页：操作按钮不重叠 */
.user-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.user-actions form{
  margin: 0;
}

/* ✅ dlbar 强制固定在左下角（避免被覆盖变成文档流元素） */
.dlbar{
  position: fixed !important;
  left: 16px !important;
  bottom: 16px !important;
  z-index: 100000 !important;
  display: flex !important;
  align-items: flex-end !important;
  gap: 12px !important;

  /* 保留你之前的“容器不吃点击”设计 */
  pointer-events: none !important;
}
.dlbar .dlbar-btn,
.dlbar .dlbar-panel{
  pointer-events: auto !important;
}
