/* ============================================
   全国城市榜 - 独立样式（移动端照片撑满版）
   引入方式：<link rel="stylesheet" href="{pboot:sitedomain}/skin/css/city.css">
   ============================================ */

/* ===== 城市标签行 ===== */
.city-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.city-tag {
  display: inline-block;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #eee;
  white-space: nowrap;
  text-decoration: none;
  color: #222;
  transition: all 0.2s;
}
.city-tag:hover { border-color: #C4A882; color: #C4A882; }
.city-tag.active { background: #C4A882; color: #fff; border-color: transparent; }
.city-tag.other-tag { border-style: dashed; color: #999; background: #fafafa; }

/* ===== 城市面板 ===== */
.city-panel {
  background: #fff;
  border-radius: 6px;
  padding: 10px 12px;
  border: 1px solid #f0f0f0;
}

/* ===== 城市标题栏 ===== */
.city-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.city-header h3 { font-size: 14px; font-weight: 700; color: #1A1A1A; }
.city-header small { font-size: 10px; color: #C4A882; margin-left: 4px; font-weight: 500; }
.city-online { font-size: 10px; color: #4CAF50; font-weight: 600; }

/* ===== 城市列表 - PC 4列 ===== */
.city-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

/* ===== 城市卡片 ===== */
.city-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 6px 8px;
  border-radius: 6px;
  text-decoration: none;
  color: #222;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.city-card:hover { background: #FDFBF7; border-color: #f0ece6; }

/* ===== 排名数字 ===== */
.city-rank {
  width: 18px; height: 18px; line-height: 18px;
  text-align: center; font-size: 10px; font-weight: 700;
  border-radius: 50%; background: #f5f5f5; color: #999;
  margin-bottom: 5px;
}
.city-rank.r1 { background: linear-gradient(135deg, #FFD700, #FFA500); color: #fff; }
.city-rank.r2 { background: linear-gradient(135deg, #E8E8E8, #B0B0B0); color: #fff; }
.city-rank.r3 { background: linear-gradient(135deg, #E8A862, #CD7F32); color: #fff; }

/* ===== 照片 PC：固定大尺寸 ===== */
.city-photo {
  width: 90px; height: 90px;
  border-radius: 50%; overflow: hidden;
  background: #E8E6E3; border: 2px solid #f0f0f0;
  margin-bottom: 6px;
}
.city-photo img { width: 100%; height: 100%; object-fit: cover; }
.city-rank.r1 ~ .city-photo { border-color: #FFD700; }

/* ===== 信息 ===== */
.city-info h5 {
  font-size: 12px; font-weight: 700; color: #1A1A1A;
  margin-bottom: 2px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.city-info span { font-size: 10px; color: #C4A882; font-weight: 500; }

/* ===== 平板：3列 ===== */
@media (max-width: 1024px) {
  .city-list { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .city-card { padding: 8px 5px 6px; }
  .city-photo { width: 80px; height: 80px; }
}

/* ===== 手机：2列 · 照片撑满 ===== */
@media (max-width: 768px) {
  .city-row { gap: 4px; }
  .city-tag { padding: 3px 8px; font-size: 10px; border-radius: 12px; }
  .city-panel { padding: 6px 8px; border-radius: 4px; }
  .city-header { margin-bottom: 6px; }
  .city-header h3 { font-size: 13px; }

  .city-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .city-card {
    padding: 8px 4px 6px;
    border-radius: 4px;
  }

  /* 照片撑满卡片宽度 */
  .city-photo {
    width: 85%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    margin-bottom: 6px;
  }

  .city-info h5 { font-size: 11px; }
  .city-info span { font-size: 10px; }
  .city-rank { width: 16px; height: 16px; line-height: 16px; font-size: 9px; margin-bottom: 4px; }
}