/* ============= RESET & BASE ============= */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { 
  width: 100%; height: 100%; overflow: hidden;
  background: #1a1a2e; font-family: 'Press Start 2P', monospace;
  color: #fff; touch-action: manipulation; user-select: none;
}

/* ============= CANVAS ============= */
#gameCanvas {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  image-rendering: pixelated; image-rendering: crisp-edges;
  z-index: 1;
}

/* ============= WALLET BADGE ============= */
#badge {
  position: absolute; top: 8px; right: 8px; z-index: 100;
  background: rgba(0,0,0,0.7); border: 2px solid #666;
  border-radius: 6px; padding: 6px 10px;
  font-size: 7px; line-height: 1.4; text-align: center;
  color: #999; pointer-events: none;
}
#badge span { color: #ff6b6b; font-size: 6px; }

/* ============= UI OVERLAY ============= */
#ui {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 10; pointer-events: none;
}
.screen {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 16px; pointer-events: auto;
  padding: 20px; padding-top: 40px;
}
.hidden { display: none !important; }

/* ============= TYPOGRAPHY ============= */
h1 {
  font-size: 28px; text-align: center; line-height: 1.4;
  color: #ffdd57; text-shadow: 3px 3px 0 #c77d00, 0 0 20px rgba(255,221,87,0.3);
}
h2 {
  font-size: 16px; color: #ffdd57; text-shadow: 2px 2px 0 #c77d00;
  margin-bottom: 8px;
}
h3 { font-size: 10px; color: #aaa; margin-bottom: 6px; }

/* ============= BUTTONS ============= */
.btn {
  font-family: 'Press Start 2P', monospace; font-size: 12px;
  padding: 14px 28px; border: 3px solid; border-radius: 4px;
  cursor: pointer; transition: transform 0.1s; min-width: 180px;
  text-transform: uppercase; letter-spacing: 1px;
}
.btn:active { transform: scale(0.95); }
.btn-play {
  background: #27ae60; border-color: #1e8449; color: #fff;
  box-shadow: 0 4px 0 #1a6e3a, 0 0 15px rgba(39,174,96,0.3);
}
.btn-fire {
  background: #e74c3c; border-color: #c0392b; color: #fff;
  font-size: 16px; padding: 16px 36px;
  box-shadow: 0 4px 0 #922b21, 0 0 20px rgba(231,76,60,0.4);
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 4px 0 #922b21, 0 0 20px rgba(231,76,60,0.4); }
  50% { box-shadow: 0 4px 0 #922b21, 0 0 35px rgba(231,76,60,0.7); }
}
.btn-secondary {
  background: #34495e; border-color: #2c3e50; color: #bbb;
  font-size: 9px; padding: 10px 20px; min-width: 180px;
}
.btn-small {
  font-family: 'Press Start 2P', monospace; font-size: 10px;
  padding: 8px 12px; border: 2px solid #555; border-radius: 4px;
  background: #2c3e50; color: #fff; cursor: pointer; min-width: 0;
}

/* ============= CHICKEN ART ============= */
.chicken-art { font-size: 48px; margin: 8px 0; }
.title-wrap { text-align: center; }

/* ============= BALANCE ============= */
.balance-display {
  font-size: 10px; color: #f39c12; 
  background: rgba(0,0,0,0.4); padding: 8px 16px; border-radius: 4px;
  border: 1px solid #555;
}

/* ============= BET CONTROL ============= */
.bet-control {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  justify-content: center;
}
.bet-amount {
  font-size: 28px; color: #ffdd57; min-width: 80px; text-align: center;
  text-shadow: 0 0 10px rgba(255,221,87,0.5);
}
.bet-slider-wrap { width: 80%; max-width: 300px; }

/* ============= RANGE SLIDERS ============= */
input[type="range"] {
  -webkit-appearance: none; width: 100%; height: 8px;
  background: #333; border-radius: 4px; outline: none;
  border: 1px solid #555;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px;
  background: #ffdd57; border-radius: 4px; cursor: pointer;
  border: 2px solid #c77d00;
}
input[type="range"]::-moz-range-thumb {
  width: 28px; height: 28px; background: #ffdd57;
  border-radius: 4px; cursor: pointer; border: 2px solid #c77d00;
}

/* ============= AIM HUD ============= */
.aim-hud {
  font-size: 10px; display: flex; gap: 20px; 
  background: rgba(0,0,0,0.5); padding: 8px 16px; border-radius: 4px;
}
.angle-control { width: 80%; max-width: 300px; }

/* ============= FLY HUD ============= */
.fly-info {
  position: absolute; top: 50px; left: 50%; transform: translateX(-50%);
  text-align: center; font-size: 10px;
  background: rgba(0,0,0,0.6); padding: 8px 20px; border-radius: 4px;
  border: 1px solid #555;
}
.multiplier {
  font-size: 20px; color: #2ecc71; margin-top: 4px;
  text-shadow: 0 0 10px rgba(46,204,113,0.5);
}

/* ============= RESULT ============= */
.result-stats {
  font-size: 10px; text-align: center; line-height: 2.2;
  background: rgba(0,0,0,0.4); padding: 12px 24px; border-radius: 4px;
  border: 1px solid #555;
}
#resWinLine { color: #2ecc71; font-size: 14px; }

/* ============= LEADERBOARD ============= */
.lb-section {
  width: 100%; max-width: 320px; background: rgba(0,0,0,0.4);
  padding: 12px; border-radius: 4px; border: 1px solid #555;
  font-size: 9px; line-height: 2;
}

/* ============= RESPONSIVE ============= */
@media (max-width: 400px) {
  h1 { font-size: 22px; }
  h2 { font-size: 13px; }
  .btn { font-size: 10px; padding: 12px 20px; min-width: 150px; }
  .btn-fire { font-size: 14px; }
  .bet-amount { font-size: 22px; }
  .screen { gap: 12px; padding: 16px; padding-top: 40px; }
}
