body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f7f9fb;
  color: #222;
}

.top-header {
  background: #0B0B45;
  color: white;
  padding: 18px 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: white;
  border-radius: 12px;
  padding: 6px;
}

.brand h1 {
  margin: 0;
  font-size: 30px;
}

.brand p {
  margin: 5px 0 0;
  font-size: 16px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  background: #0B0B45;
  padding: 0 20px;
}

.tab-btn {
  border: none;
  background: transparent;
  color: white;
  padding: 12.5px 17px;
  font-size: 14.25px;
  cursor: pointer;
}

.tab-btn:hover,
.tab-btn.active {
  background: #ffffff;
  color: #0B0B45;
  font-weight: bold;
}

.container {
  padding: 24px;
}

.tab-content {
  display: none;
}

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

.layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 22px;
}

.sidebar {
  background: white;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  height: fit-content;
}

.sidebar h2 {
  color: #0B0B45;
  font-size: 20px;
  margin-top: 0;
}

label {
  display: block;
  margin-top: 14px;
  margin-bottom: 6px;
  font-weight: bold;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
}

textarea {
  resize: vertical;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-label input {
  width: auto;
}

.primary-btn,
.download-btn {
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 10px;
  margin-top: 12px;
  cursor: pointer;
  font-weight: bold;
}

.primary-btn {
  background: #0B0B45;
  color: white;
}

.download-btn {
  background: #2c7fb8;
  color: white;
}

.primary-btn:hover,
.download-btn:hover {
  opacity: 0.9;
}

.card {
  background: white;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.card h2 {
  color: #0B0B45;
}

.note {
  color: #555;
  font-size: 14px;
}

.status {
  margin-top: 10px;
  font-size: 14px;
  font-weight: bold;
}

.range-label {
  font-size: 13px;
  color: #555;
  margin-top: 4px;
}

.svg-box {
  overflow: auto;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 16px;
}

.svg-box svg {
  width: 100%;
  height: auto;
}

.plot-box {
  width: 100%;
  height: 650px;
}

.plot-box.large {
  height: 760px;
}

.table-wrap {
  overflow: auto;
  max-height: 720px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}

th {
  background: #0B0B45;
  color: white;
  position: sticky;
  top: 0;
  z-index: 1;
}

th,
td {
  border: 1px solid #ddd;
  padding: 7px;
  text-align: left;
  white-space: nowrap;
}

tr:nth-child(even) {
  background: #f5f5f5;
}

.about-card {
  max-width: 1000px;
  margin: 0 auto;
  line-height: 1.65;
}

/* Transcriptomic Analysis flowchart */
.flowchart-wrap {
  text-align: center;
}

.flowchart-image {
  display: block;
  width: 30%;
  max-width: 500px;
  height: auto;
  margin: 18px auto;
}

.about-header {
  text-align: center;
  padding: 18px;
}

.about-logo {
  width: 180px;
  max-width: 100%;
}

.about-header h2 {
  font-size: 32px;
  margin-bottom: 4px;
}

.about-header h3 {
  font-size: 22px;
  color: #333;
  margin: 4px 0;
}

.about-card a {
  color: #0B0B45;
}

footer {
  text-align: center;
  color: #666;
  font-size: 14px;
  padding-top: 18px;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .brand h1 {
    font-size: 22px;
  }

  .tabs {
    padding: 0;
  }

  .tab-btn {
    flex: 1 1 auto;
  }
}

.person-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 14px 0;
  border-bottom: 1px solid #eeeeee;
}

.person-text {
  flex: 1;
}

.person-photo {
  width: 115px;
  height: 115px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #0B0B45;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  margin-left: 25px;
}

.mapper-sidebar {
  width: 390px;
}

.marker-block {
  border: 1px solid #dddddd;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 15px;
  background: #ffffff;
}

.marker-block h3,
.marker-block h4 {
  color: #0B0B45;
  margin-top: 0;
}

.marker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.chr-map-box {
  border: 1px solid #eeeeee;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 22px;
  background: white;
}

.chr-map-box h3 {
  color: #0B0B45;
  margin-top: 0;
}

.chr-svg-wrap {
  overflow-x: auto;
  background: white;
}

.chr-svg-wrap svg {
  max-width: 100%;
  height: auto;
}

@media (max-width: 900px) {
  .person-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .person-photo {
    margin-left: 0;
  }

  .marker-grid {
    grid-template-columns: 1fr;
  }
}

/* Version 3.0: GO and functional annotation modules */
.analysis-layout {
  grid-template-columns: 370px minmax(0, 1fr);
}

.hidden-control {
  display: none;
}

.analysis-summary {
  background: #f1f8f3;
  border-left: 5px solid #0B0B45;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 12px 0 18px;
  line-height: 1.65;
  min-height: 28px;
}

.analysis-plot {
  height: auto;
  min-height: 520px;
}

.empty-state {
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  border: 1px dashed #bbb;
  border-radius: 10px;
  background: #fafafa;
}

.chr-check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  margin: 8px 0 16px;
}

@media (max-width: 900px) {
  .analysis-layout {
    grid-template-columns: 1fr;
  }

  .chr-check-grid {
    grid-template-columns: 1fr;
  }
}


.hidden-control { display: none !important; }
.info-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; }
.info-item { border:1px solid #d9dbea; border-radius:10px; padding:10px; background:#fafaff; }
.info-item strong { display:block; color:#0B0B45; margin-bottom:4px; }
.table-row-clickable { cursor:pointer; }
.table-row-clickable:hover { background:#e9eafb !important; }
.download-card-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:18px; margin-top:20px; }
.download-card { display:flex; flex-direction:column; gap:9px; padding:20px; border:2px solid #0B0B45; border-radius:14px; text-decoration:none; color:#222; background:#fff; box-shadow:0 3px 10px rgba(11,11,69,.09); transition:.2s ease; }
.download-card:hover { transform:translateY(-3px); box-shadow:0 8px 20px rgba(11,11,69,.18); background:#f7f7ff; }
.download-card strong { color:#0B0B45; font-size:18px; }
.download-card span { color:#555; line-height:1.4; flex:1; }
.download-card b { display:inline-block; background:#0B0B45; color:#fff; padding:9px 12px; border-radius:8px; text-align:center; }
.half-width { width:50% !important; max-width:50% !important; height:auto; display:block; margin:18px auto; }
.result-downloads { display:flex; flex-wrap:wrap; gap:10px; margin:12px 0; }
.inline-btn { width:auto; min-width:180px; }
details { margin-top:14px; border:1px solid #ddd; border-radius:10px; padding:10px; }
summary { cursor:pointer; font-weight:bold; color:#0B0B45; }
@media (max-width:700px){ .half-width{width:100% !important;max-width:100% !important;} }

/* GO and Functional Annotation: flexible height, stable width, left downloads */
.analysis-layout { grid-template-columns: 370px minmax(0, 1fr); }
.analysis-layout > section { min-width: 0; max-width: 100%; }
.enrichment-plot {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: visible;
}
.enrichment-plot .plot-container,
.enrichment-plot .svg-container,
.enrichment-plot .main-svg {
  width: 100% !important;
  max-width: 100% !important;
}
.enrichment-download-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  margin: 12px 0 20px;
}
.enrichment-download-btn {
  width: auto;
  min-width: 220px;
  margin-top: 0;
}
.enrichment-table-wrap {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 8px;
  clear: both;
}
.enrichment-empty-message {
  min-height: 520px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  padding: 30px;
  text-align: center;
  color: #666666;
  background: #fafaff;
  border: 1px dashed #b8b8c8;
  border-radius: 10px;
}
@media (max-width: 900px) {
  .analysis-layout { grid-template-columns: 1fr; }
  .enrichment-download-row { justify-content: flex-start; }
  .enrichment-download-btn { width: 100%; min-width: 0; }
}
