/* === Reset & Base === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Noto Sans SC', sans-serif;
  background: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

a { color: #1890ff; text-decoration: none; }
a:hover { color: #40a9ff; }

/* === Header === */
.header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  height: 56px;
}

.logo {
  display: flex;
  align-items: center;
  margin-right: 40px;
  text-decoration: none;
}
.logo-icon { font-size: 20px; }
.logo-text { font-size: 20px; font-weight: 700; color: #1890ff; margin-left: 6px; }
.logo-sub { font-size: 13px; color: #999; margin-left: 8px; }

.nav { display: flex; gap: 4px; flex: 1; }
.nav-item {
  padding: 8px 16px;
  border-radius: 6px;
  color: #555;
  font-size: 14px;
  transition: background 0.2s;
  text-decoration: none;
}
.nav-item:hover { background: #f0f7ff; color: #1890ff; }
.nav-item.active { background: #e6f7ff; color: #1890ff; font-weight: 600; }

/* === Main Content === */
.main-content { min-height: calc(100vh - 56px - 120px); }

.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* === Loading === */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px;
  color: #999;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e8e8e8;
  border-top-color: #1890ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* === Search Hero === */
.search-hero {
  text-align: center;
  padding: 60px 16px 40px;
  background: linear-gradient(135deg, #e8f4ff 0%, #f0f7ff 50%, #e6f0ff 100%);
  border-radius: 12px;
  margin-bottom: 32px;
}
.search-hero h1 { font-size: 32px; font-weight: 700; color: #1a1a2e; margin-bottom: 8px; }
.search-hero p { font-size: 16px; color: #666; margin-bottom: 24px; }

.search-wrapper {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  height: 48px;
  padding: 0 48px 0 16px;
  border: 2px solid #d9d9d9;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: #1890ff; box-shadow: 0 0 0 3px rgba(24,144,255,0.1); }

.search-btn {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 40px;
  height: 40px;
  background: #1890ff;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
.search-btn:hover { background: #40a9ff; }

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
  margin-top: 4px;
  display: none;
}
.search-suggestions.show { display: block; }

.suggestion-item {
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.suggestion-item:hover, .suggestion-item.selected { background: #f0f7ff; }
.suggestion-item .gene-name { font-weight: 600; color: #1890ff; }
.suggestion-item .protein-name { color: #666; font-size: 13px; }
.suggestion-item .product-tags { margin-left: auto; display: flex; gap: 4px; }

/* === Disease Cards === */
.disease-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.disease-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-top: 3px solid transparent;
}
.disease-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(24,144,255,0.15);
}
.disease-card .icon { font-size: 40px; margin-bottom: 12px; }
.disease-card .title { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.disease-card .count { font-size: 14px; color: #1890ff; font-weight: 500; }
.disease-card .desc { font-size: 13px; color: #999; margin-top: 4px; }

/* === Stat Cards === */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  text-align: center;
  padding: 24px 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card .number { font-size: 36px; font-weight: 700; color: #1890ff; line-height: 1.2; }
.stat-card .label { font-size: 14px; color: #888; margin-top: 8px; }

/* === Section Title === */
.section-title {
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 24px;
  color: #1a1a2e;
}

/* === Tags === */
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
}
.tag-inflammation { background: #fff1f0; color: #ff4d4f; border: 1px solid #ffa39e; }
.tag-immunology { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.tag-cancer { background: #f9f0ff; color: #722ed1; border: 1px solid #d3adf7; }
.tag-metabolism { background: #fff7e6; color: #fa8c16; border: 1px solid #ffd591; }
.tag-neuro { background: #e6fffb; color: #13c2c2; border: 1px solid #87e8de; }
.tag-drug-target { background: #fff0f6; color: #eb2f96; border: 1px solid #ffadd2; }
.tag-product { background: #e6f7ff; color: #1890ff; border: 1px solid #91d5ff; }

/* === Table === */
.data-table {
  width: 100%;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-collapse: collapse;
}
.data-table th {
  background: #fafafa;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  color: #555;
  border-bottom: 1px solid #f0f0f0;
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}
.data-table tr:hover td { background: #fafafa; }
.data-table .gene-link { font-weight: 600; color: #1890ff; }
.data-table .gene-link:hover { color: #40a9ff; }
.data-table .protein-name-cell { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-table .tags-cell { display: flex; gap: 4px; flex-wrap: wrap; }
.data-table .products-cell { display: flex; gap: 4px; flex-wrap: wrap; }

/* === Pagination === */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 16px;
}
.pagination button {
  padding: 6px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.pagination button:hover { border-color: #1890ff; color: #1890ff; }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }
.pagination button.active { background: #1890ff; color: #fff; border-color: #1890ff; }
.pagination .page-info { font-size: 14px; color: #666; }

/* === Filters === */
.filters-bar {
  background: #fff;
  border-radius: 12px;
  padding: 16px 24px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.filter-input {
  height: 36px;
  padding: 0 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  min-width: 200px;
}
.filter-input:focus { border-color: #1890ff; }

.filter-select {
  height: 36px;
  padding: 0 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  background: #fff;
  min-width: 150px;
}
.filter-select:focus { border-color: #1890ff; }

/* === Disease Browse Header === */
.disease-header {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  border-left: 4px solid #1890ff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.disease-header h2 { font-size: 24px; margin: 0; }
.disease-header p { color: #666; margin-top: 8px; }
.disease-header strong { color: #1890ff; }

/* === Protein Detail === */
.protein-header {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.protein-header h1 { font-size: 32px; font-weight: 700; color: #1a1a2e; margin-bottom: 8px; }
.protein-header .full-name { font-size: 16px; color: #666; margin-bottom: 16px; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.detail-item { padding: 12px; background: #fafafa; border-radius: 8px; }
.detail-item .detail-label { font-size: 12px; color: #999; margin-bottom: 4px; }
.detail-item .detail-value { font-size: 14px; font-weight: 500; }

.panel-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.panel-card {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  overflow: hidden;
}
.panel-card-header {
  padding: 12px 16px;
  background: #f6f8fa;
  font-weight: 600;
  color: #1890ff;
  border-bottom: 1px solid #e8e8e8;
}
.panel-card-body { padding: 12px 16px; }
.panel-card-body .panel-item { padding: 4px 0; border-bottom: 1px solid #f5f5f5; font-size: 14px; }
.panel-card-body .panel-item:last-child { border-bottom: none; }

/* === Compare Page === */
.compare-table { margin-bottom: 24px; }
.compare-table td .coverage-val { font-weight: 600; }
.compare-table td .coverage-pct { font-size: 12px; }
.coverage-high { color: #52c41a; }
.coverage-mid { color: #faad14; }
.coverage-low { color: #ff4d4f; }

.recommendation-card {
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  border-radius: 12px;
  padding: 16px 24px;
  margin-bottom: 24px;
}
.recommendation-card h5 { margin-bottom: 8px; }

/* === Stats Page === */
.bar-chart {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.bar-chart h3 { margin-bottom: 16px; font-size: 16px; }
.bar-row {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}
.bar-label {
  width: 160px;
  font-size: 13px;
  text-align: right;
  padding-right: 12px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-track {
  flex: 1;
  height: 24px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
  display: flex;
  align-items: center;
  padding-left: 8px;
}
.bar-fill span {
  font-size: 11px;
  color: #fff;
  font-weight: 500;
  white-space: nowrap;
}

/* === CTA === */
.cta-section {
  background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  color: #fff;
  margin: 32px 0;
}
.cta-section h3 { font-size: 22px; margin-bottom: 12px; color: #fff; }
.cta-section p { font-size: 14px; opacity: 0.9; margin-bottom: 16px; }
.cta-section a { color: #fff; text-decoration: underline; }

/* === Footer === */
.footer {
  text-align: center;
  padding: 32px 16px;
  background: #1a1a2e;
  color: #aaa;
  margin-top: auto;
}
.footer a { color: #69c0ff; }
.footer-note { margin-top: 12px; font-size: 12px; color: #666; }

/* === Breadcrumb === */
.breadcrumb {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #999;
}
.breadcrumb a { color: #1890ff; }
.breadcrumb .separator { color: #d9d9d9; }

/* === Empty State === */
.empty-state {
  text-align: center;
  padding: 60px;
  color: #999;
}
.empty-state a { display: block; margin-top: 16px; }

/* === Responsive === */
@media (max-width: 1024px) {
  .disease-cards { grid-template-columns: repeat(2, 1fr); }
  .stat-cards { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .header { padding: 0 12px; }
  .logo-sub { display: none; }
  .nav-item { padding: 8px 10px; font-size: 13px; }
  .search-hero { padding: 40px 12px 24px; }
  .search-hero h1 { font-size: 24px; }
  .page-container { padding: 16px 12px; }
  .disease-cards { grid-template-columns: repeat(2, 1fr); }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .data-table { font-size: 13px; }
  .data-table th, .data-table td { padding: 8px 10px; }
  .filters-bar { flex-direction: column; }
  .filter-input, .filter-select { width: 100%; }
  .bar-label { width: 100px; font-size: 12px; }
}

/* === v2: Nav Highlight (Panel Coverage 入口强调) === */
.nav-highlight {
  position: relative;
  color: #1890ff;
  font-weight: 500;
}
.nav-highlight::after {
  content: "🎯";
  font-size: 10px;
  margin-left: 4px;
  vertical-align: super;
}
.nav-highlight:hover {
  background: #f0f7ff;
  color: #1890ff;
}

/* === v2: Alias Hint === */
.alias-hint {
  display: none;
  margin-top: 8px;
  padding: 8px 16px;
  background: #fffbe6;
  border: 1px solid #ffe58f;
  border-radius: 6px;
  font-size: 14px;
  color: #8c6d1f;
  text-align: left;
}
.alias-hint .alias-standard {
  color: #1890ff;
  font-weight: 700;
}

/* === v2: Alias Badge in Suggestions === */
.alias-badge {
  display: inline-block;
  padding: 1px 6px;
  background: #fff7e6;
  border: 1px solid #ffd591;
  border-radius: 3px;
  font-size: 11px;
  color: #fa8c16;
  font-weight: 500;
}

/* === v2: Quick Entry Row === */
.quick-entry-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}
.quick-entry-card {
  display: flex;
  align-items: center;
  padding: 20px 24px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  text-decoration: none;
  transition: all 0.3s;
  border: 2px solid transparent;
  cursor: pointer;
}
.quick-entry-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.quick-entry-panel:hover {
  border-color: #1890ff;
}
.quick-entry-compare:hover {
  border-color: #722ed1;
}
.qe-icon {
  font-size: 32px;
  margin-right: 16px;
  flex-shrink: 0;
}
.qe-text {
  flex: 1;
}
.qe-text strong {
  display: block;
  font-size: 16px;
  color: #1a1a2e;
  margin-bottom: 4px;
}
.qe-text span {
  font-size: 13px;
  color: #888;
}
.qe-arrow {
  font-size: 20px;
  color: #ccc;
  margin-left: 12px;
}

/* === v2: Panel Coverage Page === */
.pv-header {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  border-left: 4px solid #1890ff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.pv-header h2 { font-size: 24px; margin: 0 0 8px; }
.pv-header p { color: #666; margin: 0; }

.pv-input-section {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.pv-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}
.pv-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #d9d9d9;
  border-radius: 8px;
  font-size: 15px;
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  line-height: 1.6;
}
.pv-textarea:focus {
  border-color: #1890ff;
  box-shadow: 0 0 0 3px rgba(24,144,255,0.1);
}
.pv-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.pv-btn {
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.pv-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.pv-btn-primary {
  background: #1890ff;
  color: #fff;
}
.pv-btn-primary:hover:not(:disabled) {
  background: #40a9ff;
}
.pv-btn-secondary {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #d9d9d9;
}
.pv-btn-secondary:hover {
  background: #e8e8e8;
}
.pv-hint {
  font-size: 13px;
  color: #888;
}
.pv-hint a {
  color: #1890ff;
  cursor: pointer;
}

/* v2: PV Summary Cards */
.pv-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.pv-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-top: 3px solid #d9d9d9;
}
.pv-card-num { font-size: 36px; font-weight: 700; line-height: 1.2; }
.pv-card-label { font-size: 13px; color: #888; margin-top: 4px; }
.pv-card-total { border-top-color: #1890ff; }
.pv-card-total .pv-card-num { color: #1890ff; }
.pv-card-matched { border-top-color: #52c41a; }
.pv-card-matched .pv-card-num { color: #52c41a; }
.pv-card-unmatched { border-top-color: #ff4d4f; }
.pv-card-unmatched .pv-card-num { color: #ff4d4f; }
.pv-card-panels { border-top-color: #722ed1; }
.pv-card-panels .pv-card-num { color: #722ed1; }

/* v2: PV Sections */
.pv-section {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.pv-section h3 {
  font-size: 18px;
  margin-bottom: 16px;
  color: #1a1a2e;
}

/* v2: Matched List */
.pv-matched-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pv-matched-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  border-radius: 6px;
  font-size: 13px;
}
.pv-matched-input { font-weight: 600; color: #333; }
.pv-matched-standard { font-weight: 600; color: #1890ff; }
.pv-arrow { color: #999; }
.pv-check { color: #52c41a; }
.pv-matched-info { color: #999; font-size: 12px; }

/* v2: Unmatched */
.pv-unmatched-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.pv-unmatched-tag {
  display: inline-block;
  padding: 4px 12px;
  background: #fff1f0;
  border: 1px solid #ffa39e;
  border-radius: 4px;
  font-size: 13px;
  color: #ff4d4f;
  font-weight: 500;
}
.pv-unmatched-hint {
  font-size: 13px;
  color: #999;
  margin: 0;
}

/* v2: Product Summary Cards */
.pv-product-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.pv-product-card {
  padding: 16px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  transition: border-color 0.2s;
}
.pv-product-card:hover {
  border-color: #1890ff;
}
.pv-product-name {
  font-weight: 600;
  color: #1890ff;
  margin-bottom: 8px;
  font-size: 15px;
}
.pv-product-stat {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
}
.pv-product-count {
  font-size: 28px;
  font-weight: 700;
  color: #1890ff;
}
.pv-product-label {
  font-size: 13px;
  color: #888;
}
.pv-product-bar-track {
  height: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}
.pv-product-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #1890ff, #69c0ff);
  border-radius: 4px;
  transition: width 0.5s;
}
.pv-product-rate {
  font-size: 12px;
  color: #888;
  text-align: right;
}

/* v2: Best Panel */
.pv-best-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #fff7e6, #fffbe6);
  border: 2px solid #ffd591;
  border-radius: 10px;
  margin-bottom: 20px;
}
.pv-best-badge {
  font-size: 14px;
  font-weight: 700;
  color: #d48806;
  white-space: nowrap;
}
.pv-best-info {
  font-size: 14px;
  color: #333;
}
.pv-best-stat {
  margin-left: 8px;
  font-size: 13px;
  color: #d48806;
  font-weight: 500;
}

/* v2: PV Table */
.pv-table td.pv-covered-genes {
  max-width: 300px;
  font-size: 12px;
  color: #666;
  word-break: break-all;
}
.pv-best-row {
  background: #fffbe6 !important;
}
.pv-best-row td {
  border-left: 3px solid #faad14;
}
.pv-more {
  text-align: center;
  color: #999;
  font-size: 13px;
  margin-top: 12px;
}
.pv-empty {
  text-align: center;
  color: #999;
}

/* v2: Loading Inline */
.loading-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px;
  color: #999;
}
.spinner-small {
  width: 24px;
  height: 24px;
  border: 2px solid #e8e8e8;
  border-top-color: #1890ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* v2: Responsive additions */
@media (max-width: 768px) {
  .quick-entry-row {
    grid-template-columns: 1fr;
  }
  .pv-summary-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .pv-product-cards {
    grid-template-columns: 1fr;
  }
  .pv-best-panel {
    flex-direction: column;
    align-items: flex-start;
  }
  .pv-table {
    font-size: 12px;
  }
  .nav-highlight {
    font-size: 12px;
    padding: 6px 8px;
  }
}
/* ===================================================== */
/* === v7.1 移动端适配 Mobile First Enhancements === */
/* ===================================================== */

/* --- 显示工具类 ---
   desktop-only: 桌面端正常显示（不覆盖原有display），移动端隐藏
   mobile-only: 桌面端隐藏，移动端显示 */
.mobile-only { display: none !important; }

/* --- 移动端顶栏 --- */
.mobile-header {
  display: none;
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  align-items: center;
  justify-content: space-between;
  height: 52px;
}
.mobile-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-weight: 700;
}
.mobile-logo-icon { font-size: 20px; }
.mobile-logo-text { font-size: 18px; color: #1890ff; margin-left: 6px; }
.mobile-pv-btn {
  background: linear-gradient(135deg, #e6f7ff, #f0f7ff);
  border: 1px solid #91d5ff;
  color: #1890ff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

/* --- 底部 Tab Bar --- */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #f0f0f0;
  z-index: 200;
  display: none;
  justify-content: space-around;
  align-items: center;
  height: 60px;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.04);
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #999;
  font-size: 11px;
  gap: 2px;
  padding: 6px 0;
  transition: color 0.2s;
}
.tab-item.active { color: #1890ff; }
.tab-icon { font-size: 22px; line-height: 1; }
.tab-label { font-size: 11px; }

.tab-center {
  position: relative;
}
.tab-center-icon {
  position: absolute;
  top: -20px;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #1890ff, #096dd9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(24,144,255,0.35);
  border: 3px solid #fff;
}
.tab-item.tab-center {
  padding-top: 28px;
}

/* --- 移动端主内容 padding（为底栏留空间） --- */
.mobile-main-padding {
  padding-bottom: 80px;
}

/* --- 搜索优化（移动端） --- */
@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: flex !important; }

  body { font-size: 15px; -webkit-tap-highlight-color: transparent; }

  .header { display: none; }
  .mobile-header { display: flex; }
  .tab-bar { display: flex; }

  .main-content {
    min-height: calc(100vh - 52px);
    padding-bottom: 70px;
  }

  .footer { display: none; }

  /* 首页搜索区 */
  .search-hero {
    padding: 24px 16px 20px;
    border-radius: 0 0 16px 16px;
    margin-bottom: 16px;
  }
  .search-hero h1 { font-size: 22px; }
  .search-hero p { font-size: 13px; margin-bottom: 16px; }

  .search-input {
    height: 48px;
    font-size: 15px;
    border-radius: 24px;
    padding-left: 20px;
  }
  .search-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    top: 5px;
    right: 5px;
  }

  .search-suggestions {
    border-radius: 12px;
    margin-top: 8px;
    max-height: 60vh;
  }
  .suggestion-item {
    padding: 14px 16px;
    border-bottom: 1px solid #f5f5f5;
    min-height: 52px;
  }
  .suggestion-item:last-child { border-bottom: none; }
  .suggestion-item .gene-name { font-size: 16px; font-weight: 600; }
  .suggestion-item .protein-name { font-size: 12px; flex-basis: 100%; }
  .suggestion-item .product-tags { display: none; }

  /* 快捷入口 */
  .quick-entry-row {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
  }
  .quick-entry-card { padding: 16px 20px; }
  .qe-icon { font-size: 28px; margin-right: 12px; }
  .qe-text strong { font-size: 15px; }
  .qe-text span { font-size: 12px; }

  /* 疾病卡片 */
  .disease-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
  }
  .disease-card {
    padding: 16px 12px;
    border-radius: 10px;
  }
  .disease-card .icon { font-size: 28px; margin-bottom: 8px; }
  .disease-card .title { font-size: 16px; margin-bottom: 4px; }
  .disease-card .count { font-size: 12px; }
  .disease-card .desc { font-size: 11px; display: none; }

  /* 统计卡片 */
  .stat-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
  }
  .stat-card {
    padding: 16px 12px;
    border-radius: 10px;
  }
  .stat-card .number { font-size: 28px; }
  .stat-card .label { font-size: 12px; margin-top: 4px; }

  .section-title { font-size: 16px; margin-bottom: 16px; }

  .page-container { padding: 12px; }

  /* CTA 区块 */
  .cta-section {
    padding: 20px 16px;
    border-radius: 10px;
    margin: 20px 0;
  }
  .cta-section h3 { font-size: 17px; margin-bottom: 8px; }
  .cta-section p { font-size: 13px; margin-bottom: 12px; }

  /* === 表格卡片化 === */
  .data-table, .data-table thead, .data-table tbody,
  .data-table th, .data-table td, .data-table tr {
    display: block;
  }
  .data-table thead { display: none; }
  .data-table tr {
    background: #fff;
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 12px 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: none;
  }
  .data-table td {
    border: none;
    padding: 4px 0;
    font-size: 13px;
    text-align: left !important;
  }
  .data-table td::before {
    content: attr(data-label);
    display: inline-block;
    width: 80px;
    color: #999;
    font-size: 12px;
    font-weight: 500;
  }
  .data-table .protein-name-cell {
    max-width: none;
    white-space: normal;
    overflow: visible;
  }
  .data-table .gene-link { font-size: 16px; }
  .data-table .tags-cell, .data-table .products-cell {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
  }

  /* PV 表格卡片化 */
  .pv-table tr { padding: 12px; }
  .pv-table td.pv-covered-genes {
    max-width: none;
    font-size: 12px;
  }
  .pv-best-row {
    background: #fffbe6 !important;
  }

  /* 筛选栏 */
  .filters-bar {
    padding: 12px;
    gap: 8px;
    margin-bottom: 12px;
    border-radius: 10px;
  }
  .filter-input, .filter-select {
    width: 100%;
    min-width: auto;
    height: 40px;
    font-size: 14px;
  }

  /* 分页 */
  .pagination { margin-top: 12px; padding: 8px; gap: 6px; }
  .pagination button { padding: 8px 16px; font-size: 13px; }
  .pagination .page-info { font-size: 12px; }

  /* === 蛋白详情页 === */
  .protein-header {
    padding: 20px 16px;
    margin-bottom: 12px;
    border-radius: 10px;
  }
  .protein-header h1 { font-size: 26px; }
  .protein-header .full-name { font-size: 14px; }
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 12px;
  }
  .detail-item { padding: 10px 12px; }

  .panel-cards {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 12px;
  }
  .panel-card { border-radius: 8px; }
  .panel-card-header { padding: 10px 14px; font-size: 14px; }
  .panel-card-body { padding: 8px 14px; }
  .panel-card-body .panel-item { font-size: 13px; padding: 6px 0; }

  /* 疾病页头部 */
  .disease-header {
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 10px;
  }
  .disease-header h2 { font-size: 18px; }
  .disease-header p { font-size: 13px; margin-top: 4px; }

  /* 面包屑 */
  .breadcrumb {
    font-size: 12px;
    margin-bottom: 10px;
  }

  /* === Panel 覆盖分析页 === */
  .pv-header {
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 10px;
  }
  .pv-header h2 { font-size: 18px; }
  .pv-header p { font-size: 13px; }

  .pv-input-section {
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 10px;
  }
  .pv-label { font-size: 13px; }
  .pv-textarea {
    font-size: 14px;
    padding: 12px;
    border-radius: 8px;
    min-height: 120px;
  }
  .pv-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 12px;
  }
  .pv-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    border-radius: 8px;
  }
  .pv-hint {
    text-align: center;
    font-size: 12px;
  }

  .pv-summary-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 12px;
  }
  .pv-card {
    padding: 14px 10px;
    border-radius: 10px;
  }
  .pv-card-num { font-size: 28px; }
  .pv-card-label { font-size: 12px; }

  .pv-section {
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 10px;
  }
  .pv-section h3 { font-size: 16px; margin-bottom: 12px; }

  .pv-matched-item {
    font-size: 12px;
    padding: 4px 8px;
  }
  .pv-unmatched-tag {
    font-size: 12px;
    padding: 4px 10px;
  }

  .pv-product-cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .pv-product-card {
    padding: 12px 14px;
    border-radius: 8px;
  }
  .pv-product-name { font-size: 14px; }
  .pv-product-count { font-size: 24px; }

  .pv-best-panel {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
  }
  .pv-best-badge { font-size: 13px; }
  .pv-best-info { font-size: 13px; }
  .pv-best-stat { font-size: 12px; }

  .pv-more { font-size: 12px; margin-top: 8px; }

  /* === 对比页 === */
  .compare-table td {
    padding: 4px 0 !important;
  }
  .compare-table .coverage-val { font-size: 15px; }
  .compare-table .coverage-pct { font-size: 12px; }

  .recommendation-card {
    padding: 14px 16px;
    margin-bottom: 12px;
    border-radius: 10px;
  }
  .recommendation-card p { font-size: 13px; line-height: 1.6; }

  /* === 数据概览页 === */
  .bar-chart {
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 10px;
  }
  .bar-chart h3 { font-size: 15px; margin-bottom: 12px; }
  .bar-row { margin-bottom: 6px; }
  .bar-label {
    width: 100px;
    font-size: 11px;
    padding-right: 8px;
  }
  .bar-track { height: 22px; }
  .bar-fill { padding-left: 6px; }
  .bar-fill span { font-size: 10px; }

  /* 相关蛋白推荐 */
  .related-section {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  }
  .related-section h3 { font-size: 15px; margin-bottom: 12px; }

  /* 空状态 */
  .empty-state { padding: 40px 20px; }

  /* Loading */
  .loading { padding: 60px 20px; }

  /* 移动端 PV 结果手风琴 Panel 卡片 */
  .mobile-panel-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .mobile-panel-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
  }
  .mobile-panel-card-header {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    cursor: pointer;
    gap: 10px;
  }
  .mobile-panel-rank {
    width: 24px;
    height: 24px;
    background: #f0f7ff;
    color: #1890ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
  }
  .mobile-panel-info { flex: 1; min-width: 0; }
  .mobile-panel-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-panel-product { font-size: 12px; color: #999; }
  .mobile-panel-rate {
    text-align: right;
    flex-shrink: 0;
  }
  .mobile-panel-rate-num { font-size: 16px; font-weight: 700; color: #1890ff; }
  .mobile-panel-rate-count { font-size: 11px; color: #999; }
  .mobile-panel-arrow {
    color: #ccc;
    font-size: 12px;
    margin-left: 8px;
    transition: transform 0.3s;
  }
  .mobile-panel-card.expanded .mobile-panel-arrow {
    transform: rotate(180deg);
  }
  .mobile-panel-card-body {
    display: none;
    padding: 0 14px 12px;
    border-top: 1px solid #f5f5f5;
    background: #fafafa;
  }
  .mobile-panel-card.expanded .mobile-panel-card-body { display: block; }
  .mobile-panel-genes {
    font-size: 12px;
    color: #666;
    line-height: 1.8;
    padding-top: 10px;
    word-break: break-all;
  }
  .mobile-panel-card.pv-best .mobile-panel-rank {
    background: #fffbe6;
    color: #d48806;
    border: 1px solid #ffd591;
  }
  .mobile-panel-card.pv-best .mobile-panel-rate-num { color: #d48806; }
}

@media (max-width: 480px) {
  .tab-bar { height: 56px; }
  .tab-icon { font-size: 20px; }
  .tab-label { font-size: 10px; }
  .tab-center-icon { width: 44px; height: 44px; top: -18px; font-size: 20px; }
  .tab-item.tab-center { padding-top: 26px; }
  .main-content { padding-bottom: 66px; }

  .pv-summary-cards { gap: 8px; }
  .pv-card { padding: 12px 8px; }
  .pv-card-num { font-size: 24px; }
  .pv-card-label { font-size: 11px; }
}

/* === 详情页 section 通用样式 === */
.detail-panels-section,
.detail-related-section {
  background: #fff;
  border-radius: 12px;
  padding: 16px 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.related-grid a { text-decoration: none; }
.related-grid > a > div {
  background: #fafafa;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  transition: all 0.2s;
  border: 1px solid #f0f0f0;
}
.related-grid > a > div:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.related-grid .gene-name { font-weight: 600; font-size: 16px; color: #1890ff; margin-bottom: 4px; }
.related-grid .protein-desc { font-size: 12px; color: #999; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 6px; }

.compare-panels-section {
  background: #fff;
  border-radius: 12px;
  padding: 16px 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stats-top-cards {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 32px;
}
