/* ── 全局重置 ─────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --background: #ffffff;
  --foreground: #0a0a0c;
  --card: #ffffff;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --indigo: #4f46e5;
  --indigo-dark: #4338ca;
  --border: #e4e4e7;
  --radius: 0.5rem;
  --green: #16a34a;
  --green-light: #dcfce7;
  --red: #dc2626;
  --red-light: #fee2e2;
  --yellow: #ca8a04;
  --yellow-light: #fef9c3;
  --blue-light: #dbeafe;
  --blue-text: #1d4ed8;
  --purple: #8b5cf6;
  --purple-light: #ede9fe;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f4f4f5;
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100vh;
  overflow: hidden;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ── 头部 ──────────────────────────────────────────── */
.page-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 24px 32px;
}

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

/* 品牌区（logo + 标题） */
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.header-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 8px;
}

.page-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.page-subtitle {
  font-size: 14px;
  color: var(--muted-foreground);
  margin-top: 2px;
}

/* ── 语言切换器 ──────────────────────────────────────── */
.lang-switcher {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-shrink: 0;
}

.lang-btn {
  padding: 4px 12px;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.lang-btn:hover {
  color: var(--foreground);
}

.lang-btn.active {
  background: var(--card);
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* ── Tabs ──────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab:hover {
  background: var(--muted);
}

.tab.active {
  background: var(--foreground);
  color: #fff;
  border-color: var(--foreground);
}

.tab-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.tab-icon-red { color: #ef4444; }
.tab-icon-blue { color: #3b82f6; }
.tab-icon-green { color: #22c55e; }
.tab-icon-orange { color: #f97316; }
.tab-icon-purple { color: #a855f7; }
.tab-icon-pink { color: #ec4899; }
.tab-icon-teal { color: #14b8a6; }
.tab-icon-indigo { color: #6366f1; }

.tab.active .tab-icon { color: #fff; }

/* ── 主内容区 ──────────────────────────────────────── */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  -webkit-overflow-scrolling: touch;
}

.main-inner {
  max-width: 64rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── 拖拽卡片 ──────────────────────────────────────── */
.drop-card {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--card);
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drop-card:hover {
  border-color: var(--primary);
}

.drop-card.dragging {
  border-color: var(--primary);
  background: var(--primary-light);
}

.drop-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  transition: all 0.2s ease;
  color: var(--muted-foreground);
}

.drop-card.dragging .drop-icon-wrapper {
  background: var(--primary);
  color: #fff;
  transform: scale(1.1);
}

.drop-svg {
  width: 48px;
  height: auto;
}

.drop-text {
  font-size: 16px;
  font-weight: 600;
  transition: color 0.2s;
}

.drop-card.dragging .drop-text {
  color: var(--primary);
}

/* ── 按钮 ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-svg-lg {
  width: 20px;
  height: 20px;
}

.btn-gradient {
  background: linear-gradient(to right, #2563eb, #4f46e5);
  color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-gradient:hover:not(:disabled) {
  background: linear-gradient(to right, #1d4ed8, #4338ca);
  box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.btn-ghost {
  background: transparent;
  color: var(--foreground);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--muted);
}

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

.btn-compress {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  background: linear-gradient(to right, #2563eb, #4f46e5);
  color: #fff;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-compress:hover:not(:disabled) {
  background: linear-gradient(to right, #1d4ed8, #4338ca);
  box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

/* ── 操作按钮行 ────────────────────────────────────── */
.action-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* ── 设置卡片 ──────────────────────────────────────── */
.settings-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.settings-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-label {
  font-size: 14px;
  font-weight: 500;
}

.select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--card);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}

.select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* ── 视频压缩模式切换 ──────────────────────────────── */
.mode-switcher {
  display: inline-flex;
  gap: 8px;
  padding: 4px;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.mode-btn {
  padding: 6px 16px;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.mode-btn:hover {
  color: var(--foreground);
}

.mode-btn.active {
  background: var(--card);
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* 数字/文本输入框（与 .select 风格一致） */
.input-number,
.input-text {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--card);
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
}

.input-number:focus,
.input-text:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.input-number::placeholder,
.input-text::placeholder {
  color: var(--muted-foreground);
}

/* ── 任务列表卡片 ──────────────────────────────────── */
.task-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.task-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.task-card-title {
  font-size: 16px;
  font-weight: 600;
}

.task-list {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── 任务项 ────────────────────────────────────────── */
.task-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.task-item-main {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
}

.task-file-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--muted);
}

/* SVG 文件类型图标（任务列表和历史记录） */
.file-type-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.task-info {
  flex: 1;
  min-width: 0;
}

.task-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  line-height: 1.25;
}

.task-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.task-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 120px);
}

.task-size-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted-foreground);
  flex-shrink: 0;
}

.task-size-row .compressed {
  font-weight: 500;
  color: var(--primary);
}

.task-size-row .ratio {
  color: var(--green);
}

.task-error {
  margin-top: 4px;
  font-size: 12px;
  color: var(--red);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 质量测量结果 ──────────────────────────────────── */
.quality-metrics {
  margin-top: 6px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.quality-metrics .metric {
  font-size: 12px;
  color: var(--blue-text);
  background: var(--blue-light);
  border-radius: 4px;
  padding: 2px 8px;
}

.quality-metrics .metric strong {
  font-weight: 600;
}

.quality-metrics.measuring .metric {
  color: #6b7280;
  background: #f3f4f6;
}

/* ── 每日上传配额 ──────────────────────────────────── */
.quota-bar {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.quota-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.quota-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}

.quota-text {
  font-size: 12px;
  color: var(--blue-text);
  font-weight: 500;
}

.quota-text.quota-warning {
  color: #ef4444;
}

.quota-progress-track {
  width: 100%;
  height: 6px;
  background: var(--muted);
  border-radius: 3px;
  overflow: hidden;
}

.quota-progress-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0%;
}

.quota-progress-fill.quota-warning {
  background: #ef4444;
}

/* ── 压缩设置标签 ──────────────────────────────────── */
.task-settings,
.history-settings {
  margin-top: 6px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.setting-tag {
  font-size: 11px;
  color: var(--blue-text);
  background: var(--blue-light);
  border-radius: 4px;
  padding: 2px 8px;
  font-weight: 500;
}

/* ── 压缩历史记录 ──────────────────────────────────── */
.history-card {
  margin-top: 16px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.history-item {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}

.history-item-main {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.history-file-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--muted);
}

.history-item-info {
  flex: 1;
  min-width: 0;
}

.history-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  align-items: flex-start;
  padding-top: 2px;
}

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

.history-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-time {
  font-size: 12px;
  color: #9ca3af;
  flex-shrink: 0;
}

.history-size-row {
  margin-top: 4px;
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  color: #6b7280;
}

.history-size-row .compressed {
  color: var(--green);
  font-weight: 600;
}

.history-size-row .ratio {
  color: var(--green);
  font-weight: 600;
}

.history-empty {
  text-align: center;
  padding: 24px;
  color: #9ca3af;
  font-size: 14px;
}

/* ── 状态徽章 ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
}

.badge-uploading { background: var(--purple-light); color: var(--purple); }
.badge-pending { background: #f3f4f6; color: #374151; }
.badge-compressing { background: var(--blue-light); color: var(--blue-text); }
.badge-completed { background: var(--green-light); color: var(--green); }
.badge-failed { background: var(--red-light); color: var(--red); }
.badge-cancelled { background: var(--yellow-light); color: var(--yellow); }

/* ── 进度条 ────────────────────────────────────────── */
.task-progress-wrapper {
  padding: 0 16px 12px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--muted);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

/* ── 任务操作按钮 ──────────────────────────────────── */
.task-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.task-action-btn {
  padding: 6px;
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.task-action-btn:hover {
  background: var(--muted);
  color: var(--foreground);
}

.task-action-btn svg {
  width: 16px;
  height: 16px;
}

/* ── 分页 ──────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding: 12px 16px;
}

.page-info {
  font-size: 14px;
  color: var(--muted-foreground);
}

/* ── 登录页 ────────────────────────────────────────── */
.login-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 48px 40px;
  width: 400px;
  max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.login-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-logo-img {
  width: 80px;
  height: 80px;
  border-radius: 16px;
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 14px;
  color: #888;
  margin-bottom: 32px;
}

.login-form {
  text-align: left;
}

.login-field {
  margin-bottom: 20px;
}

.login-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
}

.login-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  background: #fafafa;
}

.login-field input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
  background: #fff;
}

.login-error {
  background: #fff0f0;
  color: #dc3545;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid #ffd6d6;
}

.login-btn {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
  margin-top: 4px;
}

.login-hint {
  margin-top: 24px;
  font-size: 12px;
  color: #aaa;
}

/* ── 演示范围说明卡片 ──────────────────────────────── */
.notice-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  margin-top: 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  color: #92400e;
}

.notice-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  color: #d97706;
}

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

.notice-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.notice-text {
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  color: #78350f;
}

.notice-link {
  color: #b45309;
  text-decoration: underline;
  cursor: pointer;
}

.notice-link:hover {
  color: #92400e;
}

/* ── 页脚版权 ────────────────────────────────────────── */
.page-footer {
  margin-top: 16px;
  padding: 16px;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
}

.copyright {
  font-size: 12px;
  color: var(--muted-foreground);
  margin: 0;
  line-height: 1.6;
}

/* ── 响应式 ────────────────────────────────────────── */

/* 平板及以下（≤768px） */
@media (max-width: 768px) {
  .page-header { padding: 16px; }
  .main-content { padding: 16px; }
  .main-inner { gap: 16px; }

  /* 头部标题行：标题与语言切换器两端对齐 */
  .header-title-row { flex-wrap: wrap; gap: 12px; }
  .header-brand { gap: 10px; }
  .header-logo { width: 32px; height: 32px; }
  .page-title { font-size: 18px; }
  .page-subtitle { font-size: 13px; }
  .lang-switcher { padding: 2px; }
  .lang-btn { padding: 4px 10px; font-size: 12px; }

  /* Tabs 横向滚动 */
  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    padding-bottom: 4px;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .tabs::-webkit-scrollbar { display: none; /* Chrome/Safari */ }
  .tab { padding: 6px 12px; font-size: 13px; flex-shrink: 0; }
  .tab-icon { width: 14px; height: 14px; }

  /* 操作按钮垂直排列 */
  .action-buttons { flex-direction: column; }
  .action-buttons .btn { width: 100%; }

  /* 设置网格单列 */
  .settings-grid { grid-template-columns: 1fr; gap: 12px; }
  .settings-card { padding: 12px; }

  /* 视频模式切换器全宽 */
  .mode-switcher { display: flex; width: 100%; margin-bottom: 12px; }
  .mode-btn { flex: 1; padding: 8px 12px; font-size: 13px; }

  /* 拖拽卡片更紧凑 */
  .drop-card { padding: 20px 16px; min-height: 100px; }
  .drop-icon-wrapper { width: 52px; height: 52px; margin-bottom: 12px; }
  .drop-svg { width: 36px; }
  .drop-text { font-size: 14px; }

  /* 压缩按钮 */
  .btn-compress { padding: 14px; font-size: 15px; }

  /* 任务项布局 */
  .task-item-main { padding: 10px 12px; gap: 10px; }
  .task-file-icon { width: 32px; height: 32px; }
  .file-type-icon { width: 18px; height: 18px; }
  .task-name { font-size: 13px; max-width: calc(100% - 80px); }
  .task-size-row { font-size: 12px; gap: 6px; flex-wrap: wrap; }
  .task-actions { gap: 4px; }
  .task-action-btn { padding: 4px; }
  .task-action-btn svg { width: 14px; height: 14px; }

  /* 任务卡片头部和列表 */
  .task-card-header { padding: 12px; }
  .task-card-title { font-size: 14px; }
  .task-list { padding: 12px; gap: 10px; }

  /* 进度条 */
  .task-progress-wrapper { padding: 0 12px 10px; }

  /* 历史记录项 */
  .history-item { padding: 10px; }
  .history-item-main { gap: 10px; }
  .history-file-icon { width: 32px; height: 32px; }
  .history-name { font-size: 13px; }
  .history-time { font-size: 11px; }
  .history-size-row { font-size: 12px; flex-wrap: wrap; }
  .history-actions { gap: 2px; }
  .history-actions .task-action-btn { padding: 4px; }

  /* 质量指标 */
  .quality-metrics { gap: 6px; margin-top: 4px; }
  .quality-metrics .metric { font-size: 11px; padding: 1px 6px; }

  /* 配额条 */
  .quota-bar { padding: 8px 12px; margin-top: 8px; }

  /* 分页 */
  .pagination { padding: 10px 12px; }
  .page-info { font-size: 13px; }

  /* 说明卡片 */
  .notice-card { padding: 10px 12px; gap: 10px; }
  .notice-title { font-size: 13px; }
  .notice-text { font-size: 12px; line-height: 1.5; }
  .notice-icon { width: 18px; height: 18px; }

  /* 登录卡片 */
  .login-card { padding: 32px 24px; width: 100%; border-radius: 12px; }
  .login-title { font-size: 24px; }
  .login-subtitle { font-size: 13px; margin-bottom: 24px; }
  .login-field { margin-bottom: 16px; }
  .login-field input { padding: 10px 12px; font-size: 16px; }
  .login-btn { padding: 10px; font-size: 15px; }
}

/* 小屏幕手机（≤480px） */
@media (max-width: 480px) {
  .page-header { padding: 12px; }
  .main-content { padding: 12px; }
  .main-inner { gap: 12px; }

  /* 页面标题 */
  .page-title { font-size: 16px; }
  .page-subtitle { font-size: 12px; }
  .header-title-row { margin-bottom: 12px; gap: 8px; }
  .header-brand { gap: 8px; }
  .header-logo { width: 28px; height: 28px; }
  .lang-btn { padding: 3px 8px; font-size: 11px; }

  /* 登录页 logo */
  .login-logo, .login-logo-img { width: 64px; height: 64px; }
  .login-logo-img { border-radius: 12px; }

  /* Tabs 更紧凑 */
  .tab { padding: 6px 10px; font-size: 12px; gap: 4px; }
  .tab-icon { width: 13px; height: 13px; }

  /* 拖拽卡片 */
  .drop-card { padding: 16px 12px; min-height: 90px; }
  .drop-icon-wrapper { width: 44px; height: 44px; margin-bottom: 8px; }
  .drop-svg { width: 28px; }
  .drop-text { font-size: 13px; }

  /* 按钮内边距 */
  .btn { padding: 8px 12px; font-size: 13px; }
  .btn-sm { padding: 5px 10px; font-size: 12px; }

  /* 设置卡片 */
  .settings-card { padding: 10px; }
  .settings-grid { gap: 10px; }
  .settings-label { font-size: 13px; }
  /* 输入框 font-size ≥16px 防止 iOS Safari 自动缩放 */
  .select, .input-number, .input-text { padding: 8px 10px; font-size: 16px; }

  /* 模式切换 */
  .mode-switcher { padding: 3px; gap: 4px; }
  .mode-btn { padding: 6px 8px; font-size: 12px; }

  /* 任务项更紧凑 */
  .task-item-main { padding: 8px 10px; gap: 8px; }
  .task-file-icon { width: 28px; height: 28px; }
  .file-type-icon { width: 16px; height: 16px; }
  .task-name { font-size: 12px; max-width: calc(100% - 60px); }
  .task-size-row { font-size: 11px; gap: 4px; }
  .badge { font-size: 10px; padding: 1px 6px; }

  /* 任务卡片 */
  .task-card-header { padding: 10px; }
  .task-card-title { font-size: 13px; }
  .task-list { padding: 10px; gap: 8px; }

  /* 压缩按钮 */
  .btn-compress { padding: 12px; font-size: 14px; }
  .btn-svg-lg { width: 16px; height: 16px; }

  /* 历史记录 */
  .history-item { padding: 8px; }
  .history-item-main { gap: 8px; }
  .history-file-icon { width: 28px; height: 28px; }
  .history-name { font-size: 12px; }
  .history-time { font-size: 10px; }
  .history-size-row { font-size: 11px; gap: 4px; }

  /* 配额 */
  .quota-bar { padding: 6px 10px; }
  .quota-label { font-size: 11px; }
  .quota-text { font-size: 11px; }

  /* 分页 */
  .pagination { padding: 8px 10px; }
  .page-info { font-size: 12px; }

  /* 说明卡片 */
  .notice-card { padding: 8px 10px; gap: 8px; }
  .notice-title { font-size: 12px; }
  .notice-text { font-size: 11px; line-height: 1.45; }
  .notice-icon { width: 16px; height: 16px; margin-top: 1px; }

  /* 登录卡片 */
  .login-card { padding: 24px 20px; border-radius: 10px; }
  .login-title { font-size: 20px; }
  .login-subtitle { font-size: 12px; margin-bottom: 20px; }
  .login-field { margin-bottom: 14px; }
  .login-field label { font-size: 12px; }
  .login-field input { padding: 10px; font-size: 16px; }
  .login-btn { padding: 10px; font-size: 14px; }
  .login-hint { font-size: 11px; margin-top: 16px; }
}
