/* 覆盖与补充样式，便于复刻历史卡片与背景 */

body, html {
  background-image: linear-gradient(var(--color-grid-line) 1px, transparent 0),
    linear-gradient(90deg, var(--color-grid-line) 1px, transparent 0);
  background-size: 32px 32px;
}

:root {
  --app-height: 100vh;
}

body,
html {
  min-height: var(--app-height);
}

.container {
  min-height: calc(var(--app-height, 100vh) - 80px);
}

.global-footer {
  text-align: center;
  margin: 18px 0 28px;
  font-size: 14px;
  color: var(--color-text-secondary);
}
.global-footer a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}
.global-footer a:hover {
  text-decoration: underline;
}

.upload-content { cursor: pointer; }

.flip-card { height: 380px !important; }

.api-view,
.history-view {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  display: block;
  background: transparent;
  box-shadow: none;
  padding-bottom: 20px;
}

.api-container {
  background: var(--color-card-bg);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  border: 1px solid var(--color-border-light);
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
}

.history-view .recent-images {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
}

.result-container {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  justify-items: stretch;
  align-items: start;
  padding: 20px 12px;
  position: relative;
  margin: 20px auto;
  max-width: 1260px;
  cursor: default;
}

#totalImages.hide-badge,
#totalImages:empty {
  display: none !important;
}
#historyBtn #totalImages.hide-badge {
  background: none !important;
  color: transparent !important;
  border: none !important;
  padding: 0 !important;
}

.images-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 10px 4px 30px;
  width: 100%;
  align-items: start;
  justify-items: stretch;
}

.history-card {
  background: var(--color-card-bg);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
  overflow: hidden;
  border: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  min-height: 360px;
  cursor: default;
}

.history-card .thumb-wrap {
  position: relative;
  background: repeating-linear-gradient(0deg, #dcdcdc 0, #dcdcdc 1px, transparent 1px, transparent 24px),
    repeating-linear-gradient(90deg, #dcdcdc 0, #dcdcdc 1px, transparent 1px, transparent 24px);
  min-height: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}
[data-theme=dark] .history-card .thumb-wrap {
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.08) 0, rgba(255,255,255,0.08) 1px, transparent 1px, transparent 24px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.08) 0, rgba(255,255,255,0.08) 1px, transparent 1px, transparent 24px);
}

.history-card img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
}

.history-card .delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 99, 99, 0.9);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(255, 99, 99, 0.4);
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.2s ease;
}

.history-card:hover .delete-btn { opacity: 1; transform: scale(1); }

.history-card .body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.history-card .title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--color-text-primary);
  gap: 8px;
}

.history-card .title-row .id {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}

.history-card .title-row .date {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.history-card .link-input {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-card .link-input input {
  flex: 1;
  border: 1px solid var(--color-border-input);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
}

.history-card .link-input button {
  border: none;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.history-card .link-input button:hover { transform: translateY(-1px); }

.history-card .format-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

.history-card .format-btn-small {
  flex: 1;
  min-width: 60px;
  text-align: center;
  border: 1px solid var(--color-border-input);
  border-radius: 10px;
  padding: 8px 10px;
  background: #f9fafb;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.history-card .format-btn-small:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 6px 12px rgba(52, 152, 219, 0.18);
}

.history-card .checkbox-abs {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  background: rgba(255,255,255,0.9);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.history-card.selected { box-shadow: 0 0 0 3px var(--color-primary); }

.history-card .checkbox-abs input[type=\"checkbox\"] {
  width: 18px;
  height: 18px;
}

.history-card .format-btn-small.active {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 6px 14px rgba(52,152,219,0.3);
}

.setting-title,
.setting-desc,
.history-card .setting-title,
.history-card .setting-desc {
  font-size: 14px;
  color: var(--color-text-primary);
}

.text-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border-input);
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  background: #fff;
  color: var(--color-text-primary);
}

.full-input { width: 100%; }

.simple-input-row {
  padding: 6px 0;
}

.personal-setting-box {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  padding: 8px 10px;
  display: grid;
  gap: 6px;
}

.apply-brand-btn {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: #fff !important;
  padding: 10px 16px;
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(39, 174, 96, 0.3);
}
.apply-brand-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(39, 174, 96, 0.35);
}

/* 登录表单优化 */
.auth-form input {
  width: 100%;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--color-border-input);
  border-radius: 8px;
  font-size: 16px;
}

.auth-actions {
  display: flex;
  gap: 10px;
}

.hidden-auth { display: none !important; }

/* 上传区齿轮不触发上传 */
.card-corner-btn { z-index: 20; }
.nav-toggle-container #backBtn2 { display: none !important; }

/* 页脚简化 */
.site-footer { box-shadow: none; border-top: 1px solid var(--color-border-light); }
.site-footer, .site-footer * { background: transparent !important; }
.footer-content, .footer-copyright { background: transparent !important; }

/* 上传结果卡片适配 */
.result-grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  justify-items: center;
}
.upload-result-card .image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.upload-result-card {
  width: 100%;
  min-height: 320px;
  border: 1px solid var(--color-border-light);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  border-radius: 12px;
  background: var(--color-card-bg);
  padding: 0 12px 12px;
  margin: 0 auto;
  cursor: default;
}

/* result-container 已移到上面定义,这里删除重复 */
.upload-result-card .image-container {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: #f8f9fa;
  border-bottom: 1px solid var(--color-border-light);
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}
.upload-result-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.upload-result-actions .link-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--color-border-light);
}
.upload-result-actions .url-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.upload-result-actions .format-btn {
  border-radius: 10px;
  font-weight: 600;
  background: #f5f5f5;
  transition: all 0.2s ease;
  border: none;
  color: var(--color-text-primary);
}
.upload-result-actions .format-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(52,152,219,0.15);
  color: var(--color-primary);
}
.upload-result-actions .format-btn.active {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  box-shadow: 0 6px 14px rgba(52,152,219,0.3);
}
.upload-result-actions .link-input input { width: 100%; }
.upload-result-actions .link-input button {
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.upload-result-actions .link-input button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(52,152,219,0.25);
}

.upload-history-card .format-row { gap: 8px; }

.icon-format-row {
  position: relative;
  display: flex;
  gap: 6px;
  background: #f5f5f5;
  border-radius: 12px;
  padding: 6px;
  overflow: hidden;
  align-items: center;
}
.format-icon-btn {
  position: relative;
  z-index: 2;
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 12px 10px;
  cursor: pointer;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.15s ease;
}
.format-icon-btn svg { width: 18px; height: 18px; }
.format-icon-btn .text-icon { font-weight: 700; font-size: 14px; }
.format-icon-btn.active { color: #fff; }
.format-indicator {
  position: absolute;
  left: 0;
  top: 4px;
  height: calc(100% - 8px);
  border-radius: 10px;
  z-index: 1;
  transition: transform 0.2s ease, width 0.2s ease, background 0.15s ease;
}

/* 上传进度条样式 */
.upload-progress-bar-container {
  width: 100%;
  max-width: 380px;
  margin-top: 20px;
}

.upload-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.upload-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  border-radius: 10px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

.upload-progress-info {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.upload-progress-info span {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 粘贴剪贴板按钮样式 */
.upload-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 16px 0 12px;
}

.paste-clipboard-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.paste-clipboard-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(52, 152, 219, 0.4);
}

.paste-clipboard-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px rgba(52, 152, 219, 0.3);
}

.paste-clipboard-btn svg {
  flex-shrink: 0;
}

.desktop-only {
  display: block;
}

/* 移动端顶部栏和抽屉导航 */
.mobile-header {
  display: none;
}

.mobile-drawer-overlay {
  display: none;
}

.mobile-drawer {
  display: none;
}

.desktop-nav {
  display: block;
}

/* 移动端响应式优化 */
@media (max-width: 768px) {
  /* 隐藏桌面导航 */
  .desktop-nav {
    display: none !important;
  }

  /* 显示移动端顶部栏 */
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--color-card-bg);
    border-bottom: 1px solid var(--color-border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }

  .mobile-menu-btn,
  .mobile-theme-btn {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-menu-btn:active,
  .mobile-theme-btn:active {
    background: rgba(0,0,0,0.05);
  }

  [data-theme=dark] .mobile-menu-btn:active,
  [data-theme=dark] .mobile-theme-btn:active {
    background: rgba(255,255,255,0.1);
  }

  .mobile-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
    cursor: pointer;
  }

  .mobile-logo img {
    height: 24px;
    vertical-align: middle;
  }

  /* 抽屉遮罩层 */
  .mobile-drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1998;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .mobile-drawer-overlay.active {
    display: block;
    opacity: 1;
  }

  /* 侧边抽屉 */
  .mobile-drawer {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 80%;
    background: var(--color-card-bg);
    z-index: 1999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 16px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
  }

  .mobile-drawer.active {
    transform: translateX(0);
  }

  .mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border-light);
  }

  .mobile-drawer-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-primary);
  }

  .mobile-drawer-close {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    border-radius: 8px;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-drawer-close:active {
    background: rgba(0,0,0,0.05);
  }

  [data-theme=dark] .mobile-drawer-close:active {
    background: rgba(255,255,255,0.1);
  }

  .mobile-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
  }

  .mobile-drawer-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--color-text-primary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 4px;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-drawer-item:active {
    background: rgba(52, 152, 219, 0.1);
  }

  .mobile-drawer-item.danger {
    color: #e74c3c;
  }

  .mobile-drawer-item.danger:active {
    background: rgba(231, 76, 60, 0.1);
  }

  .mobile-drawer-item svg {
    flex-shrink: 0;
    color: var(--color-text-secondary);
  }

  .mobile-drawer-item.danger svg {
    color: #e74c3c;
  }

  .drawer-badge {
    margin-left: auto;
    background: var(--color-primary);
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
  }

  .mobile-drawer-divider {
    height: 1px;
    background: var(--color-border-light);
    margin: 8px 12px;
  }

  /* 隐藏桌面专属提示 */
  .desktop-only {
    display: none;
  }

  /* 粘贴按钮移动端优化 */
  .paste-clipboard-btn {
    font-size: 16px;
    padding: 14px 28px;
    width: 90%;
    max-width: 300px;
    justify-content: center;
  }

  /* 卡片网格优化 - 改为单列 */
  .result-container,
  .images-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
    padding: 16px 12px;
  }

  /* 历史卡片优化 */
  .history-card {
    min-height: auto;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  }

  .history-card .thumb-wrap {
    min-height: 200px;
    height: 200px;
  }

  .history-card .body {
    padding: 14px 16px;
  }

  .history-card .title-row .id {
    font-size: 14px;
    max-width: 60%;
    font-weight: 700;
  }

  .history-card .title-row .date {
    font-size: 12px;
  }

  .history-card .link-input input,
  .history-card .link-input textarea {
    font-size: 16px;
    padding: 10px 12px;
    border-radius: 10px;
  }

  /* 防止移动端输入框自动缩放 */
  input, textarea, select {
    font-size: 16px !important;
  }

  .history-card .link-input button {
    font-size: 14px;
    padding: 10px 14px;
    white-space: nowrap;
    font-weight: 600;
    border-radius: 10px;
  }

  /* 格式按钮优化 - 改为垂直排列 */
  .history-card .format-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .history-card .format-btn-small {
    font-size: 14px;
    padding: 12px 14px;
    min-width: 100%;
    width: 100%;
    border-radius: 10px;
    font-weight: 600;
  }

  .icon-format-row {
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 8px;
    border-radius: 14px;
  }

  .format-icon-btn {
    padding: 14px 12px;
    font-size: 14px;
    width: 100%;
    border-radius: 10px;
    font-weight: 600;
  }

  .format-indicator {
    display: none; /* 垂直布局不需要指示器 */
  }

  /* 下载和查看按钮 */
  .history-card .body > button,
  .history-card .body .simple-view-btn,
  .upload-result-card .simple-view-btn {
    width: 100%;
    margin: 6px 0;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
  }

  /* 上传区域优化 */
  .upload-area {
    min-height: 240px;
  }

  .upload-area h3 {
    font-size: 20px;
    margin: 16px 0 10px;
  }

  .upload-area p {
    font-size: 14px;
    margin: 8px 0;
  }

  .flip-card {
    max-width: 100% !important;
    margin: 0 12px !important;
    border-radius: 16px;
    height: 380px !important;
  }

  /* 上传内容区域 */
  .upload-content {
    padding: 24px 16px;
  }

  .folder-container {
    transform: scale(0.9);
  }

  /* API视图优化 */
  .api-container {
    margin: 0 8px;
    padding: 12px;
  }

  .api-section {
    padding: 12px;
  }

  .api-section h2 {
    font-size: 18px;
  }

  .api-section h3 {
    font-size: 16px;
  }

  .api-section pre {
    font-size: 12px;
    padding: 10px;
    overflow-x: auto;
  }

  /* 进度条优化 */
  .upload-progress-bar-container {
    max-width: 90%;
  }

  .progress-text {
    font-size: 14px;
    text-align: center;
    max-width: 90%;
    word-break: break-word;
  }

  /* 批量操作栏优化 */
  .batch-actions-bar {
    padding: 10px 8px;
    flex-wrap: wrap;
  }

  .batch-operations {
    gap: 6px;
  }

  .batch-operations button {
    font-size: 13px;
    padding: 8px 12px;
  }

  /* 分页优化 */
  .pagination-controls {
    gap: 4px;
    flex-wrap: wrap;
  }

  .pagination-btn {
    font-size: 12px;
    padding: 6px 10px;
  }

  .pagination-info {
    font-size: 12px;
  }
}

/* 小屏手机优化 */
@media (max-width: 480px) {
  /* 导航栏 */
  .navbar {
    padding: 10px;
    margin-bottom: 12px;
  }

  .nav-container {
    gap: 10px;
  }

  .nav-title {
    font-size: 18px;
  }

  .nav-title img {
    height: 1.2em !important;
  }

  .nav-subtitle {
    display: none;
  }

  .nav-right {
    gap: 6px;
  }

  .nav-toggle-container {
    gap: 6px;
  }

  .tailwind-btn {
    font-size: 13px;
    padding: 8px 10px;
  }

  .theme-toggle-mobile {
    top: 10px;
    right: 10px;
    min-width: 40px;
    padding: 8px;
  }

  /* 粘贴按钮 */
  .paste-clipboard-btn {
    font-size: 15px;
    padding: 12px 24px;
    width: 95%;
  }

  /* 上传区域 */
  .upload-area h3 {
    font-size: 18px;
  }

  .upload-area p {
    font-size: 13px;
  }

  /* 历史卡片 */
  .history-card {
    border-radius: 14px;
  }

  .history-card .thumb-wrap {
    min-height: 180px;
    height: 180px;
  }

  .history-card .body {
    padding: 12px 14px;
  }

  .history-card .title-row .id {
    font-size: 13px;
  }

  .history-card .title-row .date {
    font-size: 11px;
  }

  .history-card .format-btn-small {
    font-size: 13px;
    padding: 10px 12px;
    width: 100%;
  }

  .history-card .link-input input,
  .history-card .link-input textarea {
    font-size: 13px;
  }

  .history-card .link-input button {
    font-size: 13px;
    padding: 9px 12px;
  }

  /* 进度条 */
  .upload-progress-info {
    font-size: 12px;
  }

  /* 确保所有按钮都垂直排列 */
  .icon-format-row,
  .history-card .format-row,
  .result-btn-container {
    flex-direction: column !important;
  }

  .format-icon-btn {
    width: 100%;
    padding: 12px 10px;
  }

  .result-btn-container button {
    width: 100% !important;
    margin: 4px 0 !important;
    padding: 11px 14px;
    font-size: 14px;
  }

  /* 卡片间距 */
  .result-container,
  .images-grid {
    gap: 14px;
    padding: 14px 10px;
  }

  /* API视图 */
  .api-container {
    margin: 0 10px;
  }
}

/* 通用触摸优化 */
@media (hover: none) and (pointer: coarse) {
  /* 增大所有可点击元素的触摸区域 */
  button, .tailwind-btn, .format-btn, .format-icon-btn {
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
  }

  /* 增强触摸反馈 */
  button:active, .tailwind-btn:active {
    opacity: 0.8;
    transform: scale(0.98);
  }

  /* 移除悬停效果 */
  .history-card:hover .delete-btn {
    opacity: 1;
    transform: scale(1);
  }
}
