*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

:root {
  --bg: #0a0a0f;
  --surface: #141420;
  --primary: #e94560;
  --secondary: #0f3460;
  --accent: #16c79a;
  --gold: #f0c040;
  --gem: #a855f7;
  --text: #e0e0e0;
  --text-dim: #888;
  --danger: #e94560;
  --hp-color: #00e676;
  --hp-bg: #333;
}

body {
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  user-select: none;
  -webkit-user-select: none;
}

#app {
  width: 100%;
  height: 100%;
  position: relative;
}

/* Screens */
.screen {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0; left: 0;
  z-index: 10;
}
.hidden { display: none; }
.screen.hidden { display: none; }
.screen.overlay {
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(4px);
  z-index: 100;
}

/* Main Menu */
#main-menu { z-index: 50; }
.menu-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a0f 70%);
  z-index: -1;
}
.menu-content {
  text-align: center;
  max-width: 420px;
  width: 90%;
  animation: fadeInUp 0.6s ease;
}
@keyframes fadeInUp {
  from { opacity:0; transform: translateY(30px); }
  to { opacity:1; transform: translateY(0); }
}
.game-title {
  font-size: 3rem;
  background: linear-gradient(135deg, var(--primary), #ff6b6b, var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
  text-shadow: none;
}
.subtitle {
  color: var(--text-dim);
  letter-spacing: 8px;
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.menu-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 28px;
  font-size: 0.95rem;
  flex-wrap: wrap;
}
.menu-stats span { background: var(--surface); padding: 6px 14px; border-radius: 20px; }
.menu-stats strong { color: var(--gold); }

.menu-controls-hint {
  margin-top: 20px;
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.8;
}

/* Buttons */
.btn {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 10px auto;
  padding: 14px 24px;
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  color: white;
  letter-spacing: 1px;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.4); }
.btn:active { transform: translateY(0); }
.btn-play {
  background: linear-gradient(135deg, var(--primary), #c0392b);
  font-size: 1.3rem;
  padding: 18px;
  margin: 16px auto;
}
.btn-shop { background: var(--secondary); }
.btn-daily { background: #e67e22; }
.btn-skins { background: #8e44ad; }
.btn-resume { background: var(--accent); }
.btn-quit { background: #555; }
.btn-back { background: #555; margin-top: 20px; }
.btn-death-quit { background: #555; margin-top: 24px; }

/* Death Screen */
.death-title {
  font-size: 2.2rem;
  color: var(--danger);
  margin-bottom: 16px;
  animation: pulse 0.5s ease infinite alternate;
}
@keyframes pulse {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}
.death-stats {
  background: var(--surface);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  text-align: left;
  line-height: 2;
}
.death-stats strong { color: var(--gold); }
.revive-options { margin-bottom: 12px; }
.revive-prompt {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--accent);
}
.btn-revive-ad { background: linear-gradient(135deg, #f39c12, #e67e22); }
.btn-revive-token { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.btn-revive-friend { background: linear-gradient(135deg, #3498db, #2980b9); }
.btn-revive-gems { background: linear-gradient(135deg, #a855f7, #7c3aed); }

.badge {
  background: rgba(255,255,255,0.2);
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.8rem;
  margin-left: 6px;
}
.small-hint {
  color: var(--text-dim);
  font-size: 0.75rem;
  margin-top: 8px;
}

/* Overlay Content */
.overlay-content {
  background: var(--surface);
  border-radius: 20px;
  padding: 32px 28px;
  max-width: 460px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  text-align: center;
  animation: fadeInUp 0.3s ease;
  border: 1px solid rgba(255,255,255,0.08);
}
.overlay-content h2 {
  margin-bottom: 16px;
  font-size: 1.6rem;
}

/* HUD */
#game-hud {
  position: absolute;
  top: 0; left: 0; right: 0;
  pointer-events: none;
  z-index: 20;
  padding: 12px 16px;
}
.hud-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.hud-left { min-width: 200px; }
.hp-bar-container {
  background: var(--hp-bg);
  border-radius: 8px;
  height: 20px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255,255,255,0.15);
  width: 200px;
}
.hp-bar {
  height: 100%;
  background: linear-gradient(90deg, #00c853, var(--hp-color));
  transition: width 0.3s;
  border-radius: 8px;
}
.hp-bar.danger { background: linear-gradient(90deg, #d50000, #ff5252); }
.hp-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  font-size: 0.75rem;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
.shield-indicator {
  margin-top: 4px;
  font-size: 1.2rem;
}
.hud-center { text-align: center; }
.wave-display {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--gold);
}
.enemy-count {
  font-size: 0.85rem;
  color: var(--text-dim);
}
.hud-right {
  text-align: right;
  line-height: 1.8;
  font-size: 0.9rem;
}
.hud-right .star-display { color: var(--gold); }
.hud-right .gem-display { color: var(--gem); }
.hud-bottom {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.active-effects {
  display: flex;
  gap: 6px;
  min-height: 20px;
}
.active-effects .effect-tag {
  background: rgba(255,255,255,0.15);
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  backdrop-filter: blur(4px);
  animation: fadeInUp 0.2s ease;
}
.wave-progress-container {
  width: 300px;
  max-width: 80vw;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
}
.wave-progress-bar {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s;
  border-radius: 3px;
}

/* Announcers */
.boss-alert {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%,-50%);
  font-size: 2.5rem;
  font-weight: 900;
  color: #ff1744;
  text-shadow: 0 0 30px rgba(255,0,0,0.6);
  animation: bossShake 0.3s ease infinite alternate;
  z-index: 25;
  pointer-events: none;
}
@keyframes bossShake {
  from { transform: translate(-50%,-50%) rotate(-3deg); }
  to { transform: translate(-50%,-50%) rotate(3deg); }
}
.wave-announce {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translate(-50%,-50%);
  font-size: 2rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 0 20px rgba(255,255,255,0.4);
  z-index: 25;
  pointer-events: none;
  animation: waveAnnounce 1.5s ease forwards;
}
@keyframes waveAnnounce {
  0% { opacity:0; transform: translate(-50%,-50%) scale(0.5); }
  30% { opacity:1; transform: translate(-50%,-50%) scale(1.1); }
  100% { opacity:0; transform: translate(-50%,-50%) scale(1); }
}

/* Damage numbers */
#damage-numbers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 22;
}
.dmg-num {
  position: absolute;
  font-weight: 900;
  font-size: 1.1rem;
  color: #ff5252;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  animation: dmgFloat 0.8s ease-out forwards;
  pointer-events: none;
}
@keyframes dmgFloat {
  0% { opacity:1; transform: translateY(0); }
  100% { opacity:0; transform: translateY(-40px); }
}
.star-float {
  position: absolute;
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--gold);
  animation: dmgFloat 1s ease-out forwards;
  pointer-events: none;
}

/* Shop */
.shop-currency {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  font-size: 1.1rem;
}
.shop-items, .premium-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.shop-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.05);
  padding: 12px 16px;
  border-radius: 10px;
  gap: 12px;
}
.shop-item .info { text-align: left; flex:1; }
.shop-item .name { font-weight: 700; font-size: 0.95rem; }
.shop-item .desc { font-size: 0.75rem; color: var(--text-dim); }
.shop-item .level { color: var(--accent); font-size: 0.8rem; }
.shop-item button {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  color: white;
  white-space: nowrap;
  transition: all 0.15s;
}
.shop-item button:hover { transform: scale(1.05); }
.shop-item button:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-buy-coin { background: linear-gradient(135deg, #f0c040, #c8960c); }
.btn-buy-gem { background: linear-gradient(135deg, #a855f7, #6b21a8); }

/* Dual Currency Small Buttons */
.btn-dual-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: stretch;
}
.btn-buy-sm {
  padding: 5px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.75rem;
  color: white;
  white-space: nowrap;
  transition: all 0.15s;
  min-width: 52px;
  text-align: center;
}
.btn-buy-sm:hover { transform: scale(1.05); }
.btn-buy-sm:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

/* Daily */
.daily-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}
.daily-day {
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 10px 4px;
  text-align: center;
  font-size: 0.75rem;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.daily-day.today { border-color: var(--gold); background: rgba(240,192,64,0.1); }
.daily-day.claimed { opacity: 0.5; }
.daily-day.claimed::after { content: ' ✓'; color: var(--accent); }
.daily-day .day-num { font-weight: 700; color: var(--gold); }
.daily-day .reward-icon { font-size: 1.3rem; display: block; }
.btn-claim { background: linear-gradient(135deg, #e67e22, #d35400); }
.btn-claim:disabled { opacity: 0.4; cursor: not-allowed; }

/* Pause Menu */
.pause-currency {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 14px;
  font-size: 1.05rem;
}
.pause-currency strong { color: var(--gold); }
.pause-currency span:last-child strong { color: var(--gem); }

.pause-tabs {
  display: flex;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 14px;
}
.pause-tab {
  flex: 1;
  padding: 10px 8px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.pause-tab.active {
  background: var(--primary);
  color: #fff;
}
.pause-tab:hover:not(.active) {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}

.pause-tab-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  min-height: 120px;
  max-height: 350px;
  overflow-y: auto;
}

/* Weapon Card */
.weapon-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.05);
  padding: 12px 14px;
  border-radius: 10px;
  gap: 10px;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.weapon-card.equipped {
  border-color: var(--accent);
  background: rgba(22,199,154,0.08);
}
.weapon-card .weapon-icon { font-size: 1.6rem; min-width: 36px; text-align: center; }
.weapon-card .weapon-info { text-align: left; flex: 1; min-width: 0; }
.weapon-card .weapon-name { font-weight: 700; font-size: 0.95rem; }
.weapon-card .weapon-desc { font-size: 0.72rem; color: var(--text-dim); }
.weapon-card .weapon-stats {
  font-size: 0.7rem;
  color: var(--text-dim);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.weapon-card .weapon-stats span {
  background: rgba(255,255,255,0.08);
  padding: 1px 6px;
  border-radius: 4px;
}
.weapon-card .weapon-status {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 700;
}

/* Power-up Card */
.powerup-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.05);
  padding: 10px 14px;
  border-radius: 10px;
  gap: 10px;
}
.powerup-card .powerup-icon { font-size: 1.4rem; min-width: 32px; text-align: center; }
.powerup-card .powerup-info { text-align: left; flex: 1; min-width: 0; }
.powerup-card .powerup-name { font-weight: 700; font-size: 0.9rem; }
.powerup-card .powerup-desc { font-size: 0.72rem; color: var(--text-dim); }

/* Pause content scroll tweak */
.pause-content {
  max-width: 480px;
}

/* Badges */
.perm-badge {
  background: var(--accent);
  color: #000;
  font-size: 0.6rem;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 4px;
}
.lvl-badge {
  background: var(--gold);
  color: #000;
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 4px;
}

/* Death progression hint */
.death-progress {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(240,192,64,0.08);
  border: 1px solid rgba(240,192,64,0.2);
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--gold);
  animation: fadeInUp 0.4s ease;
}
.death-progress strong { color: #fff; }

/* Weapon Indicator in HUD */
.weapon-indicator {
  margin-top: 6px;
  font-size: 0.8rem;
  background: rgba(255,255,255,0.12);
  padding: 3px 12px;
  border-radius: 12px;
  display: inline-block;
  color: var(--text);
  backdrop-filter: blur(4px);
}

/* Skins */
.skins-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.skin-card {
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.skin-card.selected { border-color: var(--accent); }
.skin-card.locked { opacity: 0.5; cursor: not-allowed; }
.skin-card .skin-preview {
  width: 40px; height: 40px;
  border-radius: 50%;
  margin: 0 auto 6px;
}
.skin-card .skin-name { font-size: 0.8rem; font-weight: 700; }
.skin-card .skin-price { font-size: 0.7rem; color: var(--gem); }

/* Friend Modal - Two-Step Verification Flow */
.friend-content {
  max-width: 480px;
}

/* Step Indicator */
.verify-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 20px;
  padding: 0 20px;
}
.verify-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-dim);
  transition: all 0.3s;
}
.verify-step.active {
  color: var(--accent);
}
.verify-step.done {
  color: var(--accent);
}
.verify-step .step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.9rem;
  transition: all 0.3s;
}
.verify-step.active .step-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 12px rgba(22,199,154,0.4);
}
.verify-step.done .step-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.step-line {
  width: 50px;
  height: 2px;
  background: rgba(255,255,255,0.1);
  margin: 0 10px;
  margin-bottom: 20px;
  transition: all 0.3s;
  border-radius: 1px;
}
.step-line.done {
  background: var(--accent);
}

/* Share Step Content */
.share-step-content {
  animation: fadeInUp 0.3s ease;
}
.share-instruction {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 12px;
  line-height: 1.5;
}
.share-link-container {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}
.share-link-container input {
  flex:1;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(0,0,0,0.3);
  color: white;
  font-size: 0.8rem;
}
.btn-copy {
  background: var(--accent);
  font-size: 0.85rem;
  padding: 10px 16px;
  white-space: nowrap;
}
.btn-copy.copied {
  background: #27ae60;
}

/* Share Action Buttons */
.share-actions-row {
  display: flex;
  gap: 10px;
  margin: 12px 0;
}
.btn-share-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  color: white;
  transition: all 0.2s;
  max-width: none;
}
.btn-share-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.btn-share-action.shared {
  opacity: 0.7;
  position: relative;
}
.btn-share-action.shared::after {
  content: ' ✓';
  color: #fff;
  font-weight: 900;
}
.btn-share-action[data-share="wechat"] { background: #07c160; }
.btn-share-action[data-share="qq"] { background: #12b7f5; }
.share-icon { font-size: 1.1rem; }

/* Share Status */
.share-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 10px 0;
}
.share-status.done {
  color: var(--accent);
  background: rgba(22,199,154,0.1);
}
.status-icon { font-size: 1rem; }

.friend-reward {
  color: var(--accent);
  margin: 10px 0;
  font-size: 0.85rem;
}

/* Verify Card */
.verify-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 14px;
  text-align: center;
}
.verify-icon {
  font-size: 3rem;
  margin-bottom: 10px;
  animation: pulse 1s ease infinite alternate;
}
.verify-card h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}
.verify-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 14px;
  line-height: 1.4;
}

/* Verify Status */
.verify-status {
  margin-bottom: 14px;
}
.verify-status-text {
  font-size: 0.85rem;
  color: var(--text-dim);
}
.verify-status.checking .verify-status-text {
  color: var(--gold);
}

/* Verify Button */
.btn-verify {
  background: linear-gradient(135deg, #3498db, #2980b9);
  font-size: 1.05rem;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  color: white;
  font-weight: 700;
  transition: all 0.2s;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  display: block;
}
.btn-verify:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52,152,219,0.4);
}
.btn-verify:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.btn-verify.checking {
  background: linear-gradient(135deg, #f39c12, #e67e22);
}
.btn-verify.verified {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
}

/* Spinner for verification */
.verify-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Verify Result */
.verify-result {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  text-align: center;
}
.verify-result.success {
  background: rgba(39,174,96,0.15);
  border: 1px solid rgba(39,174,96,0.3);
}
.verify-result.fail {
  background: rgba(231,76,60,0.1);
  border: 1px solid rgba(231,76,60,0.2);
}
.verify-result-icon {
  font-size: 2rem;
  margin-bottom: 4px;
}
.verify-result-text {
  font-size: 0.85rem;
  font-weight: 600;
}

/* Revive Success Button */
.btn-revive-success {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 14px auto 0;
  padding: 14px 24px;
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, #e94560, #c0392b);
  transition: all 0.2s;
  animation: pulse 0.8s ease infinite alternate;
}
.btn-revive-success:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(233,69,96,0.5);
}

/* Verify Rewards */
.verify-rewards {
  background: rgba(240,192,64,0.08);
  border: 1px solid rgba(240,192,64,0.2);
  border-radius: 12px;
  padding: 12px 16px;
  text-align: center;
}
.verify-reward-title {
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.verify-reward-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.verify-reward-list span {
  background: rgba(255,255,255,0.08);
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.78rem;
  color: var(--text);
  white-space: nowrap;
}

/* Bottom Navigation */
.friend-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}
.friend-nav .btn {
  flex: 1;
  margin: 0;
  font-size: 0.9rem;
}
.btn-step-next {
  background: linear-gradient(135deg, #3498db, #2980b9);
}
.btn-step-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}
.btn-step-nav {
  background: #555;
}

/* Ad Modal */
.ad-timer-bar {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  margin: 12px 0;
  overflow: hidden;
}
.ad-timer-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.1s linear;
  border-radius: 4px;
}
.ad-placeholder {
  background: rgba(255,255,255,0.05);
  border: 1px dashed rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 24px;
  margin-top: 12px;
}
.ad-placeholder .small { font-size: 0.7rem; color: var(--text-dim); }
.ad-sponsor { color: var(--text-dim); font-size: 0.75rem; }

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  color: var(--text);
  padding: 10px 24px;
  border-radius: 25px;
  border: 1px solid rgba(255,255,255,0.15);
  z-index: 200;
  font-weight: 700;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2s forwards;
}
@keyframes toastIn {
  from { opacity:0; transform: translateX(-50%) translateY(20px); }
  to { opacity:1; transform: translateX(-50%) translateY(0); }
}
@keyframes toastOut {
  from { opacity:1; }
  to { opacity:0; }
}

/* Login Screen */
#login-screen { z-index: 60; }
.login-content {
  text-align: center;
  max-width: 420px;
  width: 90%;
  animation: fadeInUp 0.6s ease;
}
.login-tabs {
  display: flex;
  background: var(--surface);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
}
.login-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 1rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.login-tab.active {
  background: var(--primary);
  color: #fff;
}
.input-type-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.type-btn {
  flex: 1;
  padding: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.type-btn.active {
  border-color: var(--primary);
  color: #fff;
  background: rgba(233,69,96,0.15);
}
.form-group {
  margin-bottom: 12px;
}
.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus {
  border-color: var(--primary);
  background: rgba(255,255,255,0.1);
}
.form-input::placeholder {
  color: rgba(255,255,255,0.3);
}
.form-hint {
  display: block;
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 4px;
  text-align: left;
}
.code-row {
  display: flex;
  gap: 8px;
}
.code-input {
  flex: 1;
}
.btn-send-code {
  padding: 10px 14px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.btn-send-code:hover { background: rgba(22,199,154,0.15); }
.btn-send-code:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.form-status {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.form-status.error {
  background: rgba(233,69,96,0.15);
  color: var(--primary);
  border: 1px solid rgba(233,69,96,0.3);
}
.form-status.success {
  background: rgba(22,199,154,0.15);
  color: var(--accent);
  border: 1px solid rgba(22,199,154,0.3);
}
.form-footer {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.form-footer .link {
  color: var(--primary);
  cursor: pointer;
  font-weight: 700;
  margin-left: 2px;
}
.form-footer .link:hover { text-decoration: underline; }

/* Menu user info */
.menu-user-info {
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.menu-user-info span { color: var(--accent); }
.btn-logout {
  padding: 4px 14px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 15px;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-logout:hover { border-color: var(--primary); color: var(--primary); }

/* Leaderboard */
.leaderboard-content { max-width: 500px; }
.rank-display {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 8px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
}
.rank-progress-container {
  width: 100%;
  height: 20px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 18px;
  position: relative;
}
.rank-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 10px;
  transition: width 0.5s;
}
.rank-progress-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

.lb-section {
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  text-align: left;
}
.lb-section h3 {
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--gold);
}
.lb-stats-row {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.lb-stats-row strong { color: var(--gold); }

.lb-history {
  max-height: 200px;
  overflow-y: auto;
}
.lb-empty {
  color: var(--text-dim);
  text-align: center;
  padding: 16px;
  font-size: 0.85rem;
}
.lb-record {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.lb-record:nth-child(1) { background: rgba(255,215,0,0.08); }
.lb-record:nth-child(2) { background: rgba(192,192,192,0.06); }
.lb-record:nth-child(3) { background: rgba(205,127,50,0.05); }
.lb-record .lb-rank { font-weight: 900; font-size: 1rem; min-width: 30px; }
.lb-record .lb-detail { flex: 1; margin: 0 8px; }
.lb-record .lb-score { font-weight: 700; color: var(--gold); }

.lb-achievements {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lb-achievement {
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.72rem;
  text-align: center;
  min-width: 70px;
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.2s;
}
.lb-achievement.unlocked { border-color: var(--gold); background: rgba(240,192,64,0.1); }
.lb-achievement.locked { opacity: 0.35; filter: grayscale(1); }
.lb-achievement .ach-icon { font-size: 1.3rem; display: block; }
.lb-achievement .ach-name { font-size: 0.65rem; color: var(--text-dim); }
.lb-achievement.unlocked .ach-name { color: var(--gold); }

/* Menu rank display */
.menu-rank-display {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  padding: 6px 16px;
  border-radius: 20px;
  display: inline-block;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
}
.btn-leaderboard { background: linear-gradient(135deg, #f39c12, #e67e22); }

/* Shop Sections */
.shop-section {
  margin-bottom: 14px;
}
.shop-section h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.shop-rate-info {
  font-size: 0.65rem;
  color: var(--text-dim);
  background: rgba(255,255,255,0.05);
  padding: 2px 8px;
  border-radius: 8px;
}

/* Responsive */
@media (max-width: 600px) {
  .game-title { font-size: 2rem; }
  .menu-stats { font-size: 0.8rem; gap: 8px; }
  .overlay-content { padding: 20px 16px; }
  .daily-grid { grid-template-columns: repeat(4,1fr); }
  .skins-grid { grid-template-columns: repeat(2,1fr); }
  .hud-top { font-size: 0.75rem; }
  .hp-bar-container { width: 140px; height: 16px; }
}

/* Canvas */
#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0; left: 0;
}
