body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  color: #333;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #6a73f1;
  padding: 10px 50px;
  color: white;
}

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

.logo-img {
  width: 40px;
  height: 40px;
  margin-right: 10px;
  border-radius: 50%;
}

.logo-text {
  font-size: 22px;
  font-weight: bold;
}

.nav-links a {
  color: white;
  text-decoration: none;
  margin-left: 30px;
  font-size: 18px;
}

.nav-links a:hover {
  text-decoration: underline;
}

.home-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 36px;
  padding: 60px 80px;
}

.home-text {
  width: 52%;
  font-size: 18px;
  line-height: 1.6;
}

.home-rank-panel {
  width: 42%;
  background: #f7f9ff;
  border: 1px solid #dbe3ff;
  border-radius: 14px;
  padding: 24px 22px;
  box-shadow: 0 3px 10px rgba(38, 72, 196, 0.08);
}

.home-rank-panel h3 {
  margin-top: 0;
  margin-bottom: 16px;
  color: #3f51d8;
  font-size: 22px;
}

.rank-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.rank-col {
  background: #ffffff;
  border: 1px solid #e3e8ff;
  border-radius: 10px;
  padding: 14px 16px;
}

.rank-col h4 {
  margin: 0 0 10px;
  font-size: 18px;
  color: #4a55f2;
}

.rank-col ol {
  margin: 0;
  padding-left: 22px;
}

.rank-col li {
  margin: 8px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 16px;
  line-height: 1.4;
}

.rank-col a {
  color: #2447c9;
  text-decoration: none;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 70%;
  font-size: 15px;
}

.rank-col a:hover { text-decoration: underline; }

.rank-score {
  color: #0f766e;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}

.rank-empty {
  list-style: none;
  color: #667;
  margin-left: -18px;
}

.hot-page {
  padding: 40px 80px;
}

.hot-head h1 {
  margin: 0 0 10px;
  color: #3f51d8;
}

.hot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.hot-chip {
  background: #eef2ff;
  border: 1px solid #dbe3ff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  color: #445;
}

.hot-grid {
  display: grid;
  grid-template-columns: 1fr minmax(340px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.hot-card {
  background: #fff;
  border: 1px solid #e3e8ff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.hot-card-title {
  font-weight: 700;
  color: #3f51d8;
  margin-bottom: 10px;
}

.hot-pdb-viewer {
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 460px;
  border-radius: 10px;
  background: #0f172a;
  position: relative;
  overflow: hidden;
}

.hot-empty {
  color: #666;
  font-size: 14px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hot-score-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hot-btn {
  border: 1px solid #4a55f2;
  background: #4a55f2;
  color: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
}

.hot-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.hot-btn-secondary {
  background: #fff;
  color: #4a55f2;
}

.hot-note {
  margin: 10px 0;
  color: #64748b;
  font-size: 13px;
}

.hot-score-wrap {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 6px;
  overflow-x: auto;
}

.hot-score-stage {
  min-width: 720px;
}

.hot-audio-wrap {
  margin-top: 12px;
}

.hot-audio-source {
  margin: 0 0 8px;
  color: #475569;
  font-size: 12px;
}

.hot-audio-wrap audio {
  width: 100%;
}

.hot-actions {
  margin-top: 16px;
}

@media (max-width: 1100px) {
  .home-container {
    flex-direction: column;
    padding: 32px 20px;
  }
  .home-text, .home-rank-panel {
    width: 100%;
  }
  .hot-page {
    padding: 24px;
  }
  .hot-grid {
    grid-template-columns: 1fr;
  }
  .hot-pdb-viewer {
    aspect-ratio: auto;
    height: 380px;
  }
}

.home-text h1 {
  color: #4a55f2;
  font-size: 36px;
  margin-bottom: 20px;
  margin-top: 10px;
}

.home-image {
  width: 100%;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.tools-container, .database-container {
  padding: 60px 120px;
}

h2 {
  color: #4a55f2;
  font-size: 36px;
  margin-top: 10px;
  margin-bottom: 50px;
}

h3 {
  color: #4a55f2;
  font-size: 24px;
  margin-top: 40px;
  margin-bottom: 20px;
}

/* home page */
.goals-list {
  list-style-type: disc;          /* 使用圆点符号 */
  text-align: left;               /* 列表左对齐 */
  margin: 16px 0 0 0;              /* 与周围元素留出间距 */
  padding-left: 1.2em;             /* 左缩进 */
  line-height: 1.8;               /* 行距更舒适 */
  max-width: 800px;               /* 控制宽度 */
}

.goals-list li {
  margin-bottom: 8px;             /* 每个列表项之间留空 */
  font-size: 1.1rem;              /* 稍大一点更易读 */
}


.tool {
  margin-bottom: 30px;
}

.tool h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.tool p {
  font-size: 18px;
  color: #555;
}

.ellipsis {
  font-size: 40px;
  text-align: center;
  color: #999;
  margin: 30px 0;
}

.back-button {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 18px;
  background-color: #6a73f1;
  color: white;
  border-radius: 6px;
  text-decoration: none;
}

.back-button:hover {
  background-color: #6a73f1;
}

footer {
  background-color: #6a73f1;
  color: white;
  text-align: center;
  padding: 12px 0;
  margin-top: 40px;
  font-size: 14px;
}

.page-container {
  padding: 60px 120px;
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.tool-card {
  display: flex;
  align-items: center;
  background-color: #f6f9fc;
  border-radius: 15px;
  padding: 25px 35px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.tool-detail {
    font-size: 0.85em;
    color: #666;
    margin-top: 8px;
    line-height: 1.4;
    font-style: italic;
}

.tool-info p:first-child {
    font-weight: 500;
    margin-bottom: 4px;
}

.tool-logo {
  width: 55px;
  height: 55px;
  margin-right: 25px;
  border-radius: 50%;
  object-fit: cover;
  background-color: white;
}

.tool-info h3 {
  margin: 0;
  font-size: 22px;
  color: #1e88e5;
}

.tool-info p {
  margin: 5px 0 0;
  font-size: 17px;
  color: #444;
}

.tool-name {
  font-weight: 700;
  color: #1565c0;
}

.ellipsis {
  font-size: 40px;
  text-align: center;
  color: #999;
  margin-top: 20px;
}

.page-container {
  padding: 60px 120px;
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* 卡片整体 */
.tool-card {
  display: flex;
  align-items: center;
  background-color: #f6f9fc;
  border-radius: 18px;
  padding: 35px 45px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 160px;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 14px rgba(0,0,0,0.1);
}

/* 方形图像 */
.tool-logo {
  width: 180px;
  height: 150px;
  margin-right: 50px;
  border-radius: 12px;
  object-fit: contain;
  background-color: #fff;
}

/* 文字区域 */
.tool-info h3 {
  margin: 0;
  font-size: 26px;
  color: #1e88e5;
}

.tool-info p {
  margin: 10px 0 0;
  font-size: 18px;
  color: #444;
  line-height: 1.4;
}

.tool-name {
  font-weight: 700;
  color: #1565c0;
}

/* 省略号 */
.ellipsis {
  font-size: 48px;
  text-align: center;
  color: #999;
  margin-top: 25px;
}

/* 返回按钮 */
.back-button {
  display: inline-block;
  margin-top: 25px;
  font-size: 18px;
  color: #ffffff;
  text-decoration: none;
}

/* ============================================================
   多序列比对 (MSA) 模块样式
   ============================================================ */
.msa-module {
  padding: 0 0 2rem 0;
}

/* 沿用全局 h2 的左对齐风格，仅调整间距 */
.msa-module h2 {
  color: #4a55f2;
  font-size: 36px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.msa-input-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.msa-label {
  min-width: 72px;
  font-weight: 600;
  font-size: 0.85rem;
  color: #475569;
  padding-top: 0.5rem;
  text-align: right;
}

.msa-textarea {
  flex: 1;
  height: 72px;
  padding: 0.5rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  resize: vertical;
  background: #fff;
  color: #334155;
  line-height: 1.5;
}

.msa-textarea:focus {
  outline: none;
  border-color: #6a73f1;
  box-shadow: 0 0 0 3px rgba(106, 115, 241, 0.15);
}

.msa-remove-btn {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.5rem 0.25rem;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.msa-remove-btn:hover { opacity: 1; }

.msa-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn-msa-add {
  padding: 0.5rem 1.25rem;
  border: 2px dashed #94a3b8;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-msa-add:hover {
  border-color: #6a73f1;
  color: #6a73f1;
  background: rgba(106, 115, 241, 0.05);
}

.btn-msa-submit {
  padding: 0.5rem 1.75rem;
  border: none;
  border-radius: 8px;
  background: #6a73f1;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-msa-submit:hover { background: #5862e0; }
.btn-msa-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* 结果区域 */
#msa-result {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.msa-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.msa-result-title {
  font-weight: 700;
  color: #334155;
  font-size: 1.05rem;
}

.msa-stats {
  font-size: 0.8rem;
  color: #64748b;
}

.msa-display {
  overflow-x: auto;
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 0.82rem;
  line-height: 2;
  background: #1e293b;
  border-radius: 10px;
  padding: 1.25rem;
}

.msa-block {
  margin-bottom: 1.5rem;
}
.msa-block:last-child { margin-bottom: 0; }

.msa-line {
  display: flex;
  white-space: pre;
}

.msa-seq-label {
  width: 32px;
  flex-shrink: 0;
  text-align: right;
  padding-right: 8px;
  color: #94a3b8;
  font-weight: 600;
}

.msa-ruler .msa-tick {
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
}

.msa-aa {
  display: inline-block;
  width: 1em;
  text-align: center;
}

/* 参考序列：白色 */
.msa-ref {
  color: #e2e8f0;
}

/* Query 序列与参考匹配：绿色 */
.msa-hit {
  color: #4ade80;
  font-weight: 700;
}

/* Query 序列与参考不匹配：黄色 */
.msa-miss {
  color: #facc15;
}

/* 竖线行 */
.msa-bar-line {
  line-height: 1;
  margin-top: -1px;
  margin-bottom: -1px;
}

.msa-bar {
  color: #facc15;
  font-weight: 700;
}

/* 响应式 */
@media (max-width: 768px) {
  .msa-module { padding: 0 1rem; }
  .msa-input-row { flex-direction: column; }
  .msa-label { text-align: left; padding-top: 0; min-width: auto; }
}

.back-button:hover {
  text-decoration: underline;
}

/* ============================================================
   Roundtrip page form styles
   ============================================================ */
.hot-input-label {
  display: block;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
}

.hot-input {
  width: 100%;
  background: #0f172a;
  border: 1px solid #475569;
  border-radius: 8px;
  padding: 8px 12px;
  color: #e2e8f0;
  font-size: 14px;
  box-sizing: border-box;
}

.hot-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99,102,241,.25);
}

.hot-input::placeholder { color: #64748b; }

.hot-textarea {
  resize: vertical;
  font-family: monospace;
}

.hot-input-hint {
  font-size: 12px;
  color: #64748b;
  margin-top: 3px;
}

.hot-input select {
  -webkit-appearance: none;
  appearance: none;
}

/* ============================================================
   Roundtrip page — light themed, matching homepage
   ============================================================ */
.rt-page {
  padding: 40px 80px;
}

.rt-card {
  background: #ffffff;
  border: 1px solid #e3e8ff;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.rt-card-title {
  font-weight: 700;
  color: #3f51d8;
  font-size: 17px;
  margin-bottom: 14px;
}

.rt-label {
  display: block;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
}

.rt-input {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 12px;
  color: #1e293b;
  font-size: 14px;
  box-sizing: border-box;
}

.rt-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99,102,241,.15);
}

.rt-input::placeholder { color: #94a3b8; }

.rt-textarea {
  resize: vertical;
  font-family: monospace;
}

@media (max-width: 1100px) {
  .rt-page {
    padding: 24px 16px;
  }
}

.seq-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 10px;
  font-family: 'Consolas', 'Courier New', monospace;
  color: #1e293b;
  word-break: break-all;
  line-height: 1.6;
}