:root {
  --bg-primary: #020705;
  --bg-gradient: radial-gradient(circle at center, #052618 0%, #010503 100%);
  --bg-card: rgba(16, 48, 32, 0.6);
  --border-color: rgba(16, 185, 129, 0.2);
  --text-primary: #ffffff;
  --text-secondary: #a3c4b5;
  --accent-gold: #fbbf24;
  --accent-green: #10b981;
  --accent-blue: #06b6d4;
  --font-family: 'Outfit', sans-serif;
  --nav-height: 60px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tapper-app {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: var(--bg-gradient);
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

/* Header balances */
.app-header {
  background: rgba(4, 15, 10, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 10;
  flex-shrink: 0;
}

.earnings-row {
  font-size: 11px;
  color: var(--text-secondary);
}

.earnings-row strong {
  color: var(--accent-green);
}

.coin-total-display {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.coin-icon {
  font-size: 32px;
}

.coin-total-display h1 {
  font-size: 36px;
  font-weight: 900;
  color: var(--accent-gold);
  text-shadow: 0 0 15px rgba(251, 191, 36, 0.35);
}

.rank-badge-row .badge {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-green);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

/* Viewport and tabs */
.app-viewport {
  flex-grow: 1;
  position: relative;
  overflow: hidden;
  margin-bottom: var(--nav-height);
}

.tap-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.tap-view.active {
  opacity: 1;
  pointer-events: auto;
}

/* 1. Tapping Game Area */
.coin-wrapper {
  margin: auto;
  position: relative;
  width: 210px;
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  /* Touch fixes zoom */
}

.coin-glow {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, transparent 70%);
  filter: blur(10px);
  animation: pulse-glow 2s infinite ease-in-out;
}

.tap-target-coin {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff7a1 0%, #fbbf24 30%, #b29300 70%, #5b4b00 100%);
  border: 5px solid #fff7a1;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 4px 10px rgba(255, 255, 255, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.05s;
  z-index: 5;
  touch-action: manipulation;
}

.tap-target-coin:active {
  transform: scale(0.93);
}

.coin-inner-symbol {
  font-size: 84px;
  font-weight: 900;
  color: #5b4b00;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.4);
}

/* Floating point score particles */
.tap-particle {
  position: absolute;
  color: #ffffff;
  font-size: 26px;
  font-weight: 900;
  pointer-events: none;
  z-index: 1000;
  animation: float-up-fade 0.8s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 5px var(--accent-gold);
}

/* Energy bar indicators */
.energy-row {
  padding: 20px 24px;
  flex-shrink: 0;
}

.energy-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 6px;
}

.energy-progress-bar {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.energy-progress-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-gold));
  box-shadow: 0 0 10px var(--accent-green);
  transition: width 0.1s ease;
}

/* Upgrade boosters list */
.store-container {
  padding: 20px;
}

.store-container h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 16px;
}

.upgrades-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upgrade-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
}

.upgrade-item:active {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.03);
}

.upgrade-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.upgrade-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
}

.upgrade-info strong {
  font-size: 14px;
}

.upgrade-info span {
  font-size: 11px;
  color: var(--text-secondary);
}

.upgrade-cost {
  font-weight: 700;
  color: var(--accent-gold);
  font-size: 13px;
  margin-top: 2px;
}

/* Airdrop Layout details */
.airdrop-container {
  margin: auto;
  width: 85%;
  max-width: 400px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 0;
}

.airdrop-art {
  font-size: 54px;
  filter: drop-shadow(0 4px 10px rgba(16, 185, 129, 0.3));
}

.airdrop-container h3 {
  font-size: 20px;
  font-weight: 800;
}

.airdrop-container p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.countdown-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.countdown-label {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.countdown-timer {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-gold);
}

.criteria-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.crit-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.crit-bullet {
  font-size: 14px;
}

.crit-bullet.success {
  color: var(--accent-green);
  text-shadow: 0 0 5px var(--accent-green);
}

.crit-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
}

.crit-info strong {
  font-size: 13px;
}

.crit-info span {
  font-size: 10px;
  color: var(--text-secondary);
}

.action-btn-small {
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.action-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-green));
  color: #000;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.action-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

/* Bottom Tabbar */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(4, 15, 10, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-color);
  display: flex;
  z-index: 100;
}

.nav-tab {
  flex-grow: 1;
  background: none;
  border: none;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}

.nav-tab.active {
  color: var(--accent-green);
}

.nav-icon {
  font-size: 18px;
}

.nav-label {
  font-size: 9px;
  font-weight: 600;
}

/* Keyframes */
@keyframes pulse-glow {
  0% {
    transform: scale(0.9);
    opacity: 0.3;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.6;
  }

  100% {
    transform: scale(0.9);
    opacity: 0.3;
  }
}

@keyframes float-up-fade {
  0% {
    transform: translateY(0) scale(0.8);
    opacity: 1;
  }

  100% {
    transform: translateY(-90px) scale(1.1);
    opacity: 0;
  }
}