/* Challenge Coin - Common Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  background: #0f0c29;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  min-height: 100vh;
  color: #fff;
}
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px;
}
/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s, opacity 0.15s;
  text-align: center;
  width: 100%;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
}
.btn-gold {
  background: linear-gradient(135deg, #f7971e, #ffd200);
  color: #333;
}
.btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: #ccc;
}
.btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}
/* Cards */
.game-card {
  display: block;
  text-decoration: none;
  color: #fff;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 20px;
  transition: transform 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.game-card:active {
  transform: scale(0.97);
  background: rgba(255,255,255,0.14);
}
.game-card.disabled {
  opacity: 0.35;
  pointer-events: none;
}
.game-icon { font-size: 32px; margin-bottom: 8px; }
.game-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.game-desc { font-size: 12px; color: #bbb; line-height: 1.5; }
.game-tag {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  background: rgba(255,255,255,0.12);
  padding: 3px 8px;
  border-radius: 20px;
  color: #ccc;
}
/* Section headers */
.section-title {
  font-size: 15px;
  font-weight: 700;
  margin: 24px 0 12px;
  padding-left: 10px;
  border-left: 3px solid #667eea;
}
.section-title.gold {
  border-left-color: #ffd700;
  color: #ffd700;
}
/* Tabs */
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
}
.tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255,255,255,0.05);
  color: #999;
  transition: all 0.2s;
  border: none;
  -webkit-tap-highlight-color: transparent;
}
.tab.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
/* Input fields */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  color: #aaa;
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 16px;
  outline: none;
  -webkit-appearance: none;
}
.form-input:focus {
  border-color: #667eea;
  background: rgba(255,255,255,0.12);
}
.form-select {
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  background: #2a2a4a;
  color: #fff;
  font-size: 16px;
  outline: none;
}
/* Ranking */
.ranking-list { margin-top: 12px; }
.ranking-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  gap: 10px;
}
.ranking-rank {
  font-size: 14px;
  font-weight: 700;
  width: 28px;
  text-align: center;
  color: #888;
}
.ranking-rank.top1 { color: #ffd700; }
.ranking-rank.top2 { color: #c0c0c0; }
.ranking-rank.top3 { color: #cd7f32; }
.ranking-icon { font-size: 22px; }
.ranking-name { flex: 1; font-size: 14px; }
.ranking-coins { font-size: 14px; font-weight: 700; color: #ffd700; }
/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: #1a1a3e;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 28px;
  max-width: 340px;
  width: 90%;
  text-align: center;
}
/* Coin display */
.coin-display {
  font-size: 28px;
  font-weight: 700;
  color: #ffd700;
  text-align: center;
}
.coin-icon { margin-right: 4px; }
/* Utilities */
.text-center { text-align: center; }
.text-muted { color: #888; font-size: 13px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.gap-12 { display: flex; flex-direction: column; gap: 12px; }
.error-msg {
  color: #ff6b6b;
  font-size: 13px;
  margin-top: 8px;
  text-align: center;
  min-height: 20px;
}
