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

:root {
  --bg: #0b0e1a;
  --bg-card: rgba(20, 24, 41, 0.7);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e6e9f2;
  --text-dim: #9aa3b8;
  --accent: #7c5cff;
  --accent-2: #00d4ff;
  --success: #4ade80;
  --warning: #fbbf24;
  --shadow: 0 20px 60px -20px rgba(124, 92, 255, 0.4);
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

.bg-glow {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(124, 92, 255, 0.25), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(0, 212, 255, 0.18), transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 60px 24px 36px;
}

.brand-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.15) 0%, rgba(0, 212, 255, 0.15) 100%);
  border: 1px solid rgba(124, 92, 255, 0.3);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid rgba(124, 92, 255, 0.3);
  margin-bottom: 18px;
  font-size: 14px;
}

.logo-mark {
  font-size: 18px;
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, #a8b3ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-dim);
  font-size: 16px;
}

/* Main */
main {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
}

/* Tabs */
.input-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px;
  border-radius: 12px;
  width: fit-content;
}

.tab {
  border: none;
  background: transparent;
  color: var(--text-dim);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  font-weight: 500;
}

.tab:hover {
  color: var(--text);
}

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

.tab-panel.hidden {
  display: none;
}

/* Drop zone */
.drop-zone {
  border: 2px dashed rgba(124, 92, 255, 0.4);
  border-radius: 16px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(124, 92, 255, 0.04);
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.1);
  transform: translateY(-2px);
}

.drop-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.drop-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.drop-hint {
  color: var(--text-dim);
  font-size: 14px;
}

/* URL input */
.url-input-wrap {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.url-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}

.url-input:focus {
  border-color: var(--accent);
}

.url-hint {
  color: var(--warning);
  font-size: 13px;
}

/* Button */
.btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  font-weight: 500;
}

.btn:hover {
  background: rgba(124, 92, 255, 0.15);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #6a4ce8;
  border-color: #6a4ce8;
}

.btn-secondary {
  width: 100%;
  margin-top: 16px;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

/* Status */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 12px;
  color: var(--accent-2);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 212, 255, 0.3);
  border-top-color: var(--accent-2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.hidden {
  display: none !important;
}

/* Result */
.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.preview-wrap {
  background:
    repeating-conic-gradient(#1a1f33 0% 25%, #13182a 0% 50%) 50% / 20px 20px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  padding: 12px;
}

#preview-img {
  max-width: 100%;
  max-height: 480px;
  display: block;
  border-radius: 6px;
}

.info-panel h2 {
  font-size: 18px;
  margin-bottom: 14px;
}

.big-ratio {
  font-size: 42px;
  font-weight: 800;
  background: linear-gradient(135deg, #7c5cff 0%, #00d4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-bottom: 6px;
}

.ratio-desc {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 20px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.stat-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
}

.stat-label {
  width: 100%;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.stat-unit {
  font-size: 12px;
  color: var(--text-dim);
}

/* Ratio viz */
.ratio-viz {
  margin-bottom: 20px;
}

.ratio-viz-label {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.ratio-box {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

.ratio-shape {
  background: linear-gradient(135deg, #7c5cff 0%, #00d4ff 100%);
  border-radius: 6px;
  box-shadow: 0 8px 24px -8px rgba(124, 92, 255, 0.6);
}

/* 比例计算器 */
.calc-wrap {
  padding: 8px 0;
}

.calc-intro {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 16px;
}

.calc-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.calc-preset {
  padding: 6px 14px;
  background: rgba(124, 92, 255, 0.08);
  border: 1px solid rgba(124, 92, 255, 0.2);
  border-radius: 999px;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.calc-preset:hover {
  background: rgba(124, 92, 255, 0.2);
  border-color: var(--accent);
}

.calc-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.calc-field label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.calc-ratio-input,
.calc-base-input {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calc-ratio-input input,
.calc-base-input input,
.calc-base-input select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 18px;
  font-family: inherit;
  outline: none;
  width: 100px;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.calc-ratio-input input:focus,
.calc-base-input input:focus,
.calc-base-input select:focus {
  border-color: var(--accent);
}

.calc-ratio-input span {
  color: var(--text-dim);
  font-size: 18px;
  font-weight: 600;
}

.calc-result {
  margin-top: 12px;
  padding: 18px;
  background: rgba(124, 92, 255, 0.08);
  border: 1px solid rgba(124, 92, 255, 0.2);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calc-result-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  color: var(--text-dim);
}

.calc-result-row strong {
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* 历史记录 */
.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.history-header h3 {
  font-size: 15px;
  color: var(--text);
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.history-item {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.15s ease;
}

.history-item:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.history-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
}

.history-item:hover .history-remove,
.history-item:focus-within .history-remove {
  opacity: 1;
}

.history-remove:hover {
  background: var(--warning);
  transform: scale(1.15);
}

.history-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.history-thumb {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
  background: rgba(0, 0, 0, 0.3);
}

.history-meta {
  padding: 10px;
  font-size: 12px;
}

.history-ratio {
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}

.history-dim {
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.btn-ghost {
  background: transparent;
  font-size: 12px;
  padding: 6px 12px;
}

/* 主题切换按钮 */
.theme-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 100;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(20, 24, 41, 0.85);
  backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-toggle:hover {
  transform: scale(1.05);
  border-color: var(--accent);
}

/* 亮色主题 */
body.light-theme {
  --bg: #f5f7fa;
  --bg-card: rgba(255, 255, 255, 0.85);
  --border: rgba(0, 0, 0, 0.08);
  --text: #1a1f2e;
  --text-dim: #6b7280;
  --accent: #6d4dff;
  --accent-2: #0099cc;
  --shadow: 0 20px 60px -20px rgba(124, 92, 255, 0.2);
}

body.light-theme .bg-glow {
  background:
    radial-gradient(circle at 15% 20%, rgba(124, 92, 255, 0.12), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(0, 153, 204, 0.1), transparent 40%);
}

body.light-theme .lang-switcher,
body.light-theme .theme-toggle {
  background: rgba(255, 255, 255, 0.95);
}

body.light-theme .lang-current {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.2) 0%, rgba(0, 212, 255, 0.2) 100%);
  color: #1a1f2e;
  border-color: var(--accent);
}

body.light-theme .lang-dropdown {
  background: rgba(255, 255, 255, 0.98);
  color: #1a1f2e;
}

body.light-theme .lang-item {
  color: #4a5568;
}

body.light-theme .lang-item:hover {
  background: rgba(124, 92, 255, 0.15);
  color: #1a1f2e;
}

body.light-theme .lang-item.active {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.25) 0%, rgba(0, 212, 255, 0.25) 100%);
  color: #1a1f2e;
  border-left-color: var(--accent-2);
}

body.light-theme .stat-item,
body.light-theme .calc-result {
  background: rgba(0, 0, 0, 0.03);
}

body.light-theme .preview-wrap {
  background:
    repeating-conic-gradient(#e8ebf2 0% 25%, #f5f7fa 0% 50%) 50% / 20px 20px;
}

body.light-theme .drop-zone,
body.light-theme .url-input,
body.light-theme .calc-ratio-input input,
body.light-theme .calc-base-input input,
body.light-theme .calc-base-input select {
  background: rgba(255, 255, 255, 0.6);
}

body.light-theme .batch-result,
body.light-theme .status-bar {
  background: rgba(255, 255, 255, 0.8);
}

body.light-theme .batch-table thead th {
  background: rgba(124, 92, 255, 0.06);
}

/* 平台适配建议 */
.platform-section {
  margin-top: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.platform-title {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 12px;
  font-weight: 500;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.platform-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.platform-item.match {
  border-color: var(--success);
  background: rgba(74, 222, 128, 0.08);
}

.platform-item.warn {
  border-color: var(--warning);
  background: rgba(251, 191, 36, 0.08);
}

.platform-icon {
  font-size: 22px;
}

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

.platform-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.platform-size {
  font-size: 11px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.platform-status {
  font-size: 14px;
  flex-shrink: 0;
}

/* EXIF 展示 */
.exif-section {
  margin-top: 20px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.exif-title {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 10px;
  font-weight: 500;
}

.exif-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
  font-size: 12px;
}

.exif-item {
  display: flex;
  gap: 6px;
}

.exif-key {
  color: var(--text-dim);
  white-space: nowrap;
}

.exif-val {
  color: var(--text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Quick ratio */
.quick-list-title {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.quick-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s ease;
}

.quick-item.match {
  border-color: var(--success);
  background: rgba(74, 222, 128, 0.1);
}

.quick-name {
  color: var(--text-dim);
}

.quick-item.match .quick-name {
  color: var(--success);
  font-weight: 600;
}

.quick-value {
  font-variant-numeric: tabular-nums;
  color: var(--text);
  font-weight: 500;
}

/* Info */
.info h3 {
  margin-bottom: 12px;
  font-size: 17px;
}

kbd {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: -apple-system, BlinkMacSystemFont, monospace;
  font-size: 11px;
  color: var(--text);
}

.info ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-dim);
}

.info b {
  color: var(--text);
}



/* 法律页语言徽章（只读、跟随首页） */
.lang-badge-fixed {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(20, 24, 41, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
  cursor: default;
  user-select: none;
}

body.light-theme .lang-badge-fixed {
  background: rgba(255, 255, 255, 0.95);
  color: #4a5568;
}

/* 语言切换下拉 */
.lang-switcher {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.25) 0%, rgba(0, 212, 255, 0.25) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  min-width: 130px;
  justify-content: space-between;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(124, 92, 255, 0.25);
}

.lang-current:hover {
  border-color: var(--accent-2);
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.4) 0%, rgba(0, 212, 255, 0.4) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.4);
}

.lang-current .lang-flag {
  font-size: 20px;
  filter: drop-shadow(0 0 4px rgba(124, 92, 255, 0.3));
}

.lang-arrow {
  font-size: 10px;
  opacity: 0.7;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: rgba(20, 24, 41, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 6px;
  min-width: 220px;
  max-height: 400px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 200;
}

.lang-dropdown::-webkit-scrollbar {
  width: 6px;
}

.lang-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.lang-dropdown::-webkit-scrollbar-thumb {
  background: rgba(124, 92, 255, 0.4);
  border-radius: 3px;
}

.lang-dropdown.open {
  display: block;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-dim);
  transition: all 0.15s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.lang-item:hover {
  background: rgba(124, 92, 255, 0.25);
  color: var(--text);
  transform: translateX(2px);
}

.lang-item.active {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.4) 0%, rgba(0, 212, 255, 0.4) 100%);
  color: #fff;
  border-left: 3px solid var(--accent-2);
  font-weight: 600;
}

.lang-item.active .lang-flag {
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.5));
}

.lang-flag {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.lang-item-name {
  flex: 1;
}

.lang-item-native {
  font-size: 11px;
  opacity: 0.7;
  margin-left: 6px;
}

/* 批量表格 */
.batch-result {
  margin-top: 16px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
}

.batch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.batch-table thead th {
  background: rgba(124, 92, 255, 0.1);
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.batch-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  vertical-align: middle;
}

.batch-table tbody tr:last-child td {
  border-bottom: none;
}

.batch-table tbody tr:hover {
  background: rgba(124, 92, 255, 0.05);
}

.batch-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.batch-ratio {
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.batch-match-tag {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(74, 222, 128, 0.15);
  color: var(--success);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.batch-match-tag.no {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
}

.batch-actions {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  justify-content: flex-end;
}

.batch-empty {
  padding: 40px;
  text-align: center;
  color: var(--text-dim);
}

@media (max-width: 768px) {
  .batch-table {
    font-size: 11px;
  }
  .batch-thumb {
    width: 32px;
    height: 32px;
  }
}

/* Focus 可访问性 */
*:focus {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

button:focus-visible,
.btn:focus-visible {
  outline-offset: 3px;
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.3);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.2);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 8px 0;
  text-decoration: none;
  z-index: 10000;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* PWA 安装按钮 */
.install-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(124, 92, 255, 0.4);
  transition: all 0.15s ease;
  font-family: inherit;
}

.install-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 92, 255, 0.5);
}

/* 社交分享 */
.share-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 18px;
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.share-label {
  font-size: 12px;
  color: var(--text-dim);
  margin-right: 4px;
}

.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.share-btn:hover {
  background: rgba(124, 92, 255, 0.2);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* 拖拽全屏遮罩 */
.drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(124, 92, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 4px dashed var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.drop-overlay.active {
  opacity: 1;
}

.drop-overlay-content {
  text-align: center;
  background: rgba(20, 24, 41, 0.9);
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 40px 60px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.drop-overlay-icon {
  font-size: 80px;
  margin-bottom: 16px;
  animation: drop-bounce 1s ease infinite;
}

.drop-overlay-text {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-2);
}

@keyframes drop-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Toast 通知 */
.toast-container {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  width: 90%;
  max-width: 420px;
}

.toast {
  pointer-events: auto;
  background: rgba(20, 24, 41, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 18px;
  color: var(--text);
  font-size: 14px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.3s ease, toast-out 0.3s ease 2.7s forwards;
}

.toast-icon {
  font-size: 18px;
  flex-shrink: 0;
}

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

.toast-title {
  font-weight: 600;
  margin-bottom: 2px;
}

.toast-desc {
  font-size: 12px;
  color: var(--text-dim);
}

.toast.toast-success { border-color: rgba(74, 222, 128, 0.4); }
.toast.toast-success .toast-icon { color: var(--success); }
.toast.toast-error { border-color: rgba(251, 113, 133, 0.4); }
.toast.toast-error .toast-icon { color: var(--warning); }
.toast.toast-warn { border-color: rgba(251, 191, 36, 0.4); }
.toast.toast-warn .toast-icon { color: var(--warning); }
.toast.toast-info { border-color: rgba(124, 92, 255, 0.4); }
.toast.toast-info .toast-icon { color: var(--accent); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(-20px); }
}

/* 广告位 */
.ad-slot {
  margin: 8px 0;
  min-height: 60px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* 友情链接 */
footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

/* 品牌区 */
.brand-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 4px;
}

.brand-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.brand-logo .brand-mark {
  color: var(--accent);
  font-size: 26px;
  line-height: 1;
}

.brand-logo .brand-text {
  background: linear-gradient(135deg, #fff 0%, #a8b3ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-logo:hover {
  filter: brightness(1.2);
}

.brand-tagline {
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 0.05em;
}

.friends-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 20px;
  max-width: 640px;
  width: 100%;
  text-align: center;
}

.friends-section h4 {
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.friends-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.friend-link {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(124, 92, 255, 0.06);
  border: 1px solid rgba(124, 92, 255, 0.15);
  border-radius: 999px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 11px;
  transition: all 0.15s ease;
}

.friend-link:hover {
  background: rgba(124, 92, 255, 0.18);
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
}

.copyright {
  text-align: center;
  color: var(--text-dim);
  font-size: 11px;
}

.legal-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 4px;
}

.legal-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 11px;
  transition: color 0.15s ease;
}

.legal-link:hover {
  color: var(--accent-2);
}

.legal-sep {
  color: var(--text-dim);
  font-size: 11px;
  opacity: 0.4;
}

/* Responsive */
@media (max-width: 768px) {
  .lang-switcher {
    top: 10px;
    right: 10px;
  }
  .lang-btn {
    padding: 4px 8px;
    font-size: 12px;
  }
  .result-layout {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 40px 20px 24px;
  }
  .card {
    padding: 20px;
  }
  .drop-zone {
    padding: 36px 16px;
  }
  .url-input-wrap {
    flex-direction: column;
  }
  .big-ratio {
    font-size: 32px;
  }
}