/* ========== Expression 页面整体 ========== */
main.container {
  max-width: 1800px;
  margin: 24px auto;
  padding: 24px 28px;
  background: linear-gradient(160deg, #ffffff 0%, #fafcff 100%);
  border-radius: 22px;
  box-shadow:
    0 4px 24px rgba(60, 80, 160, 0.08),
    0 1px 4px rgba(60, 80, 160, 0.04);
  border: 1px solid rgba(120, 140, 210, 0.08);
}

/* ========== 选择器区域 ========== */
.selector {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 22px;
  padding: 18px 22px;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 50%, #f5f0ff 100%);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(79, 109, 212, 0.08);
}

.selector label {
  color: #3a4f8a;
  font-weight: 600;
  letter-spacing: 0.2px;
  margin-right: 0;
}

/* 统一的下拉/输入样式 */
#species-select,
#bioproject-select,
#chart-type-select {
  padding: 8px 36px 8px 12px;
  font-size: 15px;
  border: 2px solid #d0d7f0;
  border-radius: 10px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 12 12'%3E%3Cpath fill='%235a6fc4' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: all 0.25s ease;
  color: #333;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  min-width: 180px;
}

#species-select:hover,
#bioproject-select:hover,
#chart-type-select:hover {
  border-color: #8fa4e8;
  box-shadow: 0 2px 10px rgba(79, 109, 212, 0.12);
}

#species-select:focus,
#bioproject-select:focus,
#chart-type-select:focus {
  outline: none;
  border-color: #5b6fd4;
  box-shadow: 0 0 0 3px rgba(91, 111, 212, 0.12);
}

/* Gene ID 输入框 */
#gene-input {
  padding: 8px 14px;
  width: 520px;
  max-width: 100%;
  font-size: 15px;
  border: 2px solid #d0d7f0;
  border-radius: 10px;
  background: #fff;
  transition: all 0.25s ease;
  color: #333;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

#gene-input:hover {
  border-color: #8fa4e8;
}

#gene-input:focus {
  outline: none;
  border-color: #5b6fd4;
  box-shadow: 0 0 0 3px rgba(91, 111, 212, 0.12);
}

#gene-input::placeholder {
  color: #aab2c5;
  font-size: 14px;
}

/* 搜索按钮 */
#search-btn {
  padding: 9px 24px;
  background: linear-gradient(135deg, #5b8def, #4a7de0);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.25s ease;
  box-shadow: 0 3px 10px rgba(79, 109, 212, 0.25);
}

#search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(79, 109, 212, 0.32);
  background: linear-gradient(135deg, #4a7de0, #3e6dd4);
}

#search-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(79, 109, 212, 0.2);
}

/* ========== 图表区域 ========== */
.plot-container {
  background: #ffffff;
  border-radius: 18px;
  padding: 22px 24px;
  margin-bottom: 26px;
  box-shadow:
    0 3px 18px rgba(60, 80, 160, 0.07),
    0 1px 3px rgba(60, 80, 160, 0.03);
  border: 1px solid rgba(150, 175, 220, 0.12);
}

.plot-container h3 {
  margin: 0 0 16px 0;
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, #2c3e80, #5b6fd4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  margin-right: 18px;
  letter-spacing: 0.3px;
}

.plot-container label {
  font-weight: 600;
  color: #3a4f8a;
  margin-right: 10px;
  font-size: 15px;
}

#chart-type-select {
  min-width: 130px;
  display: inline-block;
}

#expression-plot {
  margin-top: 18px;
  border-radius: 14px;
  overflow: hidden;
  min-height: 440px;
  background: #fafcff;
  border: 1px solid rgba(180, 200, 235, 0.2);
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.02);
  padding: 10px;
}

/* ========== 表格区域 ========== */
main.container > h3 {
  margin: 24px 0 12px 8px;
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, #2c3e80, #5b6fd4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.3px;
}

.table-container {
  max-height: 420px;
  overflow-y: auto;
  overflow-x: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow:
    0 3px 16px rgba(60, 80, 160, 0.07),
    0 1px 3px rgba(60, 80, 160, 0.03);
  border: 1px solid rgba(150, 175, 220, 0.12);
}

/* 自定义滚动条 */
.table-container::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.table-container::-webkit-scrollbar-track {
  background: #f4f6fb;
  border-radius: 0 14px 14px 0;
}

.table-container::-webkit-scrollbar-thumb {
  background: #c9d4ee;
  border-radius: 5px;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: #aab9de;
}

/* 表格 */
#expression-table {
  width: 100%;
  border-collapse: collapse;
}

#expression-table thead tr {
  position: sticky;
  top: 0;
  z-index: 2;
}

#expression-table thead th {
  background: linear-gradient(135deg, #3b6fd4, #5b8def);
  color: #fff;
  padding: 13px 14px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  border-bottom: none;
}

#expression-table td {
  padding: 11px 14px;
  text-align: center;
  font-size: 15px;
  border-bottom: 1px solid #e8edf6;
  color: #333;
  transition: background 0.2s ease;
}

#expression-table tbody tr:nth-child(even) td {
  background: #f8faff;
}

#expression-table tbody tr:hover td {
  background: #eef3ff !important;
}

#expression-table .empty {
  text-align: center;
  color: #7a8ba3;
  padding: 40px 20px;
  font-size: 15px;
  font-style: italic;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  main.container {
    padding: 16px 14px;
    margin: 12px;
  }

  .selector {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px 16px;
  }

  #gene-input {
    width: 100%;
  }

  #species-select,
  #bioproject-select,
  #chart-type-select {
    width: 100%;
  }

  #search-btn {
    width: 100%;
  }

  #expression-plot {
    min-height: 320px;
  }
}