/* ========== guess-history 我的竞猜 ========== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: #F5F5F8;
  color: #1a1a1a;
  padding-bottom: calc(var(--tab-bar-height) + var(--safe-bottom) + 16px);
  -webkit-font-smoothing: antialiased;
}

/* ========== 顶部导航 ========== */
.gh-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center;
  padding: 0 16px; height: 48px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.gh-back {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #333; font-size: 16px; cursor: pointer;
  text-decoration: none; flex-shrink: 0;
  transition: background 0.15s; border: none; background: none;
}
.gh-back:active { background: #f0f0f0; }
.gh-header-title {
  flex: 1; text-align: center;
  font-size: 17px; font-weight: 700; color: #1a1a1a;
}
.gh-header-actions {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #555; font-size: 15px; cursor: pointer;
  text-decoration: none; border: none; background: none;
}
.gh-header-actions:active { background: #f0f0f0; }

/* ========== 数据英雄区 ========== */
.gh-hero {
  margin: 12px 14px 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  border-radius: 18px;
  padding: 24px 20px;
  position: relative;
  overflow: hidden;
  color: #fff;
}
.gh-hero::before {
  content: '';
  position: absolute; top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  animation: heroPulse 3s ease-in-out infinite;
}
.gh-hero::after {
  content: '';
  position: absolute; bottom: -20px; left: 30%;
  width: 80px; height: 80px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  animation: heroPulse 4s ease-in-out infinite 1s;
}
@keyframes heroPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
}
.gh-hero-title {
  font-size: 13px; font-weight: 600;
  opacity: 0.8; margin-bottom: 16px;
  display: flex; align-items: center; gap: 6px;
}
.gh-hero-title i { font-size: 14px; }

/* 数据统计网格 */
.gh-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; position: relative; z-index: 1;
}
.gh-stat-item {
  text-align: center;
  background: rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 12px 4px;
  backdrop-filter: blur(10px);
  transition: transform 0.2s;
  cursor: default;
}
.gh-stat-item:hover { transform: translateY(-2px); }
.gh-stat-val {
  font-size: 22px; font-weight: 900;
  line-height: 1.1;
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gh-stat-val.accent-green {
  background: linear-gradient(180deg, #a8ff78 0%, #78ffd6 100%);
  -webkit-background-clip: text; background-clip: text;
}
.gh-stat-val.accent-gold {
  background: linear-gradient(180deg, #ffd700 0%, #ffaa00 100%);
  -webkit-background-clip: text; background-clip: text;
}
.gh-stat-lbl {
  font-size: 10px; font-weight: 500;
  opacity: 0.65; margin-top: 4px;
}

/* 胜率环形进度 */
.gh-win-ring {
  margin-top: 18px; position: relative; z-index: 1;
  display: flex; align-items: center; gap: 16px;
  background: rgba(255,255,255,0.08);
  border-radius: 14px; padding: 14px 16px;
}
.gh-ring-svg {
  width: 56px; height: 56px; flex-shrink: 0;
  transform: rotate(-90deg);
}
.gh-ring-bg { fill: none; stroke: rgba(255,255,255,0.15); stroke-width: 6; }
.gh-ring-fill {
  fill: none; stroke: url(#ringGrad); stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4,0,0.2,1);
}
.gh-ring-info { flex: 1; }
.gh-ring-pct {
  font-size: 20px; font-weight: 900; letter-spacing: -0.5px;
}
.gh-ring-detail {
  font-size: 11px; opacity: 0.6; margin-top: 2px;
}
.gh-ring-bar {
  margin-top: 6px; display: flex; height: 4px;
  border-radius: 2px; overflow: hidden;
}
.gh-ring-bar-win {
  background: linear-gradient(90deg, #a8ff78, #78ffd6);
  transition: width 1.2s ease;
}
.gh-ring-bar-loss {
  background: rgba(255,255,255,0.15);
  flex: 1;
}

/* ========== Tab标签栏 ========== */
.gh-tabs {
  display: flex; gap: 0;
  padding: 12px 14px 0;
  overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  position: sticky; top: 48px; z-index: 50;
  background: #F5F5F8;
  padding-bottom: 10px;
}
.gh-tabs::-webkit-scrollbar { display: none; }
.gh-tab {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px; font-weight: 600;
  color: #888; background: #fff;
  cursor: pointer;
  transition: all 0.25s;
  border: 1px solid #eee;
  margin-right: 8px;
  white-space: nowrap;
  position: relative;
}
.gh-tab:active { transform: scale(0.96); }
.gh-tab.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff; border-color: transparent;
  box-shadow: 0 3px 12px rgba(102,126,234,0.3);
}
.gh-tab .gh-tab-dot {
  position: absolute; top: -2px; right: -2px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #FF3B30; border: 2px solid #F5F5F8;
  display: none;
}
.gh-tab .gh-tab-dot.show { display: block; }
.gh-tab-count {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px; font-weight: 800;
  background: rgba(255,255,255,0.25);
  padding: 1px 6px; border-radius: 8px;
}
.gh-tab.active .gh-tab-count {
  background: rgba(255,255,255,0.3);
}
.gh-tab:not(.active) .gh-tab-count {
  background: #f0f0f0; color: #999;
}

/* ========== 记录列表区 ========== */
.gh-records {
  padding: 4px 14px 16px;
}

/* ===== 正在进行 - 活跃竞猜卡片 ===== */
.gh-active-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid #f0f0f0;
  transition: transform 0.15s;
  cursor: pointer;
  position: relative;
}
.gh-active-card:active { transform: scale(0.99); }
.gh-active-card .gh-ac-live {
  position: absolute; top: 12px; left: 12px;
  display: flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 12px;
  background: rgba(255,59,48,0.9);
  color: #fff; font-size: 10px; font-weight: 700;
  z-index: 2;
  animation: liveBlink 1.5s ease-in-out infinite;
}
@keyframes liveBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.gh-ac-live .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #fff;
  animation: liveDot 1s ease-in-out infinite;
}
@keyframes liveDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.gh-ac-img {
  width: 100%; height: 140px;
  object-fit: cover; display: block;
}
.gh-ac-body { padding: 14px; }
.gh-ac-title {
  font-size: 15px; font-weight: 700; color: #1a1a1a;
  line-height: 1.4; margin-bottom: 8px;
}
.gh-ac-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; color: #999; margin-bottom: 10px;
}
.gh-ac-meta i { font-size: 10px; }

/* 我的选择标签 */
.gh-ac-choice {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(102,126,234,0.08), rgba(118,75,162,0.08));
  color: #667eea; font-size: 12px; font-weight: 600;
  margin-bottom: 10px;
}

/* 倒计时 */
.gh-ac-countdown {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: #FF5722; font-weight: 700;
}
.gh-ac-countdown .cd-box {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 22px; padding: 0 4px;
  background: linear-gradient(135deg, #FF5722, #FF9800);
  color: #fff; border-radius: 5px;
  font-size: 11px; font-weight: 800;
}
.gh-ac-countdown .cd-sep {
  font-size: 11px; font-weight: 800; color: #FF5722;
}

/* 进度条 */
.gh-ac-progress { margin-top: 10px; }
.gh-ac-opts {
  display: flex; justify-content: space-between;
  font-size: 11px; margin-bottom: 4px;
}
.gh-ac-opts .opt-a { color: #667eea; font-weight: 600; }
.gh-ac-opts .opt-b { color: #f093fb; font-weight: 600; }
.gh-ac-bar {
  display: flex; height: 6px; border-radius: 3px;
  overflow: hidden; background: #f0f0f0;
}
.gh-ac-bar-a {
  background: linear-gradient(90deg, #667eea, #764ba2);
  transition: width 0.8s ease;
  border-radius: 3px;
}

/* ===== 历史记录卡片 ===== */
.gh-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: transform 0.15s;
  animation: cardSlideIn 0.4s ease both;
}
.gh-card:nth-child(1) { animation-delay: 0s; }
.gh-card:nth-child(2) { animation-delay: 0.06s; }
.gh-card:nth-child(3) { animation-delay: 0.12s; }
.gh-card:nth-child(4) { animation-delay: 0.18s; }
.gh-card:nth-child(5) { animation-delay: 0.24s; }
@keyframes cardSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.gh-card:active { transform: scale(0.99); }
.gh-card-left {
  width: 4px; position: absolute; top: 0; bottom: 0; left: 0;
}
.gh-card.won { border-left: 4px solid #34C759; }
.gh-card.lost { border-left: 4px solid #FF9500; }

.gh-card-header {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 14px 0;
}
.gh-result-badge {
  padding: 3px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.gh-result-badge.won { background: linear-gradient(135deg, #34C759, #30D158); }
.gh-result-badge.lost { background: linear-gradient(135deg, #FF9500, #FF6B00); }
.gh-card-title {
  flex: 1; font-size: 14px; font-weight: 700; color: #1a1a1a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gh-card-date { font-size: 11px; color: #bbb; flex-shrink: 0; }

.gh-card-body { padding: 10px 14px 14px; }
.gh-card-rows { display: flex; flex-direction: column; gap: 6px; }
.gh-card-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
}
.gh-card-label { color: #999; }
.gh-card-value { font-weight: 600; color: #333; }
.gh-card-value.correct { color: #34C759; }
.gh-card-value.wrong { color: #FF9500; }

.gh-card-reward {
  margin-top: 8px; padding: 8px 12px;
  border-radius: 10px; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.gh-card-reward.won {
  background: linear-gradient(135deg, rgba(52,199,89,0.06), rgba(48,209,88,0.06));
  color: #34C759;
}
.gh-card-reward.lost {
  background: linear-gradient(135deg, rgba(255,149,0,0.06), rgba(255,107,0,0.06));
  color: #FF9500;
}

/* ===== PK记录卡片 ===== */
.gh-pk-card {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 10px;
  color: #fff;
  position: relative;
  overflow: hidden;
  animation: cardSlideIn 0.4s ease both;
}
.gh-pk-card::before {
  content: '⚡';
  position: absolute; top: -8px; right: 10px;
  font-size: 40px; opacity: 0.06;
}
.gh-pk-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.gh-pk-title { font-size: 14px; font-weight: 700; }
.gh-pk-result {
  padding: 3px 10px; border-radius: 12px;
  font-size: 10px; font-weight: 800; color: #fff;
}
.gh-pk-result.won { background: linear-gradient(135deg, #34C759, #30D158); }
.gh-pk-result.lost { background: linear-gradient(135deg, #FF9500, #FF6B00); }

.gh-pk-vs {
  display: flex; align-items: center; gap: 12px;
}
.gh-pk-player {
  flex: 1; text-align: center;
}
.gh-pk-player img {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  margin-bottom: 4px;
}
.gh-pk-player .pk-name {
  font-size: 11px; font-weight: 600;
}
.gh-pk-player .pk-choice {
  font-size: 10px; opacity: 0.5; margin-top: 2px;
}
.gh-pk-vs-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #FF5722, #FF9800);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(255,87,34,0.4);
  animation: vsBounce 2s ease-in-out infinite;
}
@keyframes vsBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
.gh-pk-footer {
  text-align: center; margin-top: 12px;
  font-size: 11px; opacity: 0.4;
}

/* ===== 空状态 ===== */
.gh-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 60px 20px; text-align: center;
}
.gh-empty-ico {
  width: 72px; height: 72px; border-radius: 50%;
  background: #f0f0f0;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; margin-bottom: 14px;
}
.gh-empty-t1 { font-size: 14px; color: #999; font-weight: 600; }
.gh-empty-t2 { font-size: 12px; color: #ccc; margin-top: 4px; }
.gh-empty-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 20px; height: 36px; padding: 0 22px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none; border-radius: 18px;
  color: #fff; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: transform 0.15s;
  box-shadow: 0 3px 12px rgba(102,126,234,0.3);
}
.gh-empty-btn:active { transform: scale(0.94); }

/* ===== 入场动画 ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.anim { animation: fadeUp 0.4s ease both; }
.anim-1 { animation-delay: 0.08s; }
.anim-2 { animation-delay: 0.16s; }

/* ===== 数字滚动动画 ===== */
.num-animate {
  display: inline-block;
  animation: numPop 0.6s cubic-bezier(0.4,0,0.2,1) both;
}
@keyframes numPop {
  0% { opacity: 0; transform: scale(0.5) translateY(10px); }
  60% { transform: scale(1.1) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== 连胜/连败标记 ===== */
.gh-streak-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 8px;
  font-size: 10px; font-weight: 700;
  margin-left: 6px;
}
.gh-streak-badge.win {
  background: linear-gradient(135deg, rgba(52,199,89,0.1), rgba(48,209,88,0.1));
  color: #34C759;
}
.gh-streak-badge.loss {
  background: linear-gradient(135deg, rgba(255,149,0,0.1), rgba(255,107,0,0.1));
  color: #FF9500;
}

/* ===== 加载更多 ===== */
.gh-load-more-btn {
  display: inline-block;
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 600;
  color: #667eea;
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}
.gh-load-more-btn:hover:not(:disabled) {
  background: rgba(102, 126, 234, 0.2);
}
.gh-load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== 骨架屏 ===== */
.gh-skeleton { padding: 0 14px; }
.gh-skeleton.is-hidden { display: none !important; }
.gh-content.is-hidden { display: none !important; }

.gh-sk-hero {
  margin-top: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  border-radius: 18px;
  padding: 24px 20px;
}
.gh-sk-title {
  height: 14px; width: 120px;
  background: rgba(255,255,255,0.2); border-radius: 6px;
  margin-bottom: 16px;
}
.gh-sk-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.gh-sk-stat {
  height: 48px; background: rgba(255,255,255,0.15);
  border-radius: 12px;
}
.gh-sk-ring {
  margin-top: 18px;
  display: flex; align-items: center; gap: 16px;
  background: rgba(255,255,255,0.08);
  border-radius: 14px; padding: 14px 16px;
}
.gh-sk-ring-circle {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}
.gh-sk-ring-info { flex: 1; }
.gh-sk-line {
  height: 12px; background: rgba(255,255,255,0.15);
  border-radius: 4px; margin-bottom: 6px;
  width: 80%;
}
.gh-sk-line.short { width: 50%; height: 10px; }
.gh-sk-bar {
  height: 4px; background: rgba(255,255,255,0.15);
  border-radius: 2px; margin-top: 8px;
}
.gh-sk-tabs {
  display: flex; gap: 8px;
  padding: 12px 0 10px;
}
.gh-sk-tab {
  display: inline-block;
  width: 56px; height: 32px;
  background: #e8e8e8; border-radius: 20px;
  flex-shrink: 0;
}
.gh-sk-list { padding: 4px 0 16px; }
.gh-sk-card {
  background: #fff; border-radius: 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  overflow: hidden;
}
.gh-sk-card-head {
  height: 40px; background: #f5f5f5;
  margin: 14px 14px 0;
  border-radius: 6px;
}
.gh-sk-card-body {
  padding: 10px 14px 14px;
}
.gh-sk-card-body span {
  display: block;
  height: 12px; background: #f0f0f0;
  border-radius: 4px; margin-bottom: 8px;
  width: 60%;
}
.gh-sk-card-body span:last-child { width: 40%; margin-bottom: 0; }

.gh-sk-hero .gh-sk-title,
.gh-sk-stat, .gh-sk-ring-circle, .gh-sk-line, .gh-sk-bar,
.gh-sk-tab, .gh-sk-card-head, .gh-sk-card-body span {
  animation: ghSkPulse 1.5s ease-in-out infinite;
}
@keyframes ghSkPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
