:root{
  /* 现代白色科技风格配色 */
  --primary:#0066FF;
  --primary-foreground:#ffffff;
  --secondary:#F8F9FC;
  --secondary-foreground:#1a1d29;
  --accent:#E8EEFF;
  --accent-foreground:#0066FF;
  --border:#E5E7EB;
  --ring:#0066FF;
  --background:#FFFFFF;
  --foreground:#1a1d29;
  --muted:#6B7280;
  --muted-foreground:#9CA3AF;
  --input:#FFFFFF;
  --destructive:#EF4444;
  --destructive-foreground:#ffffff;
  --radius:12px;
  --shadow-sm:0 1px 3px 0 rgba(0, 0, 0, 0.05);
  --shadow:0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-lg:0 20px 40px -10px rgba(0, 0, 0, 0.1), 0 10px 20px -8px rgba(0, 0, 0, 0.06);
  --gradient-primary:linear-gradient(135deg, #0066FF 0%, #00B4FF 100%);
  --gradient-secondary:linear-gradient(135deg, #F8F9FC 0%, #E8EEFF 100%);
}

/* @media (prefers-color-scheme:dark){
  :root{
    --background:#0A0E1A;
    --foreground:#F1F5F9;
    --primary:#0066FF;
    --primary-foreground:#ffffff;
    --secondary:#1a1d29;
    --secondary-foreground:#F1F5F9;
    --accent:#1E293B;
    --accent-foreground:#60A5FA;
    --muted:#64748B;
    --muted-foreground:#94A3B8;
    --border:#1E293B;
    --input:#1a1d29;
    --ring:#3B82F6;
  }
} */

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  -webkit-tap-highlight-color:transparent;
}

body{
  font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.6;
  color:var(--foreground);
  background:linear-gradient(180deg, #FFFFFF 0%, #F8F9FC 100%);
  padding-top:60px;
  min-height:100vh;
}

.header,.nav{display:none}

.container{
  max-width:1280px;
  margin:0 auto;
  padding:0 32px;
}

/* 现代化Header */
.modern-header{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  z-index:50;
  background:rgba(255, 255, 255, 0.92);
  backdrop-filter:blur(16px) saturate(160%);
  border-bottom:1px solid var(--border);
  transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:0 1px 4px rgba(0, 0, 0, 0.04);
}

/* @media (prefers-color-scheme:dark){
  .modern-header{
    background:rgba(10, 14, 26, 0.85);
    border-bottom:1px solid rgba(30, 41, 59, 0.5);
  }
} */

.header-content{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:60px;
}

.logo-section{
  flex-shrink:0;
  display:flex;
}

.logo-link{
  display:flex;
  align-items:center;
  text-decoration:none;
  color:inherit;
  gap:12px;
  transition:transform 0.2s ease;
}

.logo-link:hover{
  transform:scale(1.02);
}

.logo-icon{
  width:26px;
  height:26px;
  color:var(--primary);
}

.logo-text{
  display:flex;
  align-items:center;
}

.logo-title{
  font-size:17px;
  font-weight:700;
  color:var(--foreground);
  letter-spacing:-0.02em;
  white-space:nowrap;
}

.logo-suffix{
  font-size:11px;
  font-weight:700;
  color:var(--primary);
  background:var(--accent);
  padding:4px 10px;
  border-radius:20px;
  margin-left:10px;
  letter-spacing:0.5px;
  text-transform:uppercase;
}

.main-nav{
  flex:1;
  display:flex;
  justify-content:center;
}

.nav-list{
  display:flex;
  list-style:none;
  gap:8px;
  align-items:center;
}

.nav-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:34px;
  padding:0 14px;
  font-size:14px;
  font-weight:500;
  color:var(--muted);
  text-decoration:none;
  border-radius:8px;
  transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position:relative;
}

.nav-link:hover{
  color:var(--primary);
  background:var(--accent);
}

.nav-link-active{
  color:var(--primary);
  font-weight:600;
  background:var(--accent);
}

.nav-link-active::after{
  display:none;
}

.header-controls{
  flex-shrink:0;
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:16px;
}

.language-dropdown{
  position:relative;
}

.language-toggle{
  display:flex;
  align-items:center;
  gap:6px;
  padding:7px 12px;
  background:var(--background);
  border:1px solid var(--border);
  border-radius:8px;
  cursor:pointer;
  font-size:13px;
  font-weight:500;
  color:var(--foreground);
  transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:var(--shadow-sm);
}

.language-toggle:hover{
  border-color:var(--primary);
  color:var(--primary);
}

.dropdown-icon{
  width:16px;
  height:16px;
  transition:transform 0.3s ease;
}

.language-dropdown.active .dropdown-icon{
  transform:rotate(180deg);
}

.language-dropdown-content{
  display:none;
  position:absolute;
  top:calc(100% + 12px);
  right:0;
  background:var(--background);
  border:1px solid var(--border);
  border-radius:12px;
  box-shadow:var(--shadow-lg);
  z-index:1000;
  min-width:320px;
  padding:12px;
  animation:slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity:0;
    transform:translateY(-10px);
  }
  to {
    opacity:1;
    transform:translateY(0);
  }
}

.language-dropdown.active .language-dropdown-content{
  display:block;
}

.language-grid-dropdown{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:6px;
}

.language-item{
  display:block;
  padding:12px 16px;
  text-align:center;
  border-radius:8px;
  cursor:pointer;
  text-decoration:none;
  color:var(--foreground);
  transition:all 0.2s ease;
  font-weight:500;
}

.language-item:hover{
  background:var(--accent);
  color:var(--primary);
}

.language-code{
  font-size:14px;
  font-weight:500;
}

.language-code.active{
  color:var(--primary-foreground);
  background:var(--gradient-primary);
  padding:4px 10px;
  border-radius:6px;
}

/* Hero Section - 科技感设计 */
.main{
  padding:60px 0;
  min-height:calc(100vh - 200px);
}

.hero-section{
  text-align:center;
  padding:56px 40px;
  background:var(--gradient-secondary);
  border-radius:20px;
  margin-bottom:40px;
  border:1px solid var(--border);
  position:relative;
  overflow:hidden;
}

.hero-section::before{
  content:'';
  position:absolute;
  top:-50%;
  left:-50%;
  width:200%;
  height:200%;
  background:radial-gradient(circle, rgba(0, 102, 255, 0.08) 0%, transparent 70%);
  animation:pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform:scale(1); opacity:0.5; }
  50% { transform:scale(1.1); opacity:0.8; }
}

.hero-title{
  font-size:44px;
  margin-bottom:16px;
  font-weight:800;
  letter-spacing:-0.03em;
  line-height:1.15;
  background:linear-gradient(135deg, #1a1d29 0%, #0066FF 100%);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
  position:relative;
  z-index:1;
}

.hero-description{
  font-size:17px;
  color:var(--muted);
  line-height:1.7;
  max-width:600px;
  margin:0 auto;
  position:relative;
  z-index:1;
}

.cta-button{
  display:inline-flex;
  align-items:center;
  padding:16px 36px;
  background:var(--gradient-primary);
  color:var(--primary-foreground);
  text-decoration:none;
  border-radius:12px;
  font-weight:600;
  font-size:17px;
  transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:0 4px 16px rgba(0, 102, 255, 0.3);
  position:relative;
  z-index:1;
}

.cta-button:hover{
  transform:translateY(-3px);
  box-shadow:0 8px 24px rgba(0, 102, 255, 0.4);
}

.section-title{
  text-align:center;
  font-size:22px;
  margin-bottom:24px;
  color:var(--muted);
  font-weight:600;
  letter-spacing:0;
}

/* 现代卡片设计 */
.features-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
  margin-bottom:60px;
}

.feature-card{
  display:flex;
  align-items:center;
  gap:16px;
  background:var(--background);
  border-radius:16px;
  padding:20px;
  border:1px solid var(--border);
  text-decoration:none;
  color:inherit;
  transition:all 0.2s cubic-bezier(0.4,0,0.2,1);
  box-shadow:var(--shadow-sm);
}

.feature-card:hover{
  border-color:var(--primary);
  box-shadow:var(--shadow);
  transform:translateY(-2px);
}

.card-icon{
  flex-shrink:0;
  width:52px;
  height:52px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.card-icon svg{
  width:26px;
  height:26px;
}

.card-icon--purple{ background:#EDE9FE; color:#7C3AED; }
.card-icon--orange{ background:#FEF3C7; color:#D97706; }
.card-icon--green{  background:#D1FAE5; color:#059669; }
.card-icon--blue{   background:#DBEAFE; color:#2563EB; }
.card-icon--teal{   background:#CCFBF1; color:#0D9488; }
.card-icon--pink{   background:#FCE7F3; color:#DB2777; }
.card-icon--red{    background:#FEE2E2; color:#DC2626; }
.card-icon--indigo{ background:#E0E7FF; color:#4F46E5; }
.card-icon--cyan{   background:#CFFAFE; color:#0891B2; }
.card-icon--yellow{ background:#FEF9C3; color:#CA8A04; }

.card-body{
  flex:1;
  min-width:0;
}

.card-title{
  font-size:15px;
  font-weight:600;
  color:var(--foreground);
  margin-bottom:4px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.card-description{
  font-size:13px;
  color:var(--muted);
  line-height:1.5;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.card-arrow{
  flex-shrink:0;
  width:18px;
  height:18px;
  color:var(--muted);
  transition:color 0.2s ease, transform 0.2s ease;
}

.feature-card:hover .card-arrow{
  color:var(--primary);
  transform:translateX(2px);
}

/* 页面头部 */
.page-header{
  text-align:center;
  margin-bottom:48px;
}

.page-header h1{
  font-size:42px;
  margin-bottom:16px;
  color:var(--foreground);
  font-weight:700;
  letter-spacing:-0.02em;
}

.page-header h2{
  font-size:36px;
  color:var(--foreground);
  margin-bottom:12px;
  font-weight:700;
  letter-spacing:-0.02em;
}

.page-header p,
.page-description{
  font-size:18px;
  color:var(--muted);
  max-width:800px;
  margin:0 auto;
  line-height:1.7;
}

/* 生成器容器 */
.generator-container{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:32px;
  margin-bottom:48px;
}

.editor-panel,
.output-panel{
  display:flex;
  flex-direction:column;
  gap:24px;
}

/* 面板样式 */
.editor-panel,
.output-panel,
.settings-section,
.actions-section,
.html-settings-section,
.latex-settings-section,
.markdown-settings-section,
.text-settings-section{
  background:var(--background);
  border-radius:16px;
  padding:28px;
  border:1px solid var(--border);
  box-shadow:var(--shadow-sm);
}

.sztitle,
.settings-section h3,
.html-settings-section h3,
.latex-settings-section h3,
.markdown-settings-section h3,
.text-settings-section h3{
  font-size:20px;
  margin-bottom:20px;
  color:var(--foreground);
  font-weight:600;
}

/* 输入标签页 */
.input-tabs{
  display:flex;
  margin-bottom:24px;
  border-bottom:2px solid var(--border);
  gap:8px;
}

.tab-button{
  padding:12px 24px;
  background:transparent;
  border:none;
  border-bottom:3px solid transparent;
  color:var(--muted);
  font-weight:600;
  font-size:15px;
  cursor:pointer;
  transition:all 0.2s ease;
  margin-bottom:-2px;
}

.tab-button:hover{
  color:var(--foreground);
  background:var(--accent);
  border-radius:8px 8px 0 0;
}

.tab-button.active{
  color:var(--primary);
  border-bottom-color:var(--primary);
  background:transparent;
}

.tab-content{
  display:none;
}

.tab-content.active{
  display:block;
}

/* 文件上传 */
.file-upload-container{
  margin-bottom:24px;
}

.file-input{
  display:none;
}

.file-label{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:40px;
  border:2px dashed var(--border);
  border-radius:12px;
  cursor:pointer;
  transition:all 0.3s ease;
  background:var(--secondary);
}

.file-label:hover{
  border-color:var(--primary);
  background:var(--accent);
  transform:translateY(-2px);
}

.upload-icon{
  width:56px;
  height:56px;
  margin-bottom:16px;
  color:var(--primary);
}

.upload-text{
  font-size:16px;
  color:var(--foreground);
  font-weight:600;
}

.file-info{
  margin-top:12px;
  font-size:14px;
  color:var(--primary);
  font-weight:500;
}

/* 手动输入 */
.manual-input-container{
  margin-bottom:24px;
}

.sample-data-buttons{
  margin-bottom:16px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.csv-input-container,
.json-input-container,
.excel-input-container{
  width:100%;
}

.csv-textarea,
.json-textarea,
.excel-textarea{
  width:100%;
  min-height:250px;
  padding:16px;
  border:1px solid var(--border);
  border-radius:12px;
  font-family:'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size:14px;
  resize:vertical;
  background:var(--secondary);
  color:var(--foreground);
  line-height:1.6;
  transition:all 0.2s ease;
}

.csv-textarea:focus,
.json-textarea:focus,
.excel-textarea:focus{
  outline:none;
  border-color:var(--primary);
  box-shadow:0 0 0 4px rgba(0, 102, 255, 0.1);
}

/* 表格输入 */
.table-input-container{
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
  background:var(--background);
}

.table-controls{
  display:flex;
  gap:10px;
  padding:16px;
  background:var(--secondary);
  border-bottom:1px solid var(--border);
}

.table-wrapper{
  max-height:450px;
  overflow:auto;
}

.input-table{
  width:100%;
  border-collapse:collapse;
}

.input-table th,
.input-table td{
  padding:12px;
  border:1px solid var(--border);
}

.input-table th{
  background:var(--secondary);
  font-weight:600;
  text-align:left;
  color:var(--foreground);
}

.header-input,
.cell-input{
  width:100%;
  border:none;
  background:transparent;
  padding:8px;
  font-family:inherit;
  font-size:14px;
  color:var(--foreground);
}

.header-input:focus,
.cell-input:focus{
  outline:2px solid var(--ring);
  outline-offset:-2px;
  border-radius:4px;
}

/* 设置部分 */
.settings-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  gap:20px;
}

.latex-style-options{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
}

.setting-group,
.setting-item{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.setting-group label,
.setting-item label{
  font-weight:600;
  color:var(--foreground);
  font-size:14px;
}

.setting-group select,
.setting-group input[type="text"],
.setting-group input[type="number"],
.latex-caption-group input[type="text"],
.form-control{
  padding:12px 16px;
  border:1px solid var(--border);
  border-radius:10px;
  font-size:14px;
  background:var(--input);
  color:var(--foreground);
  transition:all 0.2s ease;
  width:100%;
}

.setting-group select:focus,
.setting-group input:focus,
.form-control:focus{
  outline:none;
  border-color:var(--primary);
  box-shadow:0 0 0 4px rgba(0, 102, 255, 0.1);
}

.setting-group input[type="checkbox"]{
  width:18px;
  height:18px;
  accent-color:var(--primary);
  cursor:pointer;
}

/* 复选框样式 */
.checkbox-container{
  display:flex;
  align-items:center;
  height:38px;
}

.checkbox-container input[type="checkbox"]{
  display:none;
}

.checkbox-label{
  display:inline-block;
  width:52px;
  height:28px;
  background:var(--border);
  border-radius:14px;
  position:relative;
  cursor:pointer;
  transition:all 0.3s ease;
}

.checkbox-label::after{
  content:'';
  position:absolute;
  width:22px;
  height:22px;
  background:white;
  border-radius:50%;
  top:3px;
  left:3px;
  transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);
}

.checkbox-container input[type="checkbox"]:checked + .checkbox-label{
  background:var(--gradient-primary);
}

.checkbox-container input[type="checkbox"]:checked + .checkbox-label::after{
  transform:translateX(24px);
}

/* 按钮样式 */
.btn,
.btn-small{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:0 18px;
  height:38px;
  border:1px solid transparent;
  border-radius:8px;
  font-weight:500;
  font-size:14px;
  line-height:1;
  cursor:pointer;
  white-space:nowrap;
  transition:background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, opacity 0.15s;
  text-decoration:none;
  user-select:none;
  -webkit-user-select:none;
}

.btn:disabled,
.btn[disabled]{
  opacity:0.45;
  cursor:not-allowed;
  pointer-events:none;
}

.btn-small{
  height:32px;
  padding:0 12px;
  font-size:13px;
}

/* Primary — solid blue */
.btn-primary{
  background:#0066FF;
  color:#fff;
  border-color:#0066FF;
}

.btn-primary:hover{
  background:#0052cc;
  border-color:#0052cc;
  box-shadow:0 2px 8px rgba(0,102,255,0.28);
}

.btn-primary:active{
  background:#0047b3;
  border-color:#0047b3;
  box-shadow:none;
}

/* Secondary — ghost with border */
.btn-secondary{
  background:#fff;
  color:var(--foreground);
  border-color:var(--border);
}

.btn-secondary:hover{
  background:var(--secondary);
  border-color:#c0c4ce;
  color:var(--foreground);
}

.btn-secondary:active{
  background:#eef0f5;
}

/* Outline — transparent */
.btn-outline{
  background:transparent;
  color:var(--primary);
  border-color:var(--primary);
}

.btn-outline:hover{
  background:var(--accent);
}

.btn-outline:active{
  background:#dce8ff;
}

/* Danger — destructive action */
.btn-danger{
  background:#fff;
  color:var(--destructive);
  border-color:#fca5a5;
}

.btn-danger:hover{
  background:#FEF2F2;
  border-color:var(--destructive);
}

.btn-danger:active{
  background:#fee2e2;
}

.action-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

.output-actions{
  display:flex;
  gap:10px;
}

/* 表格编辑器 */
.table-editor{
  background:var(--background);
  border:1px solid var(--border);
  border-radius:12px;
  padding:20px;
  overflow:hidden;
}

#table-container{
  overflow-x:auto;
}

.editable-table{
  width:100%;
  border-collapse:collapse;
  font-size:14px;
}

.editable-table th,
.editable-table td{
  border:1px solid var(--border);
  padding:0;
}

.editable-table th{
  background:var(--secondary);
  padding:14px;
  font-weight:600;
  text-align:left;
  color:var(--foreground);
}

.editable-table input{
  width:100%;
  border:none;
  background:transparent;
  padding:14px;
  font-size:14px;
  color:var(--foreground);
  font-family:inherit;
}

.editable-table input:focus{
  outline:2px solid var(--ring);
  background:var(--accent);
}

/* 预览部分 */
.preview-section,
.latex-preview{
  background:var(--background);
  border:1px solid var(--border);
  border-radius:12px;
  padding:28px;
  margin-top:24px;
}

.preview-section h3,
.preview-section h4,
.latex-preview h4{
  margin-bottom:20px;
  font-size:18px;
  font-weight:600;
  color:var(--foreground);
  border-bottom:2px solid var(--border);
  padding-bottom:12px;
}

.preview-container{
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
  margin-bottom:20px;
}

.preview-table,
.preview-table-inner,
.table-preview{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  font-size:14px;
}

.preview-table th,
.preview-table td,
.preview-table-inner th,
.preview-table-inner td,
.table-preview th,
.table-preview td{
  padding:14px 18px;
  text-align:left;
  border-bottom:1px solid var(--border);
}

.preview-table th,
.preview-table-inner th,
.table-preview th{
  background:var(--secondary);
  font-weight:600;
  color:var(--foreground);
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:0.5px;
}

.preview-table tr:hover,
.preview-table-inner tr:hover,
.table-preview tr:hover{
  background:var(--accent);
}

.preview-actions{
  text-align:center;
  margin-top:20px;
}

/* 输出部分 */
.output-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding-bottom:20px;
  border-bottom:2px solid var(--border);
  margin-bottom:20px;
}

.output-header h3{
  font-size:20px;
  color:var(--foreground);
  font-weight:600;
  margin:0;
}

.output-container{
  background:var(--background);
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
}

.output-text,
.output-textarea{
  margin:0;
  padding:24px;
  background:#1a1d29;
  color:#e2e8f0;
  font-family:'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size:13px;
  line-height:1.7;
  overflow-x:auto;
  white-space:pre;
  min-height:250px;
  border:none;
  width:100%;
  display:block;
  resize:vertical;
}

.code-output{
  padding:24px;
  background:#1a1d29;
  font-family:'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size:13px;
  line-height:1.7;
  overflow:auto;
  max-height:500px;
  margin:0;
  white-space:pre-wrap;
  color:#e2e8f0;
}

.output-textarea:focus{
  outline:none;
  box-shadow:0 0 0 4px rgba(0, 102, 255, 0.2);
}

/* LaTeX 输出 */
.latex-output{
  color:#e5e5e5;
  font-family:'SF Mono', Monaco, monospace;
  font-size:13px;
  line-height:1.7;
  padding:24px;
  background:#1a1d29;
  border-radius:12px;
  overflow-x:auto;
  white-space:pre;
  min-height:300px;
}

.latex-output .latex-keyword{
  color:#61afef;
  font-weight:700;
}

.latex-output .latex-command{
  color:#e06c75;
}

.latex-output .latex-argument{
  color:#98c379;
}

/* HTML 和 Markdown 预览 */
.html-preview table,
.markdown-preview table{
  width:100%;
  border-collapse:collapse;
  margin-top:16px;
  font-size:14px;
}

.html-preview th,
.html-preview td,
.markdown-preview th,
.markdown-preview td{
  border:1px solid var(--border);
  padding:12px;
  text-align:left;
}

.html-preview th,
.markdown-preview th{
  background:var(--secondary);
  font-weight:600;
  color:var(--foreground);
}

.latex-preview-box{
  background:#FFFFFF;
  color:#000000;
  border:1px solid var(--border);
  padding:32px;
  font-family:'Times New Roman', Georgia, serif;
  line-height:1.6;
  border-radius:8px;
}

.latex-preview-box .latex-table{
  margin:20px auto;
  border-collapse:collapse;
  border-top:2px solid #000;
  border-bottom:2px solid #000;
}

.latex-preview-box .latex-table th,
.latex-preview-box .latex-table td{
  padding:10px 20px;
  text-align:center;
  border:none;
}

.latex-preview-box .latex-table th{
  border-bottom:1px solid #000;
  font-weight:700;
}

/* 移动端菜单 */
.mobile-menu-toggle{
  display:none;
  background:transparent;
  border:none;
  cursor:pointer;
  padding:10px;
  color:var(--foreground);
}

.mobile-menu-toggle svg{
  width:28px;
  height:28px;
}

/* 转换器页面样式 */
.converter-page{
  padding:32px 0;
}

.converter-container{
  max-width:1200px;
  margin:0 auto;
  background:var(--background);
  border-radius:20px;
  box-shadow:var(--shadow);
  overflow:hidden;
  border:1px solid var(--border);
}

.input-section,
.action-section,
.output-section{
  padding:32px;
  border-bottom:1px solid var(--border);
}

.output-content{
  background:#1a1d29;
  border-radius:12px;
  border:1px solid var(--border);
  overflow:hidden;
}

/* 特性详情 */
.features-details-section{
  margin-top:100px;
}

.features-details-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
  gap:28px;
}

.detailed-features{
  margin-top:20px;
}

.feature-details{
  display:grid;
  gap:28px;
}

.detail-item{
  background:var(--background);
  padding:28px;
  border-radius:16px;
  border:1px solid var(--border);
  transition:all 0.3s ease;
}

.detail-item:hover{
  transform:translateY(-4px);
  box-shadow:var(--shadow);
  border-color:var(--primary);
}

.detail-item h3{
  color:var(--foreground);
  margin-bottom:20px;
  font-size:20px;
  font-weight:700;
}

.detail-item ul{
  padding-left:24px;
  color:var(--muted);
  line-height:1.8;
}

.detail-item li{
  margin-bottom:10px;
}

/* Footer */
.footer{
  background:var(--secondary);
  border-top:1px solid var(--border);
  padding:60px 0;
  text-align:center;
  color:var(--muted);
  font-size:15px;
  margin-top:20px;
}

.main-content{
  padding:32px 0;
}

/* 响应式设计 */
@media (max-width:768px){
  .container{
    padding:0 20px;
  }
  
  body{
    padding-top:52px;
  }
  
  .header-content{
    height:52px;
  }
  
  .mobile-menu-toggle{
    display:block;
  }
  
  .main-nav{
    position:fixed;
    top:52px;
    left:0;
    right:0;
    background:var(--background);
    border-bottom:1px solid var(--border);
    box-shadow:var(--shadow-lg);
    padding:20px;
    transform:translateY(-150%);
    opacity:0;
    visibility:hidden;
    transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index:999;
    height:auto;
    display:block;
  }
  
  .main-nav.active{
    transform:translateY(0);
    opacity:1;
    visibility:visible;
  }
  
  .nav-list{
    flex-direction:column;
    gap:10px;
    align-items:stretch;
  }
  
  .nav-link{
    width:100%;
    justify-content:flex-start;
    background:var(--secondary);
    height:48px;
    padding:0 20px;
  }
  
  .header-controls{
    display:none;
  }
  
  .hero-title{
    font-size:30px;
  }
  
  .hero-description{
    font-size:15px;
  }
  
  .hero-section{
    padding:40px 20px;
  }
  
  .section-title{
    font-size:18px;
  }
  
  .generator-container{
    grid-template-columns:1fr;
    gap:24px;
  }
  
  .settings-grid,
  .latex-style-options{
    grid-template-columns:1fr;
  }
  
  .output-header{
    flex-direction:column;
    align-items:flex-start;
    gap:16px;
  }
  
  .output-actions{
    width:100%;
    justify-content:flex-start;
  }
  
  .features-grid,
  .features-details-grid{
    grid-template-columns:1fr;
    gap:12px;
  }
  
  .converter-page{
    padding:20px 0;
  }
  
  .page-header h1{
    font-size:32px;
  }
  
  .input-section,
  .settings-section,
  .action-section,
  .preview-section,
  .output-section{
    padding:20px;
  }
  
  .action-buttons{
    flex-direction:column;
  }
  
  .btn{
    width:100%;
  }
}

/* Home Sections (shared) */
.home-section{
  margin:64px 0;
}

.home-section-header{
  text-align:center;
  margin-bottom:36px;
}

.home-section-header h2{
  font-size:24px;
  font-weight:700;
  color:var(--foreground);
  letter-spacing:-0.02em;
  margin:10px 0 10px;
}

.home-section-header p{
  font-size:15px;
  color:var(--muted);
  max-width:560px;
  margin:0 auto;
  line-height:1.7;
}

/* Core Features Grid */
.core-features-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:16px;
}

.core-feature-item{
  background:var(--background);
  border:1px solid var(--border);
  border-radius:16px;
  padding:24px;
  transition:box-shadow 0.15s, border-color 0.15s;
}

.core-feature-item:hover{
  border-color:#c7d7ff;
  box-shadow:0 4px 16px rgba(0,102,255,0.07);
}

.core-feature-icon{
  width:40px;
  height:40px;
  background:var(--accent);
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:14px;
  color:var(--primary);
}

.core-feature-icon svg{
  width:20px;
  height:20px;
}

.core-feature-item h3{
  font-size:15px;
  font-weight:600;
  color:var(--foreground);
  margin-bottom:8px;
}

.core-feature-item p{
  font-size:13px;
  color:var(--muted);
  line-height:1.65;
}

/* About Grid */
.about-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:32px;
  align-items:start;
}

.about-text p{
  font-size:14px;
  color:var(--muted);
  line-height:1.75;
  margin-bottom:16px;
}

.about-stats{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:12px;
  margin-top:28px;
  padding-top:24px;
  border-top:1px solid var(--border);
}

.about-stat{
  text-align:center;
}

.about-stat-num{
  display:block;
  font-size:24px;
  font-weight:800;
  color:var(--primary);
  letter-spacing:-0.02em;
}

.about-stat-label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-top:4px;
}

.about-usecases{
  background:var(--secondary);
  border:1px solid var(--border);
  border-radius:16px;
  padding:24px 28px;
}

.about-usecases h3{
  font-size:15px;
  font-weight:600;
  color:var(--foreground);
  margin-bottom:18px;
}

.about-usecase-list{
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:18px;
}

.about-usecase-list li{
  display:flex;
  align-items:flex-start;
  gap:14px;
}

.about-usecase-icon{
  flex-shrink:0;
  width:34px;
  height:34px;
  background:var(--background);
  border:1px solid var(--border);
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--primary);
}

.about-usecase-icon svg{
  width:16px;
  height:16px;
}

.about-usecase-list strong{
  display:block;
  font-size:13px;
  font-weight:600;
  color:var(--foreground);
  margin-bottom:3px;
}

.about-usecase-list span{
  font-size:13px;
  color:var(--muted);
  line-height:1.55;
}

@media(max-width:768px){
  .core-features-grid{
    grid-template-columns:1fr;
  }
  .about-grid{
    grid-template-columns:1fr;
  }
  .about-stats{
    grid-template-columns:repeat(2, 1fr);
  }
}

/* Intro Section */
.intro-section{
  margin:56px 0 48px;
  background:var(--background);
  border:1px solid var(--border);
  border-radius:16px;
  padding:28px 32px 8px;
  box-shadow:var(--shadow-sm);
}

.intro-section-title{
  font-size:20px;
  font-weight:700;
  color:var(--foreground);
  letter-spacing:-0.02em;
  margin-bottom:8px;
}

.intro-section-desc{
  font-size:14px;
  color:var(--muted);
  line-height:1.7;
  max-width:820px;
  margin-bottom:24px;
}

.intro-tools-grid{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:8px;
  margin-bottom:20px;
}

.intro-tool-item{
  padding:16px 18px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--background);
  transition:background 0.15s, border-color 0.15s;
}

.intro-tool-item:hover{
  background:var(--secondary);
  border-color:#c7d7ff;
}

.intro-tool-item h3{
  font-size:14px;
  font-weight:600;
  color:var(--foreground);
  margin-bottom:5px;
}

.intro-tool-item p{
  font-size:13px;
  color:var(--muted);
  line-height:1.6;
}

@media(max-width:768px){
  .intro-section{
    padding:20px 20px 4px;
  }
  .intro-tools-grid{
    grid-template-columns:1fr;
  }
}

/* Links 区域 */
.links-section{
  margin-top:48px;
  margin-bottom:48px;
}

.links-container{
  background:var(--secondary);
  border:1px solid var(--border);
  border-radius:16px;
  padding:28px 32px;
  text-align:center;
}

.links-title{
  font-size:18px;
  font-weight:600;
  color:var(--muted);
  margin-bottom:16px;
  text-transform:uppercase;
  letter-spacing:0.08em;
}

.links-list{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:8px 16px;
  font-size:15px;
}

.links-sep{
  color:var(--border);
  user-select:none;
}

.links-list a{
  color:var(--primary);
  text-decoration:none;
  font-weight:500;
  transition:color 0.2s ease;
}

.links-list a:hover{
  color:var(--accent-foreground);
  text-decoration:underline;
}

/* Footer Nav */
.footer-nav{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px 24px;
  margin-bottom:20px;
}

.footer-nav a{
  color:var(--muted);
  text-decoration:none;
  font-size:14px;
  transition:color 0.2s ease;
}

.footer-nav a:hover{
  color:var(--primary);
}

/* Static Pages */
.static-page{
  max-width:800px;
  margin:0 auto;
  padding:48px 0 80px;
}

.static-page h1{
  font-size:40px;
  font-weight:700;
  color:var(--foreground);
  letter-spacing:-0.02em;
  margin-bottom:16px;
}

.static-lead{
  font-size:18px;
  color:var(--muted);
  line-height:1.7;
  margin-bottom:48px;
  border-bottom:1px solid var(--border);
  padding-bottom:32px;
}

.static-section{
  margin-bottom:36px;
}

.static-section h2{
  font-size:20px;
  font-weight:600;
  color:var(--foreground);
  margin-bottom:12px;
}

.static-section p{
  color:var(--muted);
  line-height:1.8;
  margin-bottom:10px;
}

.static-section a{
  color:var(--primary);
  text-decoration:none;
}

.static-section a:hover{
  text-decoration:underline;
}

.static-section ul{
  padding-left:20px;
  color:var(--muted);
  line-height:1.9;
}

/* =====================
   Markdown Page
   ===================== */
.md-page{
  padding:32px 0 80px;
}

/* Header */
.md-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  margin-bottom:32px;
}

.md-badge{
  display:inline-block;
  font-size:11px;
  font-weight:700;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:var(--primary);
  background:var(--accent);
  padding:4px 10px;
  border-radius:20px;
  margin-bottom:10px;
}

.md-header h1{
  font-size:28px;
  font-weight:700;
  color:var(--foreground);
  letter-spacing:-0.02em;
  margin-bottom:6px;
}

.md-header p{
  font-size:14px;
  color:var(--muted);
  line-height:1.6;
  max-width:520px;
}

.md-header-actions{
  display:flex;
  gap:10px;
  flex-shrink:0;
  align-items:center;
  padding-top:4px;
}

.md-header-actions .btn{
  display:inline-flex;
  align-items:center;
  gap:7px;
}

/* Layout */
.md-layout{
  display:grid;
  grid-template-columns:220px 1fr;
  gap:20px;
  align-items:start;
}

.md-main{
  display:flex;
  flex-direction:column;
  gap:16px;
}

/* Sidebar */
.md-sidebar{
  display:flex;
  flex-direction:column;
  gap:12px;
}

/* Card */
.md-card{
  background:var(--background);
  border:1px solid var(--border);
  border-radius:16px;
  padding:16px;
  box-shadow:var(--shadow-sm);
}

.md-card--flush{
  padding:0;
  overflow:hidden;
}

.md-card-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 18px;
  border-bottom:1px solid var(--border);
}

.md-card-title{
  display:flex;
  align-items:center;
  gap:7px;
  font-size:13px;
  font-weight:600;
  color:var(--foreground);
  margin-bottom:14px;
}

.md-card-title svg{
  color:var(--primary);
}

.md-card-title:last-child{
  margin-bottom:0;
}

/* Fields */
.md-field{
  margin-bottom:12px;
}

.md-field label{
  display:block;
  font-size:12px;
  font-weight:600;
  color:var(--muted);
  margin-bottom:6px;
  text-transform:uppercase;
  letter-spacing:0.05em;
}

.md-field input,
.md-field select{
  width:100%;
  padding:8px 12px;
  border:1px solid var(--border);
  border-radius:10px;
  font-size:13px;
  background:var(--secondary);
  color:var(--foreground);
  transition:border-color 0.2s;
}

.md-field input:focus,
.md-field select:focus{
  outline:none;
  border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(0,102,255,0.08);
}

/* Toggle */
.md-toggle-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:13px;
  color:var(--foreground);
  padding:4px 0;
}

.md-toggle{
  position:relative;
  display:inline-block;
  width:36px;
  height:20px;
}

.md-toggle input{
  display:none;
}

.md-toggle-track{
  position:absolute;
  inset:0;
  background:var(--border);
  border-radius:10px;
  cursor:pointer;
  transition:background 0.2s;
}

.md-toggle-track::after{
  content:'';
  position:absolute;
  width:14px;
  height:14px;
  background:#fff;
  border-radius:50%;
  top:3px;
  left:3px;
  transition:transform 0.2s;
  box-shadow:0 1px 3px rgba(0,0,0,0.2);
}

.md-toggle input:checked + .md-toggle-track{
  background:var(--primary);
}

.md-toggle input:checked + .md-toggle-track::after{
  transform:translateX(16px);
}

/* Button groups */
.md-btn-group{
  display:flex;
  flex-direction:column;
  gap:7px;
}

.md-btn-group--2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
}

.md-btn-group--2 .btn{
  min-width:0;
  width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.btn-sm-full{
  width:100%;
  height:36px;
  padding:0 12px;
  font-size:13px;
  border-radius:8px;
}

.btn-sm{
  height:30px;
  padding:0 10px;
  font-size:12px;
  border-radius:6px;
}

/* Table editor */
.md-table-wrap{
  overflow-x:auto;
  padding:16px;
}

.md-table-wrap .editable-table{
  min-width:100%;
}

/* Tabs */
.md-tabs{
  display:flex;
  gap:4px;
}

.md-tab{
  padding:6px 16px;
  font-size:13px;
  font-weight:500;
  border:none;
  background:transparent;
  color:var(--muted);
  border-radius:10px;
  cursor:pointer;
  transition:all 0.15s;
}

.md-tab:hover{
  color:var(--foreground);
  background:var(--secondary);
}

.md-tab.active{
  color:var(--primary);
  background:var(--accent);
  font-weight:600;
}

/* Output */
.md-output{
  display:block;
  margin:0;
  padding:20px;
  background:#f8fafc;
  color:#334155;
  font-family:'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;
  font-size:13px;
  line-height:1.7;
  white-space:pre-wrap;
  overflow-x:auto;
  min-height:160px;
  border:none;
  width:100%;
  box-sizing:border-box;
}

/* Preview */
.md-preview{
  padding:20px;
  min-height:160px;
}

.md-preview table{
  width:100%;
  border-collapse:collapse;
  font-size:14px;
}

.md-preview th,
.md-preview td{
  border:1px solid var(--border);
  padding:10px 14px;
  text-align:left;
}

.md-preview th{
  background:var(--secondary);
  font-weight:600;
  color:var(--foreground);
  font-size:13px;
}

.md-preview tr:hover td{
  background:var(--accent);
}

/* Features */
.md-features{
  margin-top:56px;
}

.md-features-intro{
  margin-bottom:28px;
}

.md-features-intro h2{
  font-size:22px;
  font-weight:700;
  color:var(--foreground);
  letter-spacing:-0.02em;
  margin-bottom:8px;
}

.md-features-intro p{
  font-size:14px;
  color:var(--muted);
  line-height:1.7;
  max-width:600px;
}

.md-features-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:16px;
}

.md-feature-item{
  display:flex;
  gap:14px;
  align-items:flex-start;
  padding:12px 0;
  border-bottom:1px solid var(--border);
}

.md-feature-item:last-child{
  border-bottom:none;
}

.md-feature-item:hover{}

.md-feature-icon{
  flex-shrink:0;
  width:38px;
  height:38px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.md-feature-icon--purple{ background:#EDE9FE; color:#7C3AED; }
.md-feature-icon--blue{   background:#DBEAFE; color:#2563EB; }
.md-feature-icon--green{  background:#D1FAE5; color:#059669; }
.md-feature-icon--orange{ background:#FEF3C7; color:#D97706; }

.md-feature-item h3{
  font-size:13px;
  font-weight:600;
  color:var(--foreground);
  margin-bottom:4px;
}

.md-feature-item p{
  font-size:12px;
  color:var(--muted);
  line-height:1.6;
}

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

/* Responsive */
@media (max-width:768px){
  .md-layout{
    grid-template-columns:1fr;
  }

  .md-header{
    flex-direction:column;
  }

  .md-header-actions{
    width:100%;
  }

  .md-header-actions .btn{
    flex:1;
    justify-content:center;
  }

  .md-btn-group--2{
    grid-template-columns:1fr 1fr;
  }
}

.md-feature-icon svg{
  width:18px;
  height:18px;
}

/* =====================
   Converter Pages (upload-based)
   ===================== */
.cv-upload-area{
  padding:32px 20px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
}

.cv-upload-label{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  padding:32px 48px;
  border:2px dashed var(--border);
  border-radius:14px;
  cursor:pointer;
  background:var(--secondary);
  color:var(--muted);
  transition:all 0.2s ease;
  text-align:center;
  width:100%;
}

.cv-upload-label:hover{
  border-color:var(--primary);
  background:var(--accent);
  color:var(--primary);
}

.cv-upload-label svg{ color:var(--primary); }

.cv-upload-label span{
  font-size:15px;
  font-weight:600;
  color:var(--foreground);
}

.cv-upload-label small{
  font-size:12px;
  color:var(--muted);
}

.cv-file-info{
  font-size:13px;
  color:var(--primary);
  font-weight:500;
}

.cv-manual-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:12px 16px;
  border-bottom:1px solid var(--border);
  background:var(--secondary);
}

.cv-preview-wrap{
  overflow-x:auto;
  max-height:300px;
  overflow-y:auto;
}

.cv-preview-wrap table,
.preview-table-inner{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}

.cv-preview-wrap th,
.cv-preview-wrap td,
.preview-table-inner th,
.preview-table-inner td{
  padding:8px 12px;
  border:1px solid var(--border);
  text-align:left;
}

.cv-preview-wrap th,
.preview-table-inner th{
  background:var(--secondary);
  font-weight:600;
  color:var(--foreground);
}

.cv-textarea{
  width:100%;
  min-height:220px;
  padding:16px;
  border:none;
  font-family:'SF Mono', Monaco, Consolas, monospace;
  font-size:13px;
  resize:vertical;
  background:var(--secondary);
  color:var(--foreground);
  line-height:1.6;
}

.cv-textarea:focus{
  outline:none;
  box-shadow:inset 0 0 0 2px var(--primary);
}

.cv-output-actions{
  display:flex;
  gap:8px;
  padding:12px 16px;
  border-top:1px solid var(--border);
  background:var(--secondary);
  justify-content:flex-end;
}
