/* ============================================================
   创软 - IVTSOFT 全局样式
   ============================================================ */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --primary-bg: #eff6ff;
  --surface: #ffffff;
  --bg: #f8fafc;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 4px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.08);
  --max-width: 1280px;
  --nav-height: 60px;
}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans SC",sans-serif;
  color:var(--text);
  background:var(--bg);
  line-height:1.6;
  min-height:100vh;
}

a{color:var(--primary);text-decoration:none;transition:color .2s}
a:hover{color:var(--primary-dark)}

/* ---- Navbar ---- */
.navbar{
  background:var(--surface);
  border-bottom:1px solid var(--border);
  position:sticky;top:0;z-index:100;
  height:var(--nav-height);
  backdrop-filter:blur(12px);
  background:rgba(255,255,255,.92);
}
.nav-inner{
  max-width:var(--max-width);margin:0 auto;padding:0 24px;
  height:100%;display:flex;align-items:center;justify-content:space-between;
}
.nav-logo{
  display:flex;align-items:center;gap:10px;font-size:22px;font-weight:700;
  color:#2563eb;text-decoration:none;
}
.nav-logo svg{width:32px;height:32px}
.nav-search{
  position:relative;width:360px;max-width:40vw;
}
.nav-search input{
  width:100%;height:40px;padding:0 16px 0 40px;
  border:1.5px solid var(--border);border-radius:20px;
  font-size:14px;outline:none;background:var(--bg);
  transition:border-color .2s,box-shadow .2s;
}
.nav-search input:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.nav-search svg{
  position:absolute;left:14px;top:50%;transform:translateY(-50%);
  width:16px;height:16px;color:var(--text-muted);
}

/* ---- Breadcrumb ---- */
.breadcrumb{
  max-width:var(--max-width);margin:0 auto;padding:16px 24px 0;
  font-size:13px;color:var(--text-muted);
}
.breadcrumb a{color:var(--text-muted)}
.breadcrumb a:hover{color:var(--primary)}
.breadcrumb span{color:var(--text-secondary)}

/* ---- Hero ---- */
.hero{
  background:linear-gradient(135deg,#2563eb 0%,#7c3aed 50%,#db2777 100%);
  padding:64px 24px;text-align:center;color:#fff;
}
.hero h1{font-size:48px;font-weight:800;margin-bottom:12px;letter-spacing:-1px}
.hero p{font-size:18px;opacity:.9;max-width:600px;margin:0 auto 32px}
.hero .hero-search{
  max-width:560px;margin:0 auto;position:relative;
}
.hero .hero-search input{
  width:100%;height:52px;padding:0 24px 0 52px;
  border:none;border-radius:26px;font-size:16px;
  outline:none;box-shadow:0 8px 30px rgba(0,0,0,.15);
}
.hero .hero-search svg{
  position:absolute;left:20px;top:50%;transform:translateY(-50%);
  width:20px;height:20px;color:var(--text-muted);
}

/* ---- Container ---- */
.container{max-width:var(--max-width);margin:0 auto;padding:32px 24px}

.section-title{
  font-size:24px;font-weight:700;margin-bottom:24px;
  display:flex;align-items:center;gap:10px;
}

/* ---- Category Grid ---- */
.cat-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:16px;margin-bottom:40px;
}
.cat-card{
  background:var(--surface);border-radius:var(--radius);padding:24px;
  border:1px solid var(--border);transition:all .25s;
  display:flex;align-items:flex-start;gap:16px;
  cursor:pointer;text-decoration:none;color:var(--text);
}
.cat-card:hover{
  transform:translateY(-2px);box-shadow:var(--shadow-lg);
  border-color:var(--primary-light);
}
.cat-card-icon{
  width:48px;height:48px;border-radius:var(--radius-sm);
  display:flex;align-items:center;justify-content:center;
  font-size:22px;flex-shrink:0;
}
.cat-card-info h3{font-size:17px;font-weight:600;margin-bottom:4px}
.cat-card-info span{font-size:13px;color:var(--text-muted)}

/* ---- Tool Grid ---- */
.tool-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
  gap:12px;
}
.tool-link{
  display:block;padding:14px 18px;background:var(--surface);
  border:1px solid var(--border);border-radius:var(--radius-sm);
  font-size:14px;color:var(--text);text-decoration:none;
  transition:all .2s;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.tool-link:hover{
  border-color:var(--primary);color:var(--primary);
  box-shadow:0 0 0 2px rgba(37,99,235,.1);
}

/* ---- Tool Page ---- */
.tool-header{
  background:var(--surface);border-bottom:1px solid var(--border);
  padding:20px 24px;
}
.tool-header-inner{
  max-width:var(--max-width);margin:0 auto;
  display:flex;align-items:center;justify-content:space-between;
}
.tool-header h1{font-size:22px;font-weight:700}

.tool-body{
  max-width:var(--max-width);margin:0 auto;padding:32px 24px;
  display:grid;grid-template-columns:1fr 1fr;gap:24px;
}
.tool-body.full{grid-template-columns:1fr}
.tool-panel{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius);overflow:hidden;
}
.tool-panel-header{
  padding:14px 18px;font-size:14px;font-weight:600;
  border-bottom:1px solid var(--border);
  display:flex;align-items:center;justify-content:space-between;
  background:var(--bg);
}
.tool-panel-body{padding:18px}
.tool-panel textarea{
  width:100%;min-height:280px;padding:14px;
  border:1px solid var(--border);border-radius:var(--radius-sm);
  font-size:14px;font-family:'SF Mono',Monaco,'Cascadia Code',monospace;
  resize:vertical;outline:none;line-height:1.6;
  transition:border-color .2s;
}
.tool-panel textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.08)}
.tool-actions{
  display:flex;gap:10px;flex-wrap:wrap;margin-top:12px;
}
.btn{
  display:inline-flex;align-items:center;gap:6px;
  padding:10px 20px;border-radius:var(--radius-sm);
  font-size:14px;font-weight:500;cursor:pointer;
  border:none;outline:none;transition:all .2s;
  text-decoration:none;
}
.btn-primary{background:var(--primary);color:#fff}
.btn-primary:hover{background:var(--primary-dark)}
.btn-outline{background:transparent;border:1.5px solid var(--border);color:var(--text)}
.btn-outline:hover{background:var(--bg);border-color:var(--primary);color:var(--primary)}
.btn-sm{padding:6px 14px;font-size:13px}
.btn-danger{background:var(--danger);color:#fff}
.btn-success{background:var(--success);color:#fff}

/* Input styles */
.input-group{margin-bottom:12px}
.input-group label{display:block;font-size:13px;font-weight:500;margin-bottom:4px;color:var(--text-secondary)}
.input-group input,.input-group select{
  width:100%;height:40px;padding:0 12px;
  border:1.5px solid var(--border);border-radius:var(--radius-sm);
  font-size:14px;outline:none;transition:border-color .2s;
}
.input-group input:focus,.input-group select:focus{
  border-color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.08)
}

.result-box{
  background:var(--bg);border:1px solid var(--border);
  border-radius:var(--radius-sm);padding:16px;
  font-family:'SF Mono',Monaco,monospace;font-size:14px;
  min-height:60px;word-break:break-all;white-space:pre-wrap;
}

/* ---- Info Card ---- */
.info-card{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius);padding:24px;margin-bottom:16px;
}
.info-card h3{font-size:16px;font-weight:600;margin-bottom:8px}

/* ---- Stats ---- */
.stats-row{
  display:flex;gap:24px;flex-wrap:wrap;margin-bottom:32px;
}
.stat-item{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius);padding:20px 28px;text-align:center;flex:1;min-width:140px;
}
.stat-item .stat-num{font-size:32px;font-weight:800;color:var(--primary)}
.stat-item .stat-label{font-size:13px;color:var(--text-muted);margin-top:4px}

/* ---- Footer ---- */
.footer{
  border-top:1px solid var(--border);padding:32px 24px;
  text-align:center;color:var(--text-muted);font-size:13px;
  margin-top:48px;
}

/* ---- Search Results ---- */
.search-results{
  position:absolute;top:100%;left:0;right:0;
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius);box-shadow:var(--shadow-lg);
  max-height:360px;overflow-y:auto;z-index:200;display:none;
}
.search-results.active{display:block}
.search-results a{
  display:flex;align-items:center;gap:10px;padding:12px 16px;
  font-size:14px;color:var(--text);border-bottom:1px solid var(--border);
}
.search-results a:last-child{border-bottom:none}
.search-results a:hover{background:var(--primary-bg);color:var(--primary)}
.search-results .sr-cat{font-size:11px;color:var(--text-muted);margin-left:auto}

/* ---- Category Header ---- */
.cat-header{
  background:var(--surface);border-bottom:1px solid var(--border);padding:32px 24px;
}
.cat-header-inner{max-width:var(--max-width);margin:0 auto}
.cat-header h1{font-size:28px;font-weight:700;margin-bottom:6px}
.cat-header p{color:var(--text-secondary);font-size:15px}

/* ---- Responsive ---- */
@media(max-width:768px){
  .tool-body{grid-template-columns:1fr}
  .tool-body.full{grid-template-columns:1fr}
  .hero h1{font-size:32px}
  .hero p{font-size:15px}
  .nav-search{display:none}
  .cat-grid{grid-template-columns:1fr}
  .tool-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
  .stats-row{gap:12px}
  .stat-item{padding:14px 18px;min-width:100px}
  .stat-item .stat-num{font-size:24px}
}

/* ---- Tab styles ---- */
.tabs{display:flex;gap:0;border-bottom:2px solid var(--border);margin-bottom:16px}
.tab-btn{
  padding:10px 20px;font-size:14px;font-weight:500;cursor:pointer;
  border:none;background:none;color:var(--text-secondary);
  border-bottom:2px solid transparent;margin-bottom:-2px;
  transition:all .2s;
}
.tab-btn.active{color:var(--primary);border-bottom-color:var(--primary)}
.tab-btn:hover{color:var(--primary)}
.tab-pane{display:none}
.tab-pane.active{display:block}

/* ---- Toast ---- */
.toast{
  position:fixed;bottom:24px;left:50%;transform:translateX(-50%);
  background:#1e293b;color:#fff;padding:12px 24px;border-radius:24px;
  font-size:14px;z-index:999;opacity:0;transition:opacity .3s;
  pointer-events:none;
}
.toast.show{opacity:1}

/* ---- Table ---- */
table.data-table{
  width:100%;border-collapse:collapse;font-size:14px;
}
table.data-table th,table.data-table td{
  padding:10px 14px;text-align:left;border-bottom:1px solid var(--border);
}
table.data-table th{background:var(--bg);font-weight:600;color:var(--text-secondary)}

/* ---- Code Block ---- */
code,pre{font-family:'SF Mono',Monaco,'Cascadia Code',monospace}
pre{
  background:var(--bg);border:1px solid var(--border);
  border-radius:var(--radius-sm);padding:16px;overflow-x:auto;
  font-size:13px;line-height:1.6;
}

/* ---- Color preview ---- */
.color-preview{
  width:32px;height:32px;border-radius:50%;border:2px solid var(--border);
  display:inline-block;vertical-align:middle;
}

/* ---- Copy button ---- */
.copy-btn{
  background:none;border:1px solid var(--border);border-radius:4px;
  cursor:pointer;padding:4px 8px;font-size:12px;color:var(--text-muted);
  transition:all .2s;
}
.copy-btn:hover{color:var(--primary);border-color:var(--primary)}

/* ---- Tool-specific ---- */
.single-col{max-width:720px;margin:0 auto}

/* SEO-related meta */
.seo-section{margin:48px 0}
.seo-section h3{font-size:18px;margin-bottom:10px}
.seo-section ul{list-style:disc;margin-left:20px;color:var(--text-secondary)}
.seo-section ul li{margin-bottom:6px}
