/* primer.css — 引物设计 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --ink: #1a1a2e; --ink-light: #4a5568;
  --blue: #2F6BFF; --blue-light: #4FB6FF; --blue-bg: #EAF1FF;
  --green: #16a34a; --green-bg: #f0fdf4;
  --red: #e11d48; --red-bg: #fef2f2; --amber: #d97706; --amber-bg: #fffbeb;
  --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb;
  --gray-300: #d1d5db; --gray-500: #6b7280; --gray-700: #374151; --gray-900: #111827;
  --white: #fff; --surface: #f8fafc;
  --radius: 10px; --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,.06),0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.06);
}
html { font-size: 16px; }
body { font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans SC",sans-serif; background: var(--surface); color: var(--ink); line-height: 1.6; min-height: 100vh; }
.header { background: linear-gradient(135deg,var(--ink) 0%,#1e293b 100%); color: var(--white); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--white); }
.logo-icon-svg { flex-shrink: 0; }
.logo-text { font-size: 1.1rem; }
.logo-text strong { font-weight: 700; }
.header-nav { display: flex; gap: 8px; }
.nav-badge { background: rgba(255,255,255,.12); color: var(--white); padding: 4px 12px; border-radius: 20px; font-size: .82rem; text-decoration: none; transition: background .15s; }
.nav-badge:hover { background: rgba(255,255,255,.2); }
.main { max-width: 1200px; margin: 0 auto; padding: 32px 24px 48px; }
.hero-section { text-align: center; margin-bottom: 28px; }
.hero-section h1 { font-size: 1.6rem; font-weight: 700; }
.hero-desc { margin-top: 6px; color: var(--gray-500); font-size: .92rem; }
.method-card { margin-bottom: 24px; }
.method-tabs { display: flex; gap: 10px; }
.method-tab { flex: 1; padding: 16px 20px; border: 2px solid var(--gray-200); border-radius: var(--radius); background: var(--white); cursor: pointer; text-align: left; transition: border-color .15s,box-shadow .15s; }
.method-tab:hover { border-color: var(--blue); }
.method-tab.active { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,107,255,.12); }
.method-icon { font-size: 1.3rem; display: block; margin-bottom: 4px; }
.method-label { font-size: .92rem; font-weight: 700; }
.method-hint { font-size: .78rem; color: var(--gray-500); display: block; margin-top: 2px; }
.main-grid { display: grid; grid-template-columns: 400px 1fr; gap: 24px; align-items: start; }
.col-upload { display: flex; flex-direction: column; gap: 16px; }
.col-results { display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-header { padding: 14px 18px; border-bottom: 1px solid var(--gray-100); }
.card-header h2 { font-size: .9rem; font-weight: 700; color: var(--gray-700); }
.card-body { padding: 16px 18px; }

.search-wrap { position: relative; }
.search-input { width: 100%; padding: 11px 14px; font-size: .92rem; border: 1.5px solid var(--gray-300); border-radius: var(--radius-sm); outline: none; transition: border-color .15s; }
.search-input:focus { border-color: var(--blue); }
.suggest-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border: 1px solid var(--gray-200); border-top: none; border-radius: 0 0 var(--radius-sm) var(--radius-sm); max-height: 240px; overflow-y: auto; z-index: 50; box-shadow: var(--shadow-md); }
.suggest-item { padding: 10px 14px; cursor: pointer; font-size: .85rem; border-bottom: 1px solid var(--gray-100); display: flex; justify-content: space-between; }
.suggest-item:hover { background: var(--blue-bg); }
.suggest-item .gid { color: var(--gray-500); font-size: .78rem; }
.gene-preview { margin-top: 12px; padding: 10px 12px; background: var(--gray-50); border-radius: var(--radius-sm); font-size: .82rem; display: flex; gap: 12px; flex-wrap: wrap; }
.gene-preview span { white-space: nowrap; }
.gene-preview b { color: var(--ink); }

.batch-textarea { width: 100%; padding: 10px 14px; font-size: .85rem; font-family: "SF Mono","Cascadia Code",Consolas,monospace; border: 1.5px solid var(--gray-300); border-radius: var(--radius-sm); outline: none; resize: vertical; line-height: 1.6; }
.batch-textarea:focus { border-color: var(--blue); }
.batch-hint { font-size: .78rem; color: var(--gray-500); margin-top: 8px; }

.params-card { border: 1px solid var(--gray-200); }
.params-summary { cursor: pointer; list-style: none; display: flex; align-items: center; }
.params-summary::-webkit-details-marker { display: none; }
.params-summary::before { content: "▸ "; color: var(--gray-400); font-size: .8rem; margin-right: 4px; }
.params-card[open] .params-summary::before { content: "▾ "; }

.form-row { margin-bottom: 12px; }
.form-row:last-child { margin-bottom: 0; }
.form-label { display: block; font-size: .82rem; font-weight: 600; color: var(--gray-700); margin-bottom: 4px; }
.form-input { width: 100%; padding: 8px 10px; font-size: .85rem; border: 1.5px solid var(--gray-300); border-radius: var(--radius-sm); outline: none; }
.form-input:focus { border-color: var(--blue); }
.form-input-sm { max-width: 80px; }
.form-row-inline { display: flex; gap: 10px; align-items: flex-end; }
.form-row-inline > div { flex: 1; }
.form-dash { color: var(--gray-500); padding-bottom: 8px; font-size: .85rem; }

.btn-run { width: 100%; padding: 14px; font-size: 1rem; font-weight: 700; background: linear-gradient(135deg,var(--blue),#1a5af0); color: var(--white); border: none; border-radius: var(--radius); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: opacity .15s; }
.btn-run:hover { opacity: .92; }
.btn-run:disabled { opacity: .5; cursor: not-allowed; }
.btn-spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.3); border-top-color: var(--white); border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-download { padding: 6px 14px; font-size: .82rem; font-weight: 600; background: var(--green); color: var(--white); border: none; border-radius: var(--radius-sm); cursor: pointer; }
.btn-download:hover { opacity: .9; }

.status-msg { padding: 10px 14px; border-radius: var(--radius-sm); font-size: .85rem; text-align: center; }
.status-msg.loading { background: var(--blue-bg); color: var(--blue); }
.status-msg.error { background: var(--red-bg); color: var(--red); }
.status-msg.success { background: var(--green-bg); color: var(--green); }

.summary-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(100px,1fr)); gap: 10px; margin-bottom: 16px; }
.summary-item { background: var(--gray-50); border-radius: var(--radius-sm); padding: 8px 10px; text-align: center; }
.summary-item .val { font-size: 1.1rem; font-weight: 700; }
.summary-item .lbl { font-size: .7rem; color: var(--gray-500); }

.table-wrap { max-height: 500px; overflow-y: auto; }
.hap-table { width: 100%; font-size: .82rem; border-collapse: collapse; }
.hap-table th { text-align: left; padding: 8px 10px; background: var(--gray-50); color: var(--gray-700); font-weight: 600; font-size: .78rem; position: sticky; top: 0; border-bottom: 1px solid var(--gray-200); }
.hap-table td { padding: 8px 10px; border-bottom: 1px solid var(--gray-100); }
.hap-table tr:hover td { background: var(--gray-50); }
.hap-table .mono { font-family: "SF Mono","Cascadia Code",Consolas,monospace; font-size: .75rem; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hap-table .score-cell { font-weight: 700; }
.hap-table .score-good { color: var(--green); }
.hap-table .score-ok { color: var(--amber); }
.hap-table .score-low { color: var(--red); }
.empty-row td { text-align: center; color: var(--gray-500); padding: 24px; }
.gene-group { background: var(--gray-50); font-weight: 600; }
.gene-group td { padding: 6px 10px; font-size: .8rem; color: var(--ink); }

.empty-state { text-align: center; padding: 40px 20px; }
.empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-title { font-size: 1rem; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.empty-desc { font-size: .85rem; color: var(--gray-500); line-height: 1.7; }

@media (max-width: 860px) { .main-grid { grid-template-columns: 1fr; } }
@media (max-width: 540px) { .header-inner { padding: 0 12px; } .main { padding: 20px 12px 36px; } .method-tabs { flex-direction: column; } }
