/* ============================================
   STACKS HURRY - Design System
   Dark Space Theme with Neon Accents
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --bg-primary: #030712;
  --bg-secondary: #0f172a;
  --bg-tertiary: #1e293b;
  --bg-card: rgba(15, 23, 42, 0.7);
  --bg-glass: rgba(15, 23, 42, 0.4);

  --cyan: #06b6d4;
  --cyan-dim: #0891b2;
  --purple: #8b5cf6;
  --purple-dim: #7c3aed;
  --pink: #ec4899;
  --orange: #f97316;
  --green: #10b981;
  --red: #ef4444;
  --gold: #f59e0b;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #475569;

  --font-display: 'Orbitron', 'Space Grotesk', sans-serif;
  --font-body: 'Outfit', system-ui, sans-serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-glow-cyan: 0 0 20px rgba(6, 182, 212, 0.2), 0 0 40px rgba(6, 182, 212, 0.1);
  --shadow-glow-purple: 0 0 20px rgba(139, 92, 246, 0.2), 0 0 40px rgba(139, 92, 246, 0.1);
  --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.5);

  /* Transition timings for UI animations */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
/* ============================================
   STACKS HURRY - Design System
   Dark Space Theme with Neon Accents
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --bg-primary: #030712;
  --bg-secondary: #0f172a;
  --bg-tertiary: #1e293b;
  --bg-card: rgba(15, 23, 42, 0.7);
  --bg-glass: rgba(15, 23, 42, 0.4);

  --cyan: #06b6d4;
  --cyan-dim: #0891b2;
  --purple: #8b5cf6;
  --purple-dim: #7c3aed;
  --pink: #ec4899;
  --orange: #f97316;
  --green: #10b981;
  --red: #ef4444;
  --gold: #f59e0b;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #475569;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Outfit', system-ui, sans-serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-glow-cyan: 0 0 20px rgba(6, 182, 212, 0.2), 0 0 40px rgba(6, 182, 212, 0.1);
  --shadow-glow-purple: 0 0 20px rgba(139, 92, 246, 0.2), 0 0 40px rgba(139, 92, 246, 0.1);
  --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.5);

  /* Transition timings for UI animations */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Clean Dark Background ---------- */
#stars-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(6, 182, 212, 0.1) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.1) 0px, transparent 50%);
}

#stars-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(circle at center, black, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at center, black, transparent 80%);
}

/* ---------- Screens ---------- */
.screen {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.screen.active {
  display: flex;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Menu Screen ---------- */
.menu-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 40px;
  max-width: 480px;
  width: 90%;
}

.logo-section {
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  padding: 30px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  width: 100%;
}

.logo-icon {
  font-size: 64px;
  margin-bottom: 12px;
  animation: rocketBounce 2s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(0,240,255,0.4));
}

@keyframes rocketBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.game-title {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-primary);
  text-shadow: 0 0 20px rgba(255,255,255,0.1);
  line-height: 1.1;
  user-select: none;
}

.title-accent {
  color: var(--cyan);
  display: block;
  font-size: 52px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glow-text {
  animation: textPulseGlow 3s infinite alternate;
}

@keyframes textPulseGlow {
  from { text-shadow: 0 0 10px rgba(0,240,255,0.4), 0 0 20px rgba(0,240,255,0.2); }
  to { text-shadow: 0 0 20px rgba(0,240,255,0.8), 0 0 30px rgba(139,92,246,0.6); }
}

.game-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 12px;
  letter-spacing: 1px;
  font-weight: 400;
}

/* ---------- Wallet ---------- */
.wallet-section {
  width: 100%;
  text-align: center;
}

.wallet-info {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0,240,255,0.15);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-top: 12px;
}

.wallet-address {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--cyan);
  word-break: break-all;
}

.wallet-balance {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.wallet-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.btn-wallet-action {
  flex: 1;
  padding: 8px 12px !important;
  font-size: 10px !important;
  letter-spacing: 0.8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-disconnect {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: var(--red);
}

.btn-disconnect:hover {
  background: rgba(248, 113, 113, 0.22);
  border-color: rgba(248, 113, 113, 0.5);
  box-shadow: 0 0 16px rgba(248, 113, 113, 0.2);
  transform: translateY(-1px);
}

.btn-switch {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  color: var(--cyan);
}

.btn-switch:hover {
  background: rgba(0, 240, 255, 0.18);
  border-color: rgba(0, 240, 255, 0.45);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.2);
  transform: translateY(-1px);
}

.hidden {
  display: none !important;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
}

.btn-icon {
  font-size: 18px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: white;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 10px 16px;
  font-size: 12px;
}

.btn-ghost:hover {
  color: var(--cyan);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 11px;
}

.btn-large {
  padding: 18px 36px;
  font-size: 16px;
}

.btn-full {
  width: 100%;
}

.btn-play {
  background: #f8fafc;
  color: #030712;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
  font-weight: 700;
  border-radius: var(--radius-lg);
}

.btn-play:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
  background: #ffffff;
}

.btn-glow::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--cyan), var(--purple), var(--pink));
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-normal);
  filter: blur(8px);
}

.btn-glow:hover::after {
  opacity: 0.6;
}

.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.contracts-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 8px 16px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ---------- Game HUD ---------- */
.game-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: linear-gradient(to bottom, rgba(10,14,26,0.9), transparent);
}

.hud-left, .hud-right {
  display: flex;
  gap: 20px;
}

.hud-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hud-label {
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 2px;
}

.hud-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(135deg, #fff, var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 15px rgba(0, 240, 255, 0.8), 0 0 30px rgba(0, 240, 255, 0.4);
  letter-spacing: 1px;
}

.hud-game-title {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 4px;
  color: var(--text-muted);
}

.level-progress-container {
  width: 120px;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.level-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(to right, var(--cyan), var(--primary));
  box-shadow: 0 0 10px var(--cyan);
  transition: width 0.3s ease-out;
}

/* ---------- Game Canvas ---------- */
#game-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
}

.crt-overlay {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%,
    rgba(0, 0, 0, 0.08) 50%
  );
  background-size: 100% 3px;
  opacity: 0.4;
}

.crt-overlay.disabled {
  display: none !important;
}

.crt-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, transparent 60%, rgba(0, 0, 0, 0.3) 100%);
  pointer-events: none;
}

/* ---------- Game Overlay ---------- */
.game-overlay {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10,14,26,0.85);
  backdrop-filter: blur(8px);
}

.game-overlay.hidden {
  display: none;
}

.overlay-content {
  text-align: center;
}

.overlay-content h2 {
  font-family: var(--font-display);
  font-size: 36px;
  margin-bottom: 16px;
  text-shadow: 0 0 20px rgba(0,240,255,0.5);
}

.overlay-content p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.countdown {
  font-family: var(--font-display);
  font-size: 80px;
  font-weight: 900;
  color: var(--cyan);
  margin-top: 24px;
  text-shadow: 0 0 40px rgba(0,240,255,0.6);
  animation: countPulse 1s ease-in-out infinite;
}

@keyframes countPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* ---------- Game Over ---------- */
.gameover-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 40px;
  max-width: 460px;
  width: 90%;
}

.gameover-header {
  text-align: center;
}

.gameover-title {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--red), var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

.gameover-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.score-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.score-value {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 30px rgba(251,191,36,0.5);
}

.gameover-stats {
  display: flex;
  gap: 32px;
  margin-top: 16px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.gameover-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* ---------- Leaderboard ---------- */
.leaderboard-container {
  display: flex;
  flex-direction: column;
  padding: 40px;
  max-width: 560px;
  width: 90%;
  height: 85vh;
}

.leaderboard-tabs {
  display: flex;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid rgba(0, 240, 255, 0.15);
}

.leaderboard-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 10px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.leaderboard-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.leaderboard-tab.active {
  background: linear-gradient(135deg, var(--cyan-dim), var(--purple-dim));
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 240, 255, 0.25);
}

.leaderboard-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.leaderboard-title {
  font-family: var(--font-display);
  font-size: 24px;
  flex: 1;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 10px rgba(251,191,36,0.3);
}

.leaderboard-stats {
  font-size: 13px;
  color: var(--text-secondary);
}

.leaderboard-content {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--cyan-dim) var(--bg-secondary);
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lb-entry {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.lb-entry:hover {
  border-color: rgba(0,240,255,0.2);
  background: rgba(0,240,255,0.05);
}

.lb-entry.gold {
  border-color: rgba(251,191,36,0.3);
  background: rgba(251,191,36,0.05);
}

.lb-entry.silver {
  border-color: rgba(192,192,192,0.3);
  background: rgba(192,192,192,0.04);
}

.lb-entry.bronze {
  border-color: rgba(205,127,50,0.3);
  background: rgba(205,127,50,0.04);
}

.lb-rank {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  width: 36px;
  text-align: center;
  color: var(--text-muted);
}

.lb-entry.gold .lb-rank { color: var(--gold); }
.lb-entry.silver .lb-rank { color: #c0c0c0; }
.lb-entry.bronze .lb-rank { color: #cd7f32; }

.lb-address {
  flex: 1;
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-score {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--cyan);
}

.leaderboard-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 0;
  color: var(--text-secondary);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--bg-tertiary);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Stats Screen ---------- */
.stats-container {
  display: flex;
  flex-direction: column;
  padding: 40px;
  max-width: 560px;
  width: 90%;
}

.stats-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.stats-title {
  font-family: var(--font-display);
  font-size: 24px;
  flex: 1;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stats-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 20px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
}

.stats-card:hover {
  border-color: rgba(0,240,255,0.2);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow-cyan);
}

.stats-card-icon {
  font-size: 36px;
}

.stats-card-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--cyan);
}

.stats-card-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
}

.modal-content {
  position: relative;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: 36px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 240, 255, 0.1);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 20px;
  margin-bottom: 12px;
}

.modal-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.nft-preview {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.nft-card {
  background: linear-gradient(145deg, var(--bg-tertiary), var(--bg-primary));
  border: 1px solid rgba(0,240,255,0.15);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  width: 180px;
  box-shadow: var(--shadow-glow-cyan);
}

.nft-art {
  font-size: 56px;
  margin-bottom: 12px;
  animation: rocketBounce 2s ease-in-out infinite;
}

.nft-name {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.nft-collection {
  font-size: 11px;
  color: var(--text-muted);
}

/* ---------- Toast ---------- */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--bg-secondary);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
  animation: toastIn 0.3s ease;
  max-width: 360px;
}

.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--red); }
.toast.info { border-color: var(--cyan); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

/* ---------- Toggle Switch ---------- */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #334155;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--cyan);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--cyan);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 24px;
}

.slider.round:before {
  border-radius: 50%;
}

/* ---------- Daily Challenges ---------- */
.daily-quests-panel {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 440px;
  margin-top: 15px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.daily-quests-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 14px;
  margin-right: 6px;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.1em;
  flex-grow: 1;
  text-shadow: 0 0 10px rgba(0,240,255,0.4);
}

.streak-badge {
  font-size: 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 4px 10px;
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
  letter-spacing: 0.05em;
  white-space: nowrap;
  text-transform: uppercase;
}

.quests-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.quests-list::-webkit-scrollbar {
  width: 4px;
}

.quests-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 2px;
}

.quests-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--cyan), var(--purple));
  border-radius: 2px;
}

.quest-item-placeholder {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  padding: 10px 0;
}

.quest-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.quest-item:hover {
  background: rgba(0, 240, 255, 0.05);
  border-color: rgba(0, 240, 255, 0.4);
  transform: translateX(4px);
  box-shadow: -4px 0 0 var(--cyan);
}

.quest-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.quest-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
}

.quest-name {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.05em;
}

.quest-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.quest-reward {
  font-size: 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.quest-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quest-progress-container {
  background: rgba(255, 255, 255, 0.05);
  height: 6px;
  border-radius: 3px;
  flex-grow: 1;
  overflow: hidden;
  position: relative;
}

.quest-progress-fill {
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.quest-progress-text {
  font-size: 0.7rem;
  font-family: var(--font-display);
  color: var(--text-secondary);
  min-width: 35px;
  text-align: right;
}

.btn-claim {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 800;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.btn-claim:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.btn-claim:active {
  transform: translateY(1px);
}

.quest-item.completed-unclaimed {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.02);
}

.quest-item.claimed {
  opacity: 0.5;
  border-color: rgba(255, 255, 255, 0.02);
}

.quest-item.claimed .quest-progress-fill {
  background: #64748b;
  box-shadow: none;
}

.claimed-badge {
  font-size: 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: #64748b;
  padding: 4px;
}

/* ---------- Hall of Fame ---------- */
.menu-footer {
  margin-top: 30px;
  width: 100%;
  max-width: 400px;
}

.hall-of-fame {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 15px;
  backdrop-filter: blur(5px);
}

.hof-title {
  font-size: 0.7rem;
  font-weight: 900;
  color: #64748b;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
  text-align: center;
}

.hof-list {
  display: flex;
  flex-direction: column;
}

.hof-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.hof-item:last-child {
  border-bottom: none;
}

.hof-rank {
  color: #fbbf24;
  font-weight: 900;
  width: 15px;
  font-size: 0.8rem;
}

.hof-name {
  flex: 1;
  font-size: 0.85rem;
  color: #cbd5e1;
  font-family: 'Space Mono', monospace;
  text-align: left;
}

.hof-score {
  color: #00f0ff;
  font-weight: 700;
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .game-title { font-size: 28px; }
  .title-accent { font-size: 36px; }
  .logo-icon { font-size: 48px; }
  .menu-container { padding: 24px; gap: 20px; }
  .btn { padding: 12px 20px; font-size: 12px; }
  .btn-large { padding: 14px 28px; font-size: 14px; }
  .score-value { font-size: 40px; }
  .gameover-title { font-size: 28px; }
  .hud-value { font-size: 16px; }
  .stats-grid { grid-template-columns: 1fr; }
}

/* ---------- Toasts ---------- */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
  pointer-events: none;
}

.toast {
  background: rgba(10, 14, 26, 0.9);
  backdrop-filter: blur(15px);
  border: 1px solid var(--cyan);
  border-radius: 12px;
  padding: 14px 20px;
  color: white;
  font-family: var(--font-display);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 240, 255, 0.2);
  animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  min-width: 250px;
}

.toast-icon {
  font-size: 1.2rem;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 900;
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.toast-msg {
  margin-top: 2px;
  color: #e2e8f0;
}

@keyframes toastIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.fade-out {
  animation: toastOut 0.4s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

@keyframes toastOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(120%); opacity: 0; }
}

/* ---------- Workflow Panel ---------- */
.workflow-panel {
  border-color: rgba(168, 85, 247, 0.2);
  margin-top: 8px;
}

.workflow-description {
  font-size: 11px;
  color: var(--text-muted);
  margin: -8px 0 12px 0;
  font-style: italic;
  padding-left: 36px;
}

.workflow-list {
  max-height: 280px !important;
  gap: 6px !important;
}

.workflow-item {
  padding: 10px 14px;
  background: rgba(168, 85, 247, 0.03);
  border: 1px solid rgba(168, 85, 247, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all var(--transition-fast);
}

.workflow-item:hover {
  background: rgba(168, 85, 247, 0.08);
  border-color: rgba(168, 85, 247, 0.3);
}

.workflow-item.completed {
  opacity: 0.6;
  background: rgba(52, 211, 153, 0.05);
  border-color: rgba(52, 211, 153, 0.2);
}

.workflow-num {
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--purple);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(168, 85, 247, 0.1);
  border-radius: 50%;
  flex-shrink: 0;
}

.workflow-item.completed .workflow-num {
  background: var(--green);
  color: var(--bg-primary);
}

.workflow-details {
  flex: 1;
}

.workflow-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.workflow-desc {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.2;
}

.workflow-status {
  font-size: 14px;
}

:root { --neon-accent: #b026ff; }

/* Dynamic pop and shake HUD animations */
@keyframes score-pop {
  0% { transform: scale(1); text-shadow: 0 0 10px rgba(0,240,255,0.5); }
  50% { transform: scale(1.15); text-shadow: 0 0 25px rgba(0,240,255,0.8), 0 0 50px rgba(0,240,255,0.5); color: #fff; }
  100% { transform: scale(1); text-shadow: 0 0 10px rgba(0,240,255,0.5); }
}

.score-animate {
  display: inline-block;
  animation: score-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes lives-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3) rotate(-10deg); filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.8)); }
  100% { transform: scale(1); }
}

.lives-animate {
  display: inline-block;
  animation: lives-pop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Achievements Gallery CSS */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.achievement-card {
  background: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.achievement-card.locked {
  opacity: 0.6;
  filter: grayscale(0.8);
}

.achievement-card:not(.locked):hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.25);
  background: rgba(0, 240, 255, 0.05);
}

.achievement-icon-wrapper {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: transform 0.3s ease;
}

.achievement-card:not(.locked):hover .achievement-icon-wrapper {
  transform: scale(1.1) rotate(5deg);
  background: rgba(0, 240, 255, 0.15);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.achievement-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.achievement-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.achievement-date {
  font-size: 10px;
  color: var(--primary);
  margin-top: 8px;
  display: block;
}

.achievement-lock-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

/* ---------- Anime Layout & Styling ---------- */
.anime-layout {
  display: grid !important;
  grid-template-columns: 1fr 440px;
  gap: 50px;
  max-width: 1200px !important;
  width: 95% !important;
  align-items: center;
  justify-content: center;
  margin: auto;
  padding: 20px;
}

@media (max-width: 900px) {
  .anime-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    height: 90vh;
    overflow-y: auto;
    align-items: start;
    padding-top: 40px;
  }
}

.menu-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.menu-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Redesign buttons to be cleaner and anime-styled */
.anime-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: #fff !important;
  backdrop-filter: blur(10px);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  box-shadow: none !important;
  transition: all 0.3s ease;
  padding: 14px 28px !important;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 2px;
}

.anime-btn:hover:not(:disabled) {
  background: rgba(0, 240, 255, 0.2) !important;
  border-color: #00f0ff !important;
  transform: translateX(5px);
}

.anime-btn-main {
  background: #00f0ff !important;
  color: #0a0e1a !important;
  border: none !important;
  clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
  font-size: 18px !important;
  font-weight: 900;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4) !important;
  font-family: var(--font-display);
}

.anime-btn-main:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.8) !important;
}

.anime-btn-outline {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  font-family: var(--font-display);
}
.anime-btn-outline:hover:not(:disabled) {
  border-color: #00f0ff !important;
  background: rgba(0, 240, 255, 0.1) !important;
  transform: translateX(3px);
}

.menu-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.anime-panel {
  background: rgba(10, 14, 26, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(12px) !important;
  clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
}

.anime-glass {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(8px) !important;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.logo-section h1 {
  text-shadow: none !important;
}
.logo-section .title-accent {
  background: #00f0ff !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: 0 0 15px rgba(0, 240, 255, 0.4) !important;
}

/* --- OVERRIDES TO INCREASE SIZES --- */
.anime-layout { gap: 60px !important; max-width: 1400px !important; padding: 40px !important; transform: scale(1.2); transform-origin: top center; margin-top: 5vh; }
@media (max-width: 900px) { .anime-layout { transform: scale(1.0); padding: 20px !important; margin-top: 0; } }

/* --- POWERUP CARD HOVER --- */
.powerup-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5) !important;
  background: rgba(255, 255, 255, 0.05) !important;
}
