/* SERtool serfilter page-specific styles */

.container { width: 100%; max-width: 960px; margin: 40px auto; padding: 0 20px; flex: 1; }

.page-header {
  text-align: center;
  margin-bottom: 32px;
  padding: 28px 24px;
  background: linear-gradient(135deg, #14304f 0%, #1c4a76 50%, #266a9c 100%);
  border-radius: 12px;
  color: white;
  box-shadow: 0 6px 20px rgba(20, 48, 79, 0.18);
}
.page-title { font-size: 26px; color: #ffffff; margin-bottom: 10px; font-weight: 700; text-shadow: 0 1px 10px rgba(0, 20, 45, 0.5); }
.intro-text {
  text-align: left;
  max-width: 960px;
  margin: 0 auto;
  line-height: 1.7;
  font-size: 14px;
  color: #dbeafe;
  text-shadow: 0 1px 6px rgba(0, 20, 45, 0.4);
}

.sertool-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
  background: #ffffff;
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
}
.sertool-tab-btn {
  flex: 1;
  max-width: 260px;
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  color: #718096;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 15px;
}
.sertool-tab-btn:hover { color: #2c5282; background: #f1f5f9; }
.sertool-tab-btn.active {
  color: white;
  background-color: #1a365d;
  box-shadow: 0 2px 8px rgba(26, 54, 93, 0.3);
}
.sertool-tab-content { display: none; animation: fadeIn 0.3s ease; }
.sertool-tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.form-section, .search-section {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
}

label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: #2c3e50; font-size: 15px; }
textarea {
  width: 100%;
  height: 200px;
  padding: 12px 14px;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  font-family: monospace;
  font-size: 14px;
  resize: vertical;
  margin-bottom: 1rem;
  background: #fdfdfd;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea:focus, input[type="text"]:focus, input[type="number"]:focus, input[type="email"]:focus, select:focus {
  outline: none;
  border-color: #3182ce;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
}
input[type="text"], input[type="number"], input[type="email"], select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  font-size: 15px;
  background: #fff;
  color: #2d3748;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-error { border-color: #e53e3e !important; box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.15) !important; }
.hint-error {
  font-size: 13px;
  color: #c05621;
  margin-top: 6px;
  line-height: 1.4;
  font-weight: 500;
  background: #fffaf0;
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid #ed8936;
}
.hint-error strong { color: #9c4221; }

.file-upload input[type="file"] { display: none; }
.file-upload label {
  display: inline-flex;
  align-items: center;
  background: #edf2f7;
  padding: 11px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  color: #2d3748;
  border: 1px dashed #cbd5e0;
  transition: all 0.2s;
  font-weight: 500;
  margin-bottom: 0;
}
.file-upload label:hover { background: #e2e8f0; border-color: #a0aec0; color: #1a365d; }

/* 按钮 */
button.action-btn {
  background: #1a365d;
  color: white;
  border: none;
  padding: 13px 24px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(26, 54, 93, 0.25);
}
button.action-btn:hover:not(:disabled) {
  background: #2c5282;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(26, 54, 93, 0.3);
}
button.action-btn:disabled { background: #a0aec0; cursor: not-allowed; box-shadow: none; }
button.ghost-btn {
  background: #718096;
  box-shadow: none;
}
button.ghost-btn:hover:not(:disabled) {
  background: #4a5568;
}

/* Quick Search */
.search-wrapper { display: flex; width: 100%; gap: 0; margin-top: 0.5rem; box-shadow: 0 4px 14px rgba(0, 25, 55, 0.08); border-radius: 8px; }
.search-input {
  flex: 1;
  padding: 14px 20px;
  border: 1px solid #cbd5e0;
  border-right: none;
  border-radius: 8px 0 0 8px;
  font-size: 16px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input:focus { outline: none; border-color: #3182ce; position: relative; z-index: 1; box-shadow: inset 0 0 0 3px rgba(49, 130, 206, 0.1); }
.search-btn {
  background: #1a365d;
  color: white;
  border: 1px solid #1a365d;
  padding: 14px 32px;
  border-radius: 0 8px 8px 0;
  font-size: 16px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
  white-space: nowrap;
}
.search-btn:hover { background: #2c5282; border-color: #2c5282; }

/* Quick Controls */
.quick-controls { display: flex; gap: 20px; margin-top: 24px; flex-wrap: wrap; align-items: flex-end; }
.quick-control-group { flex: 1; min-width: 220px; }
.quick-control-group label { font-size: 14px; color: #4a5568; margin-bottom: 8px; font-weight: 600; }
.quick-control-group input, .quick-control-group select { padding: 11px 14px; font-size: 15px; }

.example-link {
  display: inline-block;
  font-size: 13px;
  color: #3182ce;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  background: #ebf8ff;
  padding: 4px 10px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  font-weight: 500;
}
.example-link:hover { background: #bee3f8; color: #2b6cb0; }

fieldset {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}
legend {
  font-weight: 700;
  font-size: 17px;
  color: #1a365d;
  padding: 0 12px;
  margin-left: -12px;
  background: #ffffff;
}

.radio-group { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 12px; }
.radio-option { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 15px; color: #4a5568; }
.radio-option input[type="radio"] { accent-color: #1a365d; width: 16px; height: 16px; }
.mode-fields { display: none !important; }
.mode-fields.active { display: block !important; }
.window-row, .pair-inputs { display: flex; gap: 20px; flex-wrap: wrap; }
.window-row .form-group, .pair-inputs > div { flex: 1; min-width: 140px; }
.analysis-mode-container { display: flex; gap: 24px; flex-wrap: wrap; }
.mode-inputs, .mode-chart { flex: 1; min-width: 320px; }
.chart-title { text-align: center; font-weight: 600; margin-bottom: 12px; color: #1a365d; font-size: 15px; }

.pairs-scroll-box {
  max-height: 150px;
  overflow-y: auto;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
  font-family: monospace;
  font-size: 13px;
  color: #2d3748;
  margin-top: 8px;
  line-height: 1.6;
  word-break: break-all;
}
.pairs-scroll-box::-webkit-scrollbar { width: 6px; }
.pairs-scroll-box::-webkit-scrollbar-thumb { background-color: #cbd5e0; border-radius: 3px; }

canvas { width: 100% !important; height: 100% !important; }

.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.9s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}
.loading-spinner.dark {
  border-color: rgba(26, 54, 93, 0.25);
  border-top-color: #1a365d;
}
.loading-text { color: #718096; font-style: italic; font-size: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.error {
  color: #c53030;
  font-weight: 500;
  background: #fff5f5;
  padding: 12px 16px;
  border-radius: 6px;
  border: 1px solid #feb2b2;
  border-left: 4px solid #e53e3e;
  font-size: 14px;
}
.message-box { margin-top: 18px; text-align: center; min-height: 24px; font-weight: 500; font-size: 14px; }
.email-container { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.email-container input { flex: 1; }
.email-container small { color: #718096; font-size: 13px; }
.hidden { display: none !important; }

.hint-box {
  margin-top: 14px;
  font-size: 13px;
  color: #4a5568;
  line-height: 1.6;
  background: #f8fafc;
  border-radius: 8px;
  padding: 14px 16px;
  border: 1px solid #edf2f7;
}
.hint-box code {
  background: #edf2f7;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 4px;
  font-family: monospace;
  font-size: 12.5px;
  color: #2d3748;
}
.hint-box .hint-title {
  font-weight: 600;
  color: #1a365d;
  margin-bottom: 6px;
  display: block;
}
.hint-box .hint-warn { color: #c05621; margin-top: 8px; }
.hint-box .hint-warn strong { color: #9c4221; }

/* SeqId 相关 */
.seqid-row { display: flex; gap: 8px; align-items: center; }
.seqid-row input { flex: 1; font-family: monospace; font-size: 13.5px; }
.upload-status {
  font-size: 13px;
  color: #4a5568;
  margin-top: 8px;
  display: none;
  line-height: 1.5;
}
.upload-status .ok { color: #22543d; }
.upload-status .err { color: #c53030; }

@media (max-width: 768px) {
  .page-header { padding: 20px 16px; }
  .intro-text { font-size: 13px; }
  .sertool-tabs { flex-direction: column; padding: 8px; }
  .sertool-tab-btn { width: 100%; max-width: none; }
  .search-wrapper { flex-direction: column; box-shadow: none; }
  .search-input { border-radius: 8px; border-right: 1px solid #cbd5e0; margin-bottom: 8px; box-shadow: 0 4px 14px rgba(0, 25, 55, 0.08); }
  .search-btn { border-radius: 8px; width: 100%; }
  .quick-controls { flex-direction: column; gap: 16px; }
  .quick-control-group { width: 100%; }
  .analysis-mode-container { flex-direction: column; }
  .sertool-tab-btn, .search-input, .search-btn, input, select, label, button.action-btn { font-size: 15px !important; }
  fieldset { padding: 16px; }
  legend { font-size: 16px; }
  .form-section, .search-section { padding: 1.5rem 1rem; }
  .seqid-row { flex-direction: column; align-items: stretch; }
}
  
