:root {
  --bg: #0f1115;
  --panel: #181b22;
  --text: #e8eaed;
  --muted: #9aa0a6;
  --accent: #4f8cff;
  --border: #2a2e37;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 24px;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  transition: filter 0.2s ease;
}
.brand:hover {
  filter: brightness(1.25) drop-shadow(0 0 6px rgba(99, 102, 241, 0.25));
}
.logo {
  height: 34px;
  width: auto;
}
.site-nav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.site-nav a { color: var(--text); }
.site-nav a:hover { color: var(--accent); text-decoration: none; }
.lang-wrap select {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap;
}

/* Main */
main { max-width: 1080px; margin: 0 auto; padding: 8px 24px 24px; }

/* Hero 虚线框 */
.hero-box {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 28px 28px;
  text-align: center;
  background: linear-gradient(180deg, rgba(79,140,255,0.04), transparent 60%);
  margin-bottom: 28px;
}
.hero-box h1 { font-size: 30px; margin: 0 0 10px; letter-spacing: .3px; }
.hero-desc { color: var(--muted); font-size: 14.5px; max-width: 720px; margin: 0 auto 26px; }

.hint-sub {
  font-size: 12px;
  color: var(--muted);
  opacity: 0.75;
  margin-top: 4px;
}
.hint-sub a { color: var(--muted); text-decoration: underline; }

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 30px 20px;
  background: var(--panel);
  transition: border-color .2s, background .2s;
  max-width: 640px;
  margin: 0 auto;
}
.drop-zone.dragover { border-color: var(--accent); background: #1c2330; }
.drop-zone p { margin: 6px 0; color: var(--muted); }
.drop-zone .or { font-size: 12px; }
.file-label {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 24px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  margin: 8px 0;
}
.file-label:hover { filter: brightness(1.08); }
.hint { font-size: 12px; color: var(--muted); }

.scale-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
}
.scale-row select {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 14px;
}
.scale-note { font-size: 12px; opacity: .7; }

/* 状态 */
#status-section { margin: 0 0 28px; }
#status-text { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.progress-bar {
  height: 6px; background: var(--border); border-radius: 3px; overflow: hidden;
}
#progress-fill {
  height: 100%; width: 0%; background: var(--accent);
  transition: width .25s ease;
}

/* 对比区 */
.compare-section { margin: 8px 0 28px; }
.compare-section h2 { font-size: 20px; margin: 0 0 6px; }
.compare-desc { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.compare-container {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  user-select: none;
  touch-action: none;
}
.compare-container img { display: block; width: 100%; height: auto; }
.after-wrapper {
  position: absolute; inset: 0; overflow: hidden; clip-path: inset(0 0 0 50%);
}
.after-wrapper img { position: absolute; inset: 0; }
.slider-handle {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 3px; background: #fff; transform: translateX(-50%);
  cursor: ew-resize; box-shadow: 0 0 0 1px rgba(0,0,0,.35);
}
.slider-handle::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 34px; height: 34px; background: #fff; border-radius: 50%;
  transform: translate(-50%, -50%); box-shadow: 0 2px 10px rgba(0,0,0,.4);
}

/* 按钮 */
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
button.secondary { background: transparent; border: 1px solid var(--border); color: var(--text); }
button:disabled { opacity: .5; cursor: default; }

/* 广告位 */
.ad-slot {
  min-height: 90px;
  margin: 28px 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 12px;
  border: 1px dashed var(--border); border-radius: var(--radius);
}

/* 文章 */
.articles { margin: 40px 0 24px; }
.articles h2 { font-size: 20px; margin: 0 0 16px; }
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.article-card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  color: var(--text);
  transition: border-color .2s, transform .2s;
}
.article-card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.article-card h3 { font-size: 15px; margin: 0 0 8px; line-height: 1.4; }
.article-card p { font-size: 13px; color: var(--muted); margin: 0; }

/* 页脚 */
.site-footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 24px 48px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.sep { margin: 0 6px; opacity: .5; }
.footer-note { margin: 10px 0 0; font-size: 12px; }

/* 通用页面（子页面） */
.page {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}
.page-header { margin-bottom: 24px; }
.page-header a { font-size: 14px; display: inline-block;
  line-height: 0; }
.page-header a .logo {
  height: 34px;
  width: auto;
  transition: filter 0.2s ease;
}
.page-header a:hover .logo {
  filter: brightness(1.25) drop-shadow(0 0 6px rgba(99, 102, 241, 0.25));
}
.page h1 { font-size: 26px; margin: 14px 0 10px; }
.page h2 { font-size: 19px; margin: 28px 0 10px; }
.page h3 { font-size: 16px; margin: 20px 0 8px; }
.page p, .page li { color: #d2d5da; font-size: 15px; }
.page .meta { color: var(--muted); font-size: 13px; }
.page ul { padding-left: 22px; }
.page blockquote {
  border-left: 3px solid var(--accent);
  margin: 16px 0;
  padding: 6px 16px;
  color: var(--muted);
  background: var(--panel);
  border-radius: 0 8px 8px 0;
}
.page .back-links { margin-top: 36px; font-size: 14px; }

.hidden { display: none !important; }

@media (max-width: 640px) {
  .site-header { padding: 14px 16px; flex-wrap: wrap; }
  .site-nav { gap: 14px; font-size: 13px; }
  main { padding: 4px 16px 16px; }
  .hero-box { padding: 28px 16px 22px; }
  .hero-box h1 { font-size: 24px; }
  .hero-desc { font-size: 13.5px; }
  .page { padding: 20px 16px 48px; }
  .logo { height: 28px; }
}

.compare-label {
  position: absolute;
  top: 10px;
  padding: 3px 10px;
  font-size: 12px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 6px;
  pointer-events: none;
  z-index: 2;
}
.label-left { left: 10px; }
.label-right { right: 10px; }