/**
 * bird-atlas.css - 鸟类图鉴样式
 * 匹配现有 iOS/微信粉色主题
 */

/* ===== 搜索框 ===== */
.atlas-search-wrap {
  margin-bottom: 12px;
}
.atlas-search-input {
  width: 100%;
  padding: 10px 16px;
  border: 1.5px solid #f0f0f0;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  background: #fafafa;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.atlas-search-input:focus {
  border-color: var(--accent, #ff6b81);
  background: #fff;
}

/* ===== 筛选标签 ===== */
.atlas-filter-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.atlas-filter-tag {
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  border: 1.5px solid #e8e8e8;
  background: #fff;
  color: #888;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.atlas-filter-tag:active {
  transform: scale(0.95);
}

/* ===== 统计 ===== */
.atlas-stats {
  font-size: 11px;
  color: #aaa;
  font-weight: 600;
  text-align: center;
  margin-bottom: 12px;
}

/* ===== 物种网格 ===== */
.atlas-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 480px) {
  .atlas-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== 物种卡片 ===== */
.atlas-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 14px 10px 10px;
  text-align: center;
  border: 1.5px solid #f0f0f0;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
}
.atlas-card:active {
  transform: scale(0.96);
  border-color: var(--accent, #ff6b81);
}
.atlas-card-emoji {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 6px;
}
.atlas-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main, #333);
  margin-bottom: 2px;
}
.atlas-card-sci {
  font-size: 10px;
  color: #bbb;
  font-style: italic;
  font-weight: 600;
}
.atlas-iucn-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 8px;
  letter-spacing: 0.5px;
}
.atlas-prot-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 14px;
}

/* ===== 空状态 ===== */
.atlas-empty {
  text-align: center;
  padding: 40px 20px;
  color: #aaa;
  font-size: 14px;
  font-weight: 600;
}

/* ===== 底部图例 ===== */
.atlas-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
  font-size: 10px;
  line-height: 2;
  text-align: center;
}
.atlas-legend-item {
  display: inline-block;
  margin: 0 4px;
  font-weight: 700;
}

/* ===== 详情页 ===== */
.atlas-back {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(102,126,234,0.1);
  color: #667eea;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 12px;
  user-select: none;
}
.atlas-back:active {
  transform: scale(0.95);
}

.atlas-detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border-radius: 18px;
  margin-bottom: 14px;
}
.atlas-detail-emoji {
  font-size: 52px;
  line-height: 1;
}
.atlas-detail-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main, #333);
}
.atlas-detail-sci {
  font-size: 13px;
  color: #888;
  font-style: italic;
  font-weight: 600;
  margin-top: 2px;
}

.atlas-detail-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 10px;
}
.atlas-detail-status-icon {
  font-size: 22px;
  font-weight: 900;
  min-width: 40px;
  text-align: center;
}

.atlas-detail-prot {
  padding: 8px 14px;
  background: rgba(230,126,34,0.08);
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 14px;
}

.atlas-info-row {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: #fafafa;
  border-radius: 12px;
  margin-bottom: 8px;
  align-items: flex-start;
}
.atlas-info-icon {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1.4;
}
.atlas-info-label {
  font-size: 11px;
  color: #aaa;
  font-weight: 700;
  margin-bottom: 2px;
}
.atlas-info-value {
  font-size: 13px;
  color: var(--text-main, #333);
  font-weight: 600;
  line-height: 1.5;
}

.atlas-detail-desc {
  padding: 14px 16px;
  background: linear-gradient(135deg, #fff8f0 0%, #fff0f3 100%);
  border-radius: 14px;
  margin-top: 10px;
}
.atlas-desc-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent, #ff6b81);
  margin-bottom: 8px;
}
.atlas-desc-text {
  font-size: 13px;
  color: var(--text-main, #333);
  line-height: 1.7;
  font-weight: 600;
}

/* ===== 深色模式 ===== */
body.dark-mode .atlas-search-input {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  color: #e8e8e8;
}
body.dark-mode .atlas-filter-tag {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  color: #aaa;
}
body.dark-mode .atlas-card {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.08);
}
body.dark-mode .atlas-detail-header {
  background: rgba(255,255,255,0.05) !important;
}
body.dark-mode .atlas-info-row {
  background: rgba(255,255,255,0.04);
}
body.dark-mode .atlas-detail-desc {
  background: rgba(255,255,255,0.04);
}
body.dark-mode .atlas-back {
  background: rgba(102,126,234,0.15);
}

/* ===== 响应式 ===== */
@media (max-width: 360px) {
  .atlas-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .atlas-card-emoji {
    font-size: 30px;
  }
  .atlas-card-name {
    font-size: 12px;
  }
}
