/* ============================================================
   ToolHub — shared stylesheet
   Pure CSS, no framework. Light / dark theme via [data-theme].
   ============================================================ */

:root{
  --bg:#f6f7fb;
  --surface:#ffffff;
  --surface-2:#f1f3f9;
  --border:#e5e8f0;
  --text:#0f172a;
  --text-2:#475569;
  --text-3:#94a3b8;
  --primary:#6366f1;
  --primary-2:#8b5cf6;
  --primary-soft:#eef2ff;
  --success:#16a34a;
  --danger:#dc2626;
  --shadow:0 1px 2px rgba(15,23,42,.06),0 8px 24px rgba(15,23,42,.06);
  --radius:16px;
}
[data-theme="dark"]{
  --bg:#0b1020;
  --surface:#121829;
  --surface-2:#1a2236;
  --border:#232c44;
  --text:#e8ecf5;
  --text-2:#a8b3c9;
  --text-3:#64748f;
  --primary:#818cf8;
  --primary-2:#a78bfa;
  --primary-soft:#1e2547;
  --shadow:0 1px 2px rgba(0,0,0,.4),0 8px 24px rgba(0,0,0,.35);
}

*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg);color:var(--text);line-height:1.6;
  -webkit-font-smoothing:antialiased;
  transition:background .25s,color .25s;
  min-height:100vh;display:flex;flex-direction:column;
}
a{color:inherit;text-decoration:none}
.container{max-width:1180px;margin:0 auto;padding:0 20px}
main{flex:1}

/* ===== Header ===== */
header{
  position:sticky;top:0;z-index:50;
  background:color-mix(in srgb,var(--surface) 82%,transparent);
  backdrop-filter:blur(12px);border-bottom:1px solid var(--border);
}
.nav{display:flex;align-items:center;justify-content:space-between;height:64px;gap:16px}
.brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:18px;letter-spacing:-.02em}
.brand-logo{
  width:34px;height:34px;border-radius:10px;display:grid;place-items:center;
  background:linear-gradient(135deg,var(--primary),var(--primary-2));color:#fff;font-size:17px;
}
.nav-links{display:flex;gap:22px;font-size:14px;color:var(--text-2);font-weight:500}
.nav-links a:hover{color:var(--text)}
.nav-right{display:flex;align-items:center;gap:10px}
.lang-select,.theme-btn{
  border:1px solid var(--border);background:var(--surface);color:var(--text-2);
  border-radius:10px;height:38px;padding:0 12px;font-size:14px;font-weight:500;cursor:pointer;font-family:inherit;
}
.theme-btn{width:38px;padding:0;display:grid;place-items:center}
/* 兼容旧类名 */
.nav-inner{display:flex;align-items:center;justify-content:space-between;height:64px;gap:16px}
.icon-btn{
  width:38px;height:38px;border-radius:10px;
  border:1px solid var(--border);background:var(--surface);color:var(--text-2);
  display:grid;place-items:center;cursor:pointer;font-size:16px;
}
.logo{font-weight:800;font-size:18px;letter-spacing:-.02em}

/* ===== Breadcrumb ===== */
.breadcrumb{font-size:13px;color:var(--text-3);padding:18px 0 0}
.breadcrumb a:hover{color:var(--primary)}
.breadcrumb span{margin:0 6px}

/* ===== Page head ===== */
.page-head{padding:22px 0 26px}
.page-head h1{font-size:clamp(26px,3.5vw,36px);font-weight:800;letter-spacing:-.02em;line-height:1.2}
.page-head p{max-width:640px;margin-top:10px;color:var(--text-2);font-size:15.5px}

/* ===== 工具页通用 ===== */
.tool-page{padding:30px 0 60px}
.tool-page h1{font-size:clamp(26px,3.5vw,36px);font-weight:800;letter-spacing:-.02em;line-height:1.2}
.tool-desc{max-width:640px;margin:10px 0 24px;color:var(--text-2);font-size:15.5px}

.tool-card{
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  padding:24px;box-shadow:var(--shadow);
}

.settings-grid{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:16px;margin:20px 0;
}
.setting-item{display:flex;flex-direction:column;gap:6px}
.setting-item label{font-size:13px;font-weight:600;color:var(--text-2)}
.setting-item input[type="range"]{width:100%}
.setting-item select,.setting-item input[type="number"]{
  width:100%;background:var(--surface-2);border:1px solid var(--border);border-radius:10px;
  padding:10px 12px;font-size:14px;color:var(--text);font-family:inherit;
}

/* ===== Layout: main panel + sidebar ===== */
.tool-layout{display:grid;grid-template-columns:1fr 300px;gap:22px;padding-bottom:44px}
.panel{
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  padding:24px;box-shadow:var(--shadow);
}
.panel + .panel{margin-top:18px}
.panel h2{font-size:16px;font-weight:600;margin-bottom:14px;letter-spacing:-.01em}

/* ===== Forms ===== */
label.field-label{display:block;font-size:13px;font-weight:600;color:var(--text-2);margin:14px 0 6px}
textarea.input,input.input,select.input{
  width:100%;background:var(--surface-2);border:1px solid var(--border);border-radius:12px;
  padding:12px 14px;font-size:15px;color:var(--text);font-family:inherit;transition:border-color .15s,background .15s;
}
textarea.input{min-height:150px;resize:vertical;line-height:1.6}
textarea.input:focus,input.input:focus,select.input:focus{outline:none;border-color:var(--primary);background:var(--surface)}
.input::placeholder{color:var(--text-3)}

.row{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.row > *{flex:1;min-width:140px}

/* ===== Buttons ===== */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  height:44px;padding:0 20px;border-radius:12px;border:1px solid var(--border);cursor:pointer;
  font-size:15px;font-weight:600;font-family:inherit;transition:.15s;background:var(--surface);color:var(--text-2);
}
.btn:hover{border-color:var(--primary);color:var(--primary)}
.btn-primary{background:linear-gradient(135deg,var(--primary),var(--primary-2));border-color:transparent;color:#fff}
.btn-primary:hover{color:#fff;filter:brightness(1.05)}
.btn-ghost{background:transparent}
.btn-sm{height:36px;padding:0 14px;font-size:13.5px;border-radius:10px}
.btn:disabled{opacity:.5;cursor:not-allowed}
/* 兼容旧类名 */
.btn-secondary{background:var(--surface);border:1px solid var(--border);color:var(--text-2)}
.btn-secondary:hover{border-color:var(--primary);color:var(--primary)}
.btn-small{height:36px;padding:0 14px;font-size:13.5px;border-radius:10px}

/* ===== Result box ===== */
.result-box{
  background:var(--surface-2);border:1px solid var(--border);border-radius:12px;
  padding:14px;font-size:14px;color:var(--text);word-break:break-word;min-height:48px;
  font-family:'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;
}
.result-box:empty::before{content:attr(data-empty);color:var(--text-3)}
.result-box pre{white-space:pre-wrap;word-break:break-word;font-family:inherit}

.stat-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.stat-chip{
  background:var(--surface-2);border:1px solid var(--border);border-radius:10px;
  padding:8px 14px;font-size:13px;color:var(--text-2);
}
.stat-chip b{color:var(--text);font-weight:600}

/* ===== Checkbox / color picker ===== */
.check{display:inline-flex;align-items:center;gap:8px;font-size:14px;color:var(--text-2);cursor:pointer;min-width:140px}
.check input{width:16px;height:16px;accent-color:var(--primary)}
input.color-pick{padding:4px;height:44px;cursor:pointer}

/* ===== Ad slot ===== */
.ad-slot{
  border:1px dashed var(--border);border-radius:14px;background:var(--surface-2);
  color:var(--text-3);font-size:12px;text-align:center;padding:18px;margin:18px 0;
}
.sidebar .ad-slot{margin:0 0 18px}

/* ===== Drop zone (image tools) ===== */
.dropzone{
  border:2px dashed var(--border);border-radius:var(--radius);background:var(--surface-2);
  padding:36px 20px;text-align:center;cursor:pointer;transition:.15s;color:var(--text-2);
}
.dropzone:hover,.dropzone.dragover{border-color:var(--primary);background:var(--primary-soft);color:var(--primary)}
.dropzone .dz-icon{font-size:34px;margin-bottom:10px}
.dropzone p{font-size:14px}
.dropzone small{display:block;margin-top:6px;color:var(--text-3);font-size:12px}
.preview-img{max-width:100%;border-radius:12px;margin-top:16px}

/* ===== Category chips ===== */
.cats{display:flex;gap:8px;flex-wrap:wrap}
.cat-chip{
  border:1px solid var(--border);background:var(--surface);color:var(--text-2);border-radius:999px;
  padding:8px 16px;font-size:14px;font-weight:500;cursor:pointer;transition:.15s;font-family:inherit;
}
.cat-chip:hover{border-color:var(--primary);color:var(--primary)}
.cat-chip.active{background:var(--primary);border-color:var(--primary);color:#fff}

/* ===== Tool card grid (shared with homepage) ===== */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(255px,1fr));gap:18px;padding-bottom:40px}
.tool-card-grid{
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:22px;
  transition:transform .18s,box-shadow .18s,border-color .18s;display:flex;flex-direction:column;gap:10px;
}
.tool-card-grid:hover{transform:translateY(-3px);box-shadow:var(--shadow);border-color:var(--primary)}
.tool-icon{width:46px;height:46px;border-radius:13px;display:grid;place-items:center;font-size:22px;background:var(--primary-soft)}
.tool-card-grid h3{font-size:16px;font-weight:600;letter-spacing:-.01em}
.tool-card-grid p{font-size:13.5px;color:var(--text-2);flex:1}
.tool-meta{display:flex;justify-content:space-between;align-items:center}
.tag{font-size:11px;color:var(--text-3);background:var(--surface-2);border-radius:6px;padding:3px 8px}
.go{font-size:13px;font-weight:600;color:var(--primary)}

/* ===== Features strip ===== */
.features{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px;margin:10px 0 50px}
.feature{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:22px}
.feature .f-ico{font-size:22px;margin-bottom:10px}
.feature h4{font-size:15px;margin-bottom:6px}
.feature p{font-size:13.5px;color:var(--text-2)}

/* ===== Footer ===== */
footer{border-top:1px solid var(--border);background:var(--surface-2);margin-top:auto}
.foot{display:flex;flex-wrap:wrap;justify-content:space-between;gap:24px;padding:36px 0}
.foot-brand{max-width:280px}
.foot-brand p{font-size:13px;color:var(--text-2);margin-top:10px}
.foot-col h5{font-size:13px;font-weight:600;margin-bottom:12px}
.foot-col a{display:block;font-size:13.5px;color:var(--text-2);margin-bottom:8px}
.foot-col a:hover{color:var(--text)}
.copy{border-top:1px solid var(--border);padding:18px 0;font-size:12.5px;color:var(--text-3);text-align:center}
/* 兼容旧类名 */
.footer-inner{display:flex;flex-wrap:wrap;justify-content:space-between;gap:24px;padding:36px 0}
.footer-links{display:flex;gap:16px}
.footer-links a{font-size:13.5px;color:var(--text-2)}
.footer-links a:hover{color:var(--text)}

/* ===== Responsive ===== */
@media(max-width:900px){
  .tool-layout{grid-template-columns:1fr}
}
@media(max-width:720px){
  .nav-links{display:none}
  .panel,.tool-card{padding:18px}
}

/* ========== 图片工具通用样式 ========== */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  background: var(--surface-2);
  margin-bottom: 24px;
}
.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}
.upload-area input[type="file"] {
  display: none !important;
  width: 0;
  height: 0;
  opacity: 0;
  position: absolute;
}
.upload-icon {
  font-size: 48px;
  margin-bottom: 12px;
  color: var(--primary);
}
.upload-tip {
  color: var(--text-2);
  font-size: 14px;
  margin-top: 8px;
}

/* 加载动画 */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 结果列表 */
.result-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.result-item {
  display: grid;
  grid-template-columns: 60px 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.result-thumb {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface);
}
.result-info {
  min-width: 0;
}
.result-name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.result-size {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
}
.result-status {
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.status-processing { color: var(--primary); background: rgba(99, 102, 241, 0.1); }
.status-success { color: #10b981; background: rgba(16, 185, 129, 0.1); }
.status-failed { color: #ef4444; background: rgba(239, 68, 68, 0.1); }

/* 批量操作栏 */
.batch-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.batch-stats {
  color: var(--text-2);
  font-size: 14px;
}

/* 响应式 */
@media (max-width: 640px) {
  .result-item {
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
    gap: 8px 12px;
  }
  .result-thumb {
    width: 48px;
    height: 48px;
    grid-row: span 2;
  }
  .result-status {
    grid-column: 2;
    justify-self: start;
  }
  .result-item .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
  .batch-actions {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
}

/* ========== 图片工具批量处理扩展 ========== */
.dropzone input[type="file"] {
  display: none !important;
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.result-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.result-item {
  display: grid;
  grid-template-columns: 56px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: 12px;
  border: 1px solid var(--border);
}
.result-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface);
}
.result-info { min-width: 0; }
.result-name {
  font-weight: 500;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.result-size {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
}
.result-status {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.status-processing { color: var(--primary); background: var(--primary-soft); }
.status-success { color: var(--success); background: rgba(22, 163, 74, 0.1); }
.status-failed { color: var(--danger); background: rgba(220, 38, 38, 0.1); }

.batch-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.batch-stats {
  color: var(--text-2);
  font-size: 13px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.settings-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.settings-row .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.settings-row .field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

@media (max-width: 600px) {
  .result-item {
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
    gap: 6px 12px;
  }
  .result-thumb {
    width: 48px;
    height: 48px;
    grid-row: span 2;
  }
  .result-status {
    grid-column: 2;
    justify-self: start;
  }
  .result-item .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
  .batch-actions {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
}
/* ========== ICO生成工具 & 正则测试器 扩展样式 ========== */
.size-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 8px 0;
}
.size-checks .check { min-width: auto; }

.match-highlight {
  background: rgba(99, 102, 241, 0.2);
  border-bottom: 2px solid var(--primary);
  border-radius: 2px;
}
.match-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.match-item {
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 13px;
}
.match-item .match-index {
  display: inline-block;
  min-width: 28px;
  font-weight: 600;
  color: var(--primary);
}
.match-item .match-groups {
  margin-top: 4px;
  color: var(--text-2);
  font-size: 12px;
}

.regex-flags {
  display: flex;
  gap: 14px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-2);
}
.regex-flags label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.regex-flags input { accent-color: var(--primary); }

.result-text {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.7;
  min-height: 120px;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text);
}
.lang-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 40px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #ffffff;
  box-sizing: border-box;
}
.lang-icon {
  font-size: 16px;
  line-height: 1;
}
.lang-select-wrap select {
  border: none;
  background: transparent;
  padding: 0;
  outline: none;
  cursor: pointer;
  font-size: inherit;
  color: inherit;
}
/* 深色模式下语言选择器适配 */
[data-theme="dark"] .lang-select-wrap {
  background: #1e293b;
  border-color: #334155;
}
[data-theme="dark"] .lang-select-wrap select {
  color: #e2e8f0;
  background: #1e293b;
}
[data-theme="dark"] .lang-select-wrap select option {
  color: #e2e8f0;
  background: #1e293b;
}
/* ========== 电子书转换器 ========== */
.ebook-tool {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.drop-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: #f8fafc;
}
.drop-zone.drag-over {
  border-color: #3b82f6;
  background: #eff6ff;
}
.drop-icon { font-size: 48px; margin-bottom: 12px; }
.drop-title { font-size: 18px; font-weight: 600; margin: 0 0 6px; }
.drop-sub { color: #64748b; margin: 0; font-size: 14px; }

.file-info {
  margin-top: 16px;
  padding: 16px;
  background: #f1f5f9;
  border-radius: 8px;
}
.info-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}

.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.form-row label { font-size: 14px; color: #334155; }
.form-row select, .form-row input {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  min-width: 160px;
  background: white;
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  transition: .2s;
  border-radius: 22px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px; width: 16px;
  left: 3px; bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}
input:checked + .slider { background-color: #3b82f6; }
input:checked + .slider:before { transform: translateX(18px); }

.advanced-toggle {
  padding: 10px 0;
  cursor: pointer;
  color: #3b82f6;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  margin: 12px 0;
}

.btn-primary {
  width: 100%;
  padding: 12px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 8px;
}
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-success {
  width: 100%;
  padding: 12px;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
}

.progress-wrap { margin: 16px 0; }
.progress-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-fill {
  height: 100%;
  background: #3b82f6;
  width: 0%;
  transition: width .3s;
}
.progress-text { font-size: 13px; color: #64748b; text-align: center; margin: 0; }

.result-wrap { margin-top: 16px; }
.result-info { text-align: center; font-size: 13px; color: #64748b; margin-top: 8px; }

.error-tip {
  margin-top: 12px;
  padding: 10px 14px;
  background: #fef2f2;
  color: #dc2626;
  border-radius: 6px;
  font-size: 13px;
}

.tool-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 40px 0;
}
.feature-item {
  padding: 20px;
  background: #f8fafc;
  border-radius: 10px;
  text-align: center;
}
.feature-icon { font-size: 28px; margin-bottom: 8px; }
.feature-item h4 { margin: 8px 0; font-size: 16px; }
.feature-item p { margin: 0; font-size: 14px; color: #64748b; }

.faq-section { margin-top: 40px; }
.faq-item {
  padding: 16px 0;
  border-bottom: 1px solid #e2e8f0;
}
.faq-item h3 { margin: 0 0 8px; font-size: 16px; }
.faq-item p { margin: 0; color: #475569; font-size: 14px; line-height: 1.6; }

/* 深色模式适配 */
[data-theme="dark"] .drop-zone {
  border-color: #334155;
  background: #1e293b;
}
[data-theme="dark"] .file-info { background: #1e293b; }
[data-theme="dark"] .form-row label { color: #cbd5e1; }
[data-theme="dark"] .form-row select,
[data-theme="dark"] .form-row input {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}
[data-theme="dark"] .advanced-toggle { border-color: #334155; }
[data-theme="dark"] .progress-bar { background: #334155; }
[data-theme="dark"] .feature-item { background: #1e293b; }
[data-theme="dark"] .feature-item p { color: #94a3b8; }
[data-theme="dark"] .faq-item { border-color: #334155; }
[data-theme="dark"] .faq-item p { color: #94a3b8; }
[data-theme="dark"] .error-tip { background: #450a0a; color: #fca5a5; }

/* 深色模式下拉框选项文字修复 */
[data-theme="dark"] select option {
  background: #1e293b;
  color: #e2e8f0;
}

@media (max-width: 768px) {
  .ebook-tool { grid-template-columns: 1fr; }
  .tool-features { grid-template-columns: 1fr; }
}

/* 社交分享板块 */
.share-block {
  margin-top: 20px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.share-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}
.share-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: .2s;
  text-decoration: none;
}
.share-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}
.share-btn.copy {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border: none;
}
.share-btn.copy:hover {
  opacity: .9;
  color: #fff;
}
@media (max-width: 600px) {
  .share-btn span { display: none; }
  .share-btn { padding: 8px 10px; font-size: 16px; }
}
