/* tools.aichong365.cc 共享样式 - 简洁浅色主题 */
:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --ink: #1c2333;
  --muted: #667085;
  --line: #e4e9f2;
  --brand: #2456e6;
  --brand-dark: #1a43bd;
  --brand-soft: #eaf0ff;
  --danger: #d92d20;
  --ok: #12805c;
  --warn-bg: #fff7e6;
  --warn-ink: #8a5a00;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 4px 12px rgba(16, 24, 40, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* 页眉 */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header .container {
  display: flex; align-items: center; gap: 16px;
  height: 60px;
}
.brand { font-weight: 700; font-size: 18px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), #7a5cff);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 800;
}
.site-header nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.site-header nav a {
  color: var(--muted); padding: 8px 12px; border-radius: 8px; font-size: 14px;
}
.site-header nav a:hover, .site-header nav a.active {
  color: var(--brand); background: var(--brand-soft); text-decoration: none;
}

/* 首页 hero */
.hero { text-align: center; padding: 56px 20px 36px; }
.hero h1 { font-size: 32px; margin: 0 0 12px; letter-spacing: 1px; }
.hero p { color: var(--muted); margin: 0 auto; max-width: 640px; }
.hero .badges { margin-top: 16px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.badge {
  font-size: 12px; color: var(--brand); background: var(--brand-soft);
  border-radius: 999px; padding: 4px 12px;
}

/* 工具卡片网格 */
.section-title { font-size: 20px; margin: 36px 0 16px; display: flex; align-items: center; gap: 10px; }
.section-title small { font-size: 13px; color: var(--muted); font-weight: 400; }
.tool-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px;
  transition: transform .12s ease, box-shadow .12s ease;
}
a.card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(16,24,40,.1); }
.card .icon { font-size: 28px; }
.card h3 { margin: 0; font-size: 16px; color: var(--ink); }
.card p { margin: 0; font-size: 13px; color: var(--muted); flex: 1; }
.card .go { font-size: 13px; color: var(--brand); font-weight: 600; }
.card.ext .go::after { content: " ↗"; }

/* 工具页 */
.tool-page { padding: 28px 0 60px; }
.tool-page h1 { font-size: 24px; margin: 0 0 6px; }
.tool-page .sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.panel h2 { font-size: 16px; margin: 0 0 12px; }
.panel h2 .step {
  display: inline-flex; width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 12px;
  align-items: center; justify-content: center; margin-right: 8px; vertical-align: 1px;
}

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 4px; }
input[type="text"], input[type="number"], select, textarea {
  width: 100%; padding: 9px 12px; font-size: 14px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
  font-family: inherit;
}
input[type="range"] { width: 100%; accent-color: var(--brand); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); width: 16px; height: 16px; }
.checkline { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 8px; }
select { appearance: auto; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; font-size: 14px; font-weight: 600; border-radius: 9px;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: background .12s ease;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* 拖放区 */
.dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 36px 20px; text-align: center; color: var(--muted);
  cursor: pointer; transition: border-color .12s ease, background .12s ease;
  font-size: 14px;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.dropzone input[type="file"] { display: none; }

/* 进度条 / 日志 */
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.progress > div { height: 100%; width: 0; background: var(--brand); border-radius: 999px; transition: width .2s ease; }
.log {
  background: #101828; color: #d1e0ff; border-radius: 8px; padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; max-height: 180px; overflow-y: auto; white-space: pre-wrap; margin-top: 10px;
}

/* 提示条 */
.notice {
  border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px;
  background: var(--brand-soft); color: #1a3a8f;
}
.notice.warn { background: var(--warn-bg); color: var(--warn-ink); }
.notice.ok { background: #e6f7ef; color: var(--ok); }

/* 结果列表 / 表格 */
.result-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.result-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 13px;
}
.result-item .meta { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-item .meta small { color: var(--muted); display: block; }
table.spec { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
table.spec th, table.spec td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.spec th { color: var(--muted); font-weight: 600; width: 32%; }

/* 媒体预览 */
.preview { max-width: 100%; border-radius: 8px; border: 1px solid var(--line); background: #000; }
canvas.wave { width: 100%; height: 120px; border: 1px solid var(--line); border-radius: 8px; background: #0f172a; cursor: crosshair; display: block; }
img.thumb { max-width: 220px; max-height: 160px; border-radius: 8px; border: 1px solid var(--line); }

.timer { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 2px; }
.rec-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); margin-right: 8px; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* 页脚 */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 40px; padding: 24px 0;
  color: var(--muted); font-size: 12px; text-align: center; background: var(--card);
}

/* 工具类 */
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
.center { text-align: center; }
.mt { margin-top: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) {
  .row2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 24px; }
  .site-header nav a { padding: 8px 8px; font-size: 13px; }
  /* 移动端适配：iOS 上字号 <16px 的输入框聚焦会自动放大页面，统一提到 16px */
  input[type="text"], input[type="number"], select, textarea { font-size: 16px; }
  /* 触摸目标不小于 44px */
  .btn { min-height: 44px; }
  .img-card .rm { width: 30px; height: 30px; font-size: 16px; }
  .panel { padding: 16px; }
}
