/* ====================================================
   小蜗牛语音工坊 · 主题样式
   主色：靛蓝 #4f46e5
   辅助：浅蓝 #dbeafe
   背景：浅蓝 + 白色
   ==================================================== */

/* -------- 全局 -------- */
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #1f2330;
  background: #f8fafc;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* 整体背景：清爽的蓝色调 */
body {
  background:
    radial-gradient(ellipse at top left, #dbeafe 0%, #f8fafc 50%, #f8fafc 100%);
  min-height: 100vh;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; color: #0f172a; letter-spacing: -.2px; }
h1 { font-size: 36px; line-height: 1.2; }
h2 { font-size: 22px; }
h3 { font-size: 15px; }
p  { margin: 0; }
a  { color: #4f46e5; text-decoration: none; }
a:hover { color: #4338ca; text-decoration: underline; }
muted, .muted { color: #475569; opacity: 0.85; }
.small { font-size: 12px; }

::selection { background: #c7d2fe; color: #1e1b4b; }

/* -------- 顶部导航 -------- */
.topnav {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 30;
}
.topnav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}
.brand-logo {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: #eff6ff;
  display: flex; align-items: center; justify-content: center;
  padding: 4px;
}
.brand-title { font-size: 15px; font-weight: 700; color: #0f172a; letter-spacing: 0.3px; }
.brand-sub   { font-size: 11px; color: #94a3b8; margin-top: 2px; }

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.nav-item {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  color: #64748b;
  text-decoration: none;
  transition: color .12s ease, background .12s ease;
  white-space: nowrap;
  font-weight: 500;
  position: relative;
}
.nav-item:hover { background: #f1f5f9; color: #0f172a; text-decoration: none; }
.nav-item.active {
  color: #4f46e5;
  background: #eef2ff;
  font-weight: 600;
}

/* -------- 主内容区 -------- */
.content {
  padding: 44px 24px 64px;
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
}

/* -------- 面板切换 -------- */
.panel { display: none; animation: fade .18s ease; }
.panel.active { display: block; }
@keyframes fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel-head {
  text-align: center;
  margin-bottom: 28px;
}
.panel-head h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.4px;
  margin-bottom: 10px;
  color: #0f172a;
}
.panel-head p { color: #64748b; opacity: 0.85; font-size: 13.5px; }

/* -------- Hero 首页带蜗牛装饰 -------- */
.hero {
  position: relative;
  text-align: center;
  padding: 52px 20px 32px;
  background: linear-gradient(135deg, #f8fafc 0%, #dbeafe 50%, #fff 100%);
  border-radius: 24px;
  overflow: hidden;
  border: 2px solid #bfdbfe;
}

/* 大蜗牛装饰 */
.hero-snail-decor {
  position: absolute;
  opacity: 0.5;
  pointer-events: none;
}
.hero-snail-decor {
  top: 30px;
  left: 40px;
  animation: snailWalk 8s ease-in-out infinite;
}
.hero-snail-decor-2 {
  top: auto;
  left: auto;
  bottom: 20px;
  right: 60px;
  animation-delay: -3s;
  animation: snailWalk 10s ease-in-out infinite;
}

@keyframes snailWalk {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
}

.hero-chip {
  display: inline-block;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;
  margin-bottom: 18px;
  border: 1.5px solid #93c5fd;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.hero-title {
  font-size: 38px;
  line-height: 1.3;
  margin-bottom: 14px;
  font-weight: 800;
  letter-spacing: -.6px;
  color: #0f172a;
}

.hero-title .grad {
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lead {
  max-width: 560px;
  margin: 0 auto 24px;
  font-size: 14.5px;
  color: #475569;
  opacity: 0.9;
  line-height: 1.8;
}

.hero-actions {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 2px dashed #bfdbfe;
}
.hero-stats strong {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}
.hero-stats span { font-size: 12px; color: #64748b; }

/* -------- 功能卡片网格 -------- */
.feature-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.feature-card {
  background: #ffffff;
  border: 2px solid #bfdbfe;
  border-radius: 18px;
  padding: 22px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 40px; height: 40px;
  background: radial-gradient(circle at top right, #dbeafe 0%, transparent 70%);
  opacity: 0.6;
  border-radius: 0 18px 0 0;
  pointer-events: none;
}
.feature-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.12);
  transform: translateY(-2px);
}
.feature-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e3a8a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 14px;
  font-weight: 700;
}
.feature-tag {
  display: inline-block;
  background: #bbf7d0;
  color: #065f46;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #0f172a;
}
.feature-card p {
  font-size: 13px;
  color: #334155;
  opacity: 0.9;
  line-height: 1.7;
  margin-top: 6px;
}
.feature-card ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  font-size: 12.5px;
  color: #475569;
  line-height: 1.8;
  opacity: 0.9;
}
.feature-card li::before {
  content: "🐌";
  margin-right: 8px;
  opacity: 0.7;
}

/* -------- 工作区卡片（通用） -------- */
.workspace {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.card {
  background: #ffffff;
  border: 2px solid #bfdbfe;
  border-radius: 18px;
  padding: 24px 26px;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.06);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.card-head-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.card-head-sub {
  font-size: 12.5px;
  color: #64748b;
  opacity: 0.85;
  margin-top: 4px;
}

/* -------- pill 选择器 -------- */
.voice-filter {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 2px dashed #bfdbfe;
}
.voice-filter:last-of-type { border-bottom: none; }
.voice-filter.hidden { display: none; }
.voice-filter-label {
  font-size: 13px;
  color: #1e3a8a;
  font-weight: 600;
  padding-top: 8px;
  white-space: nowrap;
}
.voice-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.voice-pill {
  border: 2px solid #bfdbfe;
  background: #f8fafc;
  color: #1e3a8a;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: all .15s ease;
  line-height: 1.3;
}
.voice-pill:hover { border-color: #93c5fd; color: #1e3a8a; background: #dbeafe; }
.voice-pill.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-color: #4f46e5;
  color: #fff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
  font-weight: 600;
}
.voice-pill.is-empty {
  opacity: .4;
  cursor: not-allowed;
}
.voice-pill.is-empty:hover {
  background: #f8fafc;
  color: #1e3a8a;
  opacity: .4;
}

/* 当前音色预览卡片 */
.voice-current {
  margin-top: 20px;
  padding: 20px 24px;
  background: linear-gradient(135deg, #dbeafe 0%, #f8fafc 100%);
  border: 2px solid #bfdbfe;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
.voice-current::before {
  content: '🐌';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
  opacity: 0.15;
}
.voice-current-name {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
}
.voice-current-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.voice-current-tags .tag {
  display: inline-block;
  padding: 4px 12px;
  background: #fff;
  border: 1.5px solid #bfdbfe;
  color: #1e3a8a;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.voice-current-desc {
  font-size: 13px;
  color: #334155;
  opacity: 0.85;
  line-height: 1.6;
}

/* -------- 音色卡片网格 -------- */
.voice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.voice-card {
  background: #ffffff;
  border: 2px solid #bfdbfe;
  border-radius: 14px;
  padding: 14px 18px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.voice-card:hover { background: #f8fafc; border-color: #93c5fd; }
.voice-card-selected {
  background: #dbeafe;
  border-color: #4f46e5;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.12);
}
.voice-name {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 8px;
}
.voice-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.tag {
  display: inline-block;
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e3a8a;
  font-weight: 500;
  border: 1px solid #bfdbfe;
}
.voice-summary {
  margin-top: 12px;
  background: #f8fafc;
  border: 2px solid #bfdbfe;
  color: #334155;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
}

/* -------- 表单元素（统一专业风格） -------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.field label {
  font-size: 13px;
  color: #1e3a8a;
  font-weight: 600;
}
.field-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.field-row .field { margin-bottom: 0; }

textarea,
input[type=text],
input[type=number],
select {
  width: 100%;
  border: 2px solid #bfdbfe;
  background: #f8fafc;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  color: #0f172a;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  outline: none;
}
textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.7;
}
textarea:focus,
input:focus,
select:focus {
  border-color: #4f46e5;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.10);
}

/* JSON 工具：大输入输出框 + 等宽字体 */
#json-input, #json-output,
#json-diff-a, #json-diff-b {
  width: 100%;
  min-height: 600px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, Monaco, monospace;
  font-size: 13px;
  line-height: 1.8;
  tab-size: 2;
  color: #0f172a;
  border: 2px solid #bfdbfe;
  border-radius: 12px;
  padding: 14px 16px;
  resize: vertical;
  box-sizing: border-box;
}
#json-input:focus, #json-diff-a:focus, #json-diff-b:focus { border-color: #4f46e5; box-shadow: 0 0 0 4px rgba(79,70,229,.10); outline: none; }
#json-output { background: #f8fafc; }

/* 隐藏原生 file input */
input[type=file] {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* 字数统计 */
.input-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #64748b;
  opacity: 0.85;
  margin-top: 4px;
}
.input-meta .count { font-weight: 600; }
.input-meta .count.over { color: #ef4444; }

.lang-hint {
  display: none;
  margin-top: 8px;
  padding: 8px 12px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  color: #92400e;
  font-size: 13px;
  line-height: 1.5;
}

/* 文件上传区 */
.upload-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  border: 2.5px dashed #93c5fd;
  border-radius: 18px;
  background: #f8fafc;
  color: #1e3a8a;
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
  text-align: center;
  user-select: none;
  margin-top: 8px;
}
.upload-drop:hover, .upload-drop.hover {
  border-color: #4f46e5;
  background: #dbeafe;
  color: #1e3a8a;
}
.upload-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #4f46e5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 6px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}
.file-selected {
  margin-top: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 500;
  border: 1.5px solid #bfdbfe;
}

/* -------- 按钮 -------- */
.actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.btn {
  background: #ffffff;
  border: 2px solid #bfdbfe;
  color: #1e3a8a;
  border-radius: 12px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 13.5px;
  font-family: inherit;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease, box-shadow .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover { background: #dbeafe; border-color: #93c5fd; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border: none;
  color: #fff;
  padding: 12px 28px;
  font-size: 14.5px;
  font-weight: 600;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.25);
  letter-spacing: .2px;
}
.btn.primary:hover { filter: brightness(1.05); box-shadow: 0 14px 28px rgba(79, 70, 229, 0.30); }
.btn.primary .arrow { opacity: .85; margin-left: 2px; }
.btn.block { width: 100%; justify-content: center; }
.btn.ghost {
  background: #ffffff;
  border-color: #bfdbfe;
}
.btn.ghost:hover { background: #f8fafc; }

/* -------- TTS 音频区 -------- */
.tts-audio-wrap {
  margin-top: 14px;
  background: #f8fafc;
  border: 2px solid #bfdbfe;
  border-radius: 14px;
  padding: 14px 18px;
  position: relative;
}
.tts-audio-wrap::before {
  content: '🎵';
  position: absolute;
  top: 14px;
  right: 18px;
  opacity: 0.4;
  font-size: 20px;
}
.tts-audio-wrap audio { width: 100%; margin-top: 6px; }

/* -------- JSON 工具 -------- */
.op-groups {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  padding: 6px 8px;
  background: #f8fafc;
  border-radius: 10px;
}
.op-btn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 12px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  transition: all .12s ease;
  white-space: nowrap;
}
.op-btn:hover { background: #ffffff; border-color: #e2e8f0; color: #0f172a; }
.op-btn.active {
  background: #ffffff;
  border-color: #4f46e5;
  color: #4f46e5;
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.08);
}
.op-icon {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  opacity: 0.85;
}
.op-btn.active .op-icon { color: #4f46e5; opacity: 1; }

/* 输入输出并排 */
.json-io {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 768px) {
  .json-io { grid-template-columns: 1fr; }
}
.json-io-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.json-io-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.json-io-head label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}
.json-io-actions {
  display: flex;
  gap: 4px;
}
.mini-btn {
  padding: 3px 9px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
  font-family: inherit;
  transition: all .12s ease;
  white-space: nowrap;
  font-weight: 500;
}
.mini-btn:hover { background: #f1f5f9; color: #0f172a; }
.mini-btn:active { background: #e2e8f0; }
.json-count {
  font-size: 11px;
  color: #94a3b8;
  text-align: right;
  padding-right: 2px;
}

/* JSON 树形高亮展示 */
.json-tree {
  width: 100%;
  min-height: 600px;
  max-height: 800px;
  overflow: auto;
  border: 2px solid #bfdbfe;
  border-radius: 12px;
  padding: 14px 16px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, Monaco, monospace;
  font-size: 13px;
  line-height: 1.9;
  box-sizing: border-box;
}
.json-tree::-webkit-scrollbar { width: 10px; height: 10px; }
.json-tree::-webkit-scrollbar-track { background: transparent; }
.json-tree::-webkit-scrollbar-thumb { background: #334155; border-radius: 6px; }

.json-row {
  display: block;
}
.json-row.is-parent > .json-children {
  display: block;
  padding-left: 22px;
}
.json-row.is-parent.collapsed > .json-children {
  display: none;
}
.json-row.is-parent.collapsed > .json-hint {
  display: none;
}
.json-row.is-parent.collapsed > .json-summary {
  display: block;
}
.json-row.is-parent:not(.collapsed) > .json-summary {
  display: none;
}

.json-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-right: 4px;
  color: #64748b;
  cursor: pointer;
  user-select: none;
  font-size: 8px;
  border-radius: 3px;
  transition: transform .12s ease;
  background: transparent;
  border: none;
  padding: 0;
  vertical-align: middle;
  flex-shrink: 0;
}
.json-toggle:hover { background: #1e293b; color: #cbd5e1; }
.json-row.collapsed > .json-toggle { transform: rotate(-90deg); }

.json-summary {
  display: none;
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  padding: 1px 6px;
  margin-left: 2px;
  background: #1e293b;
  border-radius: 4px;
  vertical-align: middle;
}
.json-summary:hover { background: #334155; color: #cbd5e1; }

.json-k { color: #93c5fd; }
.json-colon { color: #64748b; margin: 0 3px; }
.json-str { color: #86efac; }
.json-num { color: #fbbf24; }
.json-bool { color: #f472b6; }
.json-null { color: #a78bfa; }
.json-brace { color: #60a5fa; }
.json-comma { color: #475569; }
.json-hint { font-size: 11px; color: #475569; margin-left: 4px; }

/* -------- Diff 工具 -------- */
.diff-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.diff-row {
  display: grid;
  grid-template-columns: 48px 1fr 1fr;
  border-bottom: 1px solid #f1f5f9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, Monaco, monospace;
  font-size: 13px;
  line-height: 1.7;
}
.diff-row:last-child { border-bottom: none; }
.diff-lineno {
  padding: 6px 8px;
  text-align: right;
  color: #94a3b8;
  font-size: 12px;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.diff-cell {
  padding: 6px 12px;
  white-space: pre-wrap;
  word-break: break-all;
  position: relative;
  min-height: 28px;
  color: #334155;
}
.diff-cell:nth-of-type(3) { border-left: 1px solid #f1f5f9; }

.diff-equal .diff-cell { background: #ffffff; color: #94a3b8; }
.diff-modified .diff-cell:nth-of-type(2) { background: #fef2f2; }
.diff-modified .diff-cell:nth-of-type(3) { background: #f0fdf4; }
.diff-added .diff-cell:nth-of-type(2) { background: #f8fafc; color: #cbd5e1; }
.diff-added .diff-cell:nth-of-type(3) { background: #f0fdf4; }
.diff-removed .diff-cell:nth-of-type(2) { background: #fef2f2; }
.diff-removed .diff-cell:nth-of-type(3) { background: #f8fafc; color: #cbd5e1; }

.diff-cell .diff-char-del {
  background: #fecaca;
  color: #991b1b;
  border-radius: 2px;
  padding: 0 1px;
}
.diff-cell .diff-char-add {
  background: #bbf7d0;
  color: #166534;
  border-radius: 2px;
  padding: 0 1px;
}

.diff-summary {
  display: flex;
  gap: 14px;
  font-size: 12.5px;
  color: #475569;
  margin-top: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 8px;
}
.diff-summary .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.diff-summary .dot.del { background: #ef4444; }
.diff-summary .dot.add { background: #22c55e; }
.diff-summary .dot.mod { background: #f59e0b; }

.diff-json-node {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, Monaco, monospace;
  font-size: 13px;
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: start;
}
.diff-json-node:last-child { border-bottom: none; }
.diff-json-node .dj-key {
  color: #475569;
  font-weight: 500;
  min-width: 120px;
}
.diff-json-node .dj-a,
.diff-json-node .dj-b {
  padding: 4px 10px;
  border-radius: 6px;
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 12.5px;
}
.diff-json-node .dj-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.dj-status.same { background: #f1f5f9; color: #64748b; }
.dj-status.changed { background: #fef3c7; color: #b45309; }
.dj-status.added { background: #dcfce7; color: #166534; }
.dj-status.removed { background: #fee2e2; color: #991b1b; }
.diff-json-node .dj-a { background: #fef2f2; }
.diff-json-node .dj-b { background: #f0fdf4; }

/* -------- 博客文章卡片 -------- */
.posts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.post {
  background: #ffffff;
  border: 2px solid #bfdbfe;
  border-radius: 18px;
  padding: 22px 26px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.post::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #6366f1, #4f46e5);
  border-radius: 4px 0 0 4px;
}
.post:hover {
  border-color: #93c5fd;
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -10px rgba(79, 70, 229, 0.15);
}
.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
}
.post h3 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}
.post .meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: #64748b;
  font-size: 12.5px;
  margin-bottom: 14px;
  opacity: 0.9;
}
.post .meta-time::before { content: '🐌 '; }
.post-content {
  color: #334155;
  font-size: 14px;
  line-height: 1.8;
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px 18px;
  white-space: pre-wrap;
  word-break: break-word;
  opacity: 0.9;
}
.post-empty {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
  font-size: 14px;
}
.post-empty-icon {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.6;
}

/* -------- 音色克隆 Tab 切换 -------- */
.tab-switch {
  display: inline-flex;
  background: #f8fafc;
  border: 2px solid #bfdbfe;
  border-radius: 14px;
  padding: 4px;
  margin: 12px 0 16px;
  gap: 4px;
}
.tab-switch .tab-btn {
  padding: 8px 18px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s ease;
}
.tab-switch .tab-btn:hover { color: #1e3a8a; }
.tab-switch .tab-btn.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* -------- 预设特色音色 -------- */
.preset-voices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 8px 0;
}
.preset-voice-item {
  background: #ffffff;
  border: 2px solid #bfdbfe;
  border-radius: 14px;
  padding: 14px 12px;
  cursor: pointer;
  text-align: center;
  transition: all .15s ease;
}
.preset-voice-item:hover {
  border-color: #93c5fd;
  background: #f8fafc;
  transform: translateY(-1px);
}
.preset-voice-item.selected {
  border-color: #4f46e5;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.15);
}
.preset-voice-icon {
  font-size: 28px;
  margin-bottom: 6px;
}
.preset-voice-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}
.preset-voice-desc {
  font-size: 11px;
  color: #64748b;
  margin-top: 3px;
}

.full-input {
  width: 100%;
  border: 2px solid #bfdbfe;
  background: #f8fafc;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  color: #0f172a;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  outline: none;
}
.full-input:focus {
  border-color: #4f46e5;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.10);
}

/* -------- 下拉选择框样式 -------- */
select.full-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
  font-size: 14px;
  color: #0f172a;
}
select.full-input:focus {
  border-color: #4f46e5;
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.10);
}
select.full-input option {
  padding: 8px 12px;
  font-size: 13px;
}

/* -------- 响应式 -------- */
@media (max-width: 980px) {
  .topnav-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 16px;
  }
  .nav { justify-content: flex-start; }
  .nav-item { font-size: 12.5px; padding: 7px 12px; }
  .topnav-right { justify-content: flex-start; }
  .content { padding: 24px 16px 48px; }
  .hero { padding: 32px 10px 16px; }
  .hero-title { font-size: 28px; }
  .feature-grid { margin-top: 24px; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .voice-filter { grid-template-columns: 80px 1fr; gap: 12px; }
}

/* -------- 底部申明 -------- */
.site-footer {
  border-top: 2px solid #bfdbfe;
  background: #ffffff;
  padding: 22px 24px 28px;
  margin-top: 48px;
  position: relative;
}
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  position: relative;
}
.footer-snail {
  position: absolute;
  top: -18px;
  right: 10px;
  opacity: 0.6;
}
.footer-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #64748b;
  opacity: 0.9;
}
.footer-brand-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #0f172a;
}
.brand-sep { color: #93c5fd; font-weight: 400; }
.footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-right a { color: #4f46e5; text-decoration: none; font-weight: 500; }
.footer-right a:hover { text-decoration: underline; }
.footer-right .sep { color: #93c5fd; }
@media (max-width: 980px) {
  .site-footer { padding: 16px 20px 20px; }
  .footer-line { flex-direction: column; align-items: flex-start; }
  .footer-snail { right: 10px; top: -14px; }
}
