/* ============================================================
   "谁更夯" · PK 排行小游戏样式
   主题色 #2a5aa8，延续站内活泼可爱调性
   ============================================================ */

/* ---------- Hero 区域 ---------- */
.hang-hero {
  text-align: center;
  padding: 40px 16px 32px;
  background: linear-gradient(135deg, #2a5aa8 0%, #4a8fe8 100%);
  border-radius: var(--radius, 12px);
  color: #fff;
  margin-bottom: 24px;
}
.hang-hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.2);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: .85em;
  margin-bottom: 12px;
}
.hang-hero-title {
  font-size: 2.2em;
  font-weight: 900;
  margin: 0 0 8px;
  letter-spacing: 2px;
}
.hang-hero-desc {
  font-size: .95em;
  opacity: .9;
  line-height: 1.6;
  margin-bottom: 20px;
}
.hang-btn-cta {
  display: inline-block;
  padding: 14px 48px;
  background: #fff;
  color: #2a5aa8;
  border: none;
  border-radius: 30px;
  font-size: 1.2em;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  transition: transform .15s, box-shadow .15s;
}
.hang-btn-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,.2); }
.hang-btn-cta:active { transform: scale(.97); }
.hang-btn-cta:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ---------- Section ---------- */
.hang-section { margin-bottom: 28px; }
.hang-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.hang-section-header h2 { font-size: 1.2em; margin: 0; }
.hang-link { color: #2a5aa8; font-size: .9em; text-decoration: none; }

/* ---------- Leaderboard Preview ---------- */
.hang-lb-preview { display: flex; flex-direction: column; gap: 8px; }
.hang-lb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--border, #e8e8e8);
  border-radius: var(--radius, 10px);
}
.hang-lb-rank {
  width: 28px;
  text-align: center;
  font-weight: 800;
  font-size: 1em;
  flex-shrink: 0;
}
.hang-lb-rank.gold { color: #f5a623; }
.hang-lb-rank.silver { color: #999; }
.hang-lb-rank.bronze { color: #cd7f32; }
.hang-lb-img {
  width: 44px; height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.hang-lb-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: #2a5aa8; color: #fff; font-weight: 700; font-size: 1.1em;
}
.hang-lb-info { flex: 1; min-width: 0; }
.hang-lb-name { font-weight: 700; font-size: .95em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hang-lb-meta { font-size: .78em; color: #888; margin-top: 2px; }
.hang-lb-score { font-weight: 800; color: #2a5aa8; font-size: 1em; flex-shrink: 0; }

/* ---------- Comments Preview ---------- */
.hang-comments-preview { display: flex; flex-direction: column; gap: 8px; }
.hang-comment-card {
  padding: 12px;
  background: #fff;
  border: 1px solid var(--border, #e8e8e8);
  border-radius: var(--radius, 10px);
}
.hang-comment-head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.hang-comment-author { font-weight: 700; font-size: .9em; }
.hang-comment-item { font-size: .78em; color: #888; }
.hang-comment-body { font-size: .9em; line-height: 1.5; color: #333; }

/* ---------- Login Modal ---------- */
.hang-modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
}
.hang-modal-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.5);
}
.hang-modal-box {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 12px 40px rgba(0,0,0,.2);
  text-align: center;
}
.hang-modal-box h3 { margin: 0 0 16px; color: #2a5aa8; }
.hang-modal-box input {
  display: block; width: 100%; box-sizing: border-box;
  padding: 12px; margin-bottom: 10px;
  border: 1.5px solid #ddd; border-radius: 10px;
  font-size: 1em;
}
.hang-modal-box input:focus { border-color: #2a5aa8; outline: none; }
.hang-modal-sub { font-size: .85em; color: #888; margin-top: 12px; }
.hang-modal-sub a { color: #2a5aa8; }
.hang-modal-close {
  position: absolute; top: 10px; right: 14px;
  background: none; border: none; font-size: 1.5em; color: #999; cursor: pointer;
}
.hang-error { color: #e53935; font-size: .85em; margin: 6px 0; }

/* ---------- Buttons ---------- */
.hang-btn-primary {
  display: inline-block;
  padding: 12px 28px;
  background: #2a5aa8; color: #fff;
  border: none; border-radius: 24px;
  font-size: 1em; font-weight: 700;
  cursor: pointer; transition: background .15s;
}
.hang-btn-primary:hover { background: #1e4a8a; }
.hang-btn-secondary {
  display: inline-block;
  padding: 10px 24px;
  background: #fff; color: #2a5aa8;
  border: 2px solid #2a5aa8; border-radius: 24px;
  font-size: .95em; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: background .15s;
}
.hang-btn-secondary:hover { background: #f0f6ff; }
.hang-btn-ghost {
  display: inline-block;
  padding: 10px 24px;
  background: transparent; color: #666;
  border: 1.5px solid #ddd; border-radius: 24px;
  font-size: .95em; text-decoration: none;
}
.hang-btn-sm { padding: 8px 20px; font-size: .9em; }

/* ---------- PK Game Area ---------- */
.hang-progress-bar {
  position: relative;
  height: 32px;
  background: #e8e8e8;
  border-radius: 16px;
  margin-bottom: 20px;
  overflow: hidden;
}
.hang-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2a5aa8, #4a8fe8);
  border-radius: 16px;
  transition: width .3s ease;
  width: 0%;
}
.hang-progress-text {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9em; color: #333;
}
.hang-pk-area {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 20px;
}
.hang-vs {
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5em; font-weight: 900; color: #2a5aa8;
  flex-shrink: 0; width: 40px;
}
.hang-card {
  flex: 1;
  position: relative;
  background: #fff;
  border: 2px solid var(--border, #e8e8e8);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.hang-card:hover { border-color: #2a5aa8; box-shadow: 0 4px 16px rgba(42,90,168,.15); }
.hang-card:active { transform: scale(.97); }
.hang-card-chosen { border-color: #4caf50 !important; box-shadow: 0 0 0 3px rgba(76,175,80,.3) !important; }
.hang-card-lost { opacity: .5; border-color: #ddd !important; }
.hang-card-wiki {
  position: absolute; top: 8px; right: 8px;
  z-index: 10;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.9);
  border-radius: 50%;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  transition: transform .15s;
}
.hang-card-wiki:hover { transform: scale(1.15); }
.hang-card-img-wrap {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #f5f5f5;
}
.hang-card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hang-card-name {
  padding: 10px 12px 4px;
  font-weight: 800;
  font-size: 1em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hang-card-cat {
  padding: 0 12px 10px;
  font-size: .78em;
  color: #888;
  text-align: center;
}
.hang-msg {
  text-align: center;
  padding: 20px;
  color: #666;
  font-size: .95em;
}
.hang-msg.hang-error { color: #e53935; }

/* ---------- Result Page ---------- */
.hang-report-card {
  background: linear-gradient(135deg, #2a5aa8 0%, #4a8fe8 100%);
  border-radius: 16px;
  padding: 28px 24px;
  color: #fff;
  text-align: center;
  margin-bottom: 20px;
}
.hang-report-header { font-size: 1.3em; font-weight: 800; margin-bottom: 16px; }
.hang-report-label { font-size: .85em; opacity: .8; margin-bottom: 6px; }
.hang-report-picks-list { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.hang-report-pick-item {
  background: rgba(255,255,255,.2);
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: .95em;
}
.hang-tag {
  display: inline-block;
  background: rgba(255,255,255,.15);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: .85em;
  margin: 2px;
}
.hang-report-footer { margin-top: 16px; font-size: .78em; opacity: .6; }
.hang-result-actions {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  margin-bottom: 28px;
}

/* ---------- Comment Section ---------- */
.hang-comment-section h3 { margin: 0 0 12px; font-size: 1.1em; }
.hang-comment-items { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.hang-comment-item-btn {
  padding: 8px 16px;
  border: 1.5px solid #ddd;
  border-radius: 20px;
  background: #fff;
  font-size: .9em;
  cursor: pointer;
  transition: all .15s;
}
.hang-comment-item-btn.active { border-color: #2a5aa8; background: #f0f6ff; color: #2a5aa8; font-weight: 700; }
.hang-comment-section textarea {
  display: block; width: 100%; box-sizing: border-box;
  padding: 12px; margin-bottom: 10px;
  border: 1.5px solid #ddd; border-radius: 10px;
  font-size: .95em; resize: vertical; min-height: 80px;
  font-family: inherit;
}
.hang-comment-section textarea:focus { border-color: #2a5aa8; outline: none; }

/* ---------- Empty / Loading ---------- */
.hang-empty { text-align: center; padding: 24px; color: #999; font-size: .95em; }
.hang-loading { text-align: center; padding: 24px; color: #999; }

/* ---------- Mobile Responsive ---------- */
@media (max-width: 600px) {
  .hang-hero-title { font-size: 1.6em; }
  .hang-btn-cta { padding: 12px 36px; font-size: 1.05em; }
  .hang-pk-area { gap: 8px; }
  .hang-vs { width: 28px; font-size: 1.1em; }
  .hang-card-name { font-size: .88em; padding: 8px 8px 2px; }
  .hang-card-cat { padding: 0 8px 8px; font-size: .72em; }
  .hang-card-wiki { width: 26px; height: 26px; font-size: 13px; top: 6px; right: 6px; }
  .hang-result-actions { flex-direction: column; align-items: stretch; }
  .hang-result-actions a, .hang-result-actions button { text-align: center; }
}
