/* DEAD DRAW - Western Bounty Hunter Game - Styles */
/* Created by JH Games */

@import url('https://fonts.googleapis.com/css2?family=Rye&family=Rajdhani:wght@400;600;700&display=swap');

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

body {
  background: #1a0e06;
  overflow: hidden;
  font-family: 'Rajdhani', sans-serif;
  color: #e8d5b0;
  cursor: none;
  user-select: none;
  width: 100vw;
  height: 100vh;
}

canvas#gameCanvas {
  display: block;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
}

/* Login Screen */
#login-screen {
  position: fixed; inset: 0; z-index: 1000;
  background: linear-gradient(180deg, #1a0e06 0%, #2d1a0b 50%, #1a0e06 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: 'Rajdhani', sans-serif;
}
#login-screen .title {
  font-family: 'Rye', cursive;
  font-size: 52px;
  color: #ffd700;
  text-shadow: 0 0 20px #ffd70066, 2px 2px 0 #8b4513, 4px 4px 0 #3d1f00;
  letter-spacing: 8px;
  margin-bottom: 4px;
}
#login-screen .subtitle {
  font-size: 14px;
  color: #a0805a;
  letter-spacing: 6px;
  margin-bottom: 30px;
  text-transform: uppercase;
}
#login-screen .jh-badge {
  font-size: 11px;
  color: #665533;
  margin-bottom: 20px;
  letter-spacing: 4px;
}
#login-screen input {
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 16px;
  background: #1a0e0699;
  color: #ffd700;
  border: 1px solid #ffd70033;
  outline: none;
  width: 240px;
  margin-bottom: 10px;
  text-align: center;
  border-radius: 2px;
}
#login-screen input::placeholder { color: #66553388; }
#login-screen input:focus { border-color: #ffd70077; }
#login-screen .btn-row { display: flex; gap: 10px; margin-bottom: 10px; }
#login-screen button {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 22px;
  background: #1a0e06;
  color: #ffd700;
  border: 1px solid #ffd700;
  cursor: pointer;
  letter-spacing: 2px;
  transition: all 0.2s;
  border-radius: 2px;
}
#login-screen button:hover { background: #ffd70022; }
#login-screen .guest-btn {
  color: #665533;
  border: 1px dashed #44331a;
  font-size: 11px;
  margin-bottom: 10px;
}
#login-screen .guest-btn:hover { color: #ffd700; border-color: #ffd70066; }
#login-msg {
  font-size: 12px;
  color: #ff4444;
  min-height: 18px;
  margin-top: 6px;
}
#login-screen .footer-note {
  font-size: 9px;
  color: #44331a;
  margin-top: 14px;
}
#login-screen .jh-credit {
  font-size: 10px;
  color: #ffd700;
  margin-top: 20px;
}

/* HUD Overlay */
#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  font-family: 'Rajdhani', sans-serif;
}
#hud > div { pointer-events: auto; }

/* Health/Stamina bars */
#hud-topleft {
  position: absolute;
  top: 12px; left: 12px;
}
.hud-bar {
  width: 200px;
  height: 18px;
  background: #1a0e0699;
  border: 1px solid #66553388;
  margin-bottom: 4px;
  position: relative;
  border-radius: 2px;
  overflow: hidden;
}
.hud-bar-fill {
  height: 100%;
  transition: width 0.3s;
}
.hud-bar-fill.health { background: linear-gradient(90deg, #8b0000, #cc2222); }
.hud-bar-fill.stamina { background: linear-gradient(90deg, #8b7500, #ccaa22); }
.hud-bar-label {
  position: absolute;
  top: 0; left: 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
}

/* Top right - gold & bounty */
#hud-topright {
  position: absolute;
  top: 12px; right: 12px;
  text-align: right;
}
.hud-gold {
  font-family: 'Rye', cursive;
  font-size: 22px;
  color: #ffd700;
  text-shadow: 1px 1px 0 #3d1f00;
}
.hud-bounty-info {
  font-size: 13px;
  color: #cc9966;
  margin-top: 4px;
  max-width: 220px;
}

/* Bottom left - weapon */
#hud-bottomleft {
  position: absolute;
  bottom: 12px; left: 12px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.hud-weapon-box {
  background: #1a0e0699;
  border: 1px solid #66553388;
  padding: 8px 14px;
  border-radius: 2px;
}
.hud-weapon-name {
  font-family: 'Rye', cursive;
  font-size: 15px;
  color: #ffd700;
}
.hud-weapon-ammo {
  font-size: 20px;
  font-weight: 700;
  color: #e8d5b0;
}
.hud-weapon-ammo span { font-size: 13px; color: #997755; }

/* Bottom right - minimap */
#hud-bottomright {
  position: absolute;
  bottom: 12px; right: 12px;
}
#minimap-canvas {
  width: 160px; height: 160px;
  border: 2px solid #66553388;
  background: #1a0e06cc;
  border-radius: 4px;
}

/* Interaction prompt */
#interact-prompt {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 15px;
  font-weight: 700;
  color: #ffd700;
  background: #1a0e06cc;
  padding: 6px 18px;
  border: 1px solid #ffd70044;
  border-radius: 3px;
  display: none;
  pointer-events: none;
}

/* Menu overlays */
.menu-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: #1a0e06ee;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 40px;
  overflow-y: auto;
  font-family: 'Rajdhani', sans-serif;
}
.menu-overlay.active { display: flex; }
.menu-title {
  font-family: 'Rye', cursive;
  font-size: 32px;
  color: #ffd700;
  text-shadow: 2px 2px 0 #3d1f00;
  margin-bottom: 20px;
}
.menu-close {
  position: absolute;
  top: 14px; right: 20px;
  font-size: 24px;
  color: #ffd700;
  cursor: pointer;
  font-family: 'Rye', cursive;
}
.menu-close:hover { color: #fff; }
.menu-body {
  width: 90%;
  max-width: 700px;
}

/* Bounty card */
.bounty-card {
  background: #2d1a0b;
  border: 1px solid #66553344;
  padding: 14px;
  margin-bottom: 10px;
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.bounty-card:hover { border-color: #ffd70066; }
.bounty-card.active { border-color: #ffd700; }
.bounty-name {
  font-family: 'Rye', cursive;
  font-size: 18px;
  color: #ffd700;
}
.bounty-alias { font-size: 12px; color: #997755; }
.bounty-reward {
  float: right;
  font-family: 'Rye', cursive;
  font-size: 20px;
  color: #ffd700;
}
.bounty-details { font-size: 13px; color: #a0805a; margin-top: 6px; }
.bounty-stars { color: #ffd700; font-size: 14px; }
.bounty-accept-btn {
  margin-top: 8px;
  padding: 5px 16px;
  background: #8b0000;
  color: #ffd700;
  border: 1px solid #ffd700;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border-radius: 2px;
}
.bounty-accept-btn:hover { background: #aa1111; }

/* Shop items */
.shop-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #2d1a0b;
  border: 1px solid #66553344;
  padding: 10px 14px;
  margin-bottom: 6px;
  border-radius: 3px;
}
.shop-item-info { flex: 1; }
.shop-item-name {
  font-weight: 700;
  font-size: 15px;
  color: #e8d5b0;
}
.shop-item-desc { font-size: 12px; color: #997755; }
.shop-item-price {
  font-family: 'Rye', cursive;
  font-size: 16px;
  color: #ffd700;
  margin-left: 12px;
}
.shop-buy-btn {
  padding: 4px 14px;
  background: #3d1f00;
  color: #ffd700;
  border: 1px solid #ffd70066;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  border-radius: 2px;
  margin-left: 10px;
}
.shop-buy-btn:hover { background: #5a3010; }
.shop-buy-btn:disabled { opacity: 0.4; cursor: default; }

/* Poker overlay */
#poker-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: #0d0804ee;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Rajdhani', sans-serif;
}
#poker-overlay.active { display: flex; }
.poker-table {
  background: #1a4a1a;
  border: 6px solid #5a3010;
  border-radius: 50%;
  width: 500px; height: 300px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.poker-card {
  display: inline-block;
  width: 44px; height: 62px;
  background: #fff;
  border: 1px solid #333;
  border-radius: 4px;
  margin: 2px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  line-height: 62px;
  color: #111;
  font-family: 'Rajdhani', sans-serif;
}
.poker-card.red { color: #cc0000; }
.poker-card.facedown { background: #8b4513; color: transparent; border-color: #5a3010; }
.poker-btn {
  padding: 6px 18px;
  margin: 4px;
  background: #3d1f00;
  color: #ffd700;
  border: 1px solid #ffd70066;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border-radius: 2px;
}
.poker-btn:hover { background: #5a3010; }

/* Duel overlay */
#duel-overlay {
  position: fixed; inset: 0; z-index: 70;
  background: #000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Rye', cursive;
}
#duel-overlay.active { display: flex; }
.duel-text {
  font-size: 72px;
  color: #ffd700;
  text-shadow: 0 0 30px #ffd70066;
}

/* Admin panel */
#admin-panel {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 80;
  background: #1a0e06;
  border: 2px solid #ffd700;
  padding: 20px;
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 420px;
  border-radius: 4px;
}
#admin-panel.active { display: flex; }
.admin-btn {
  padding: 6px 14px;
  background: #2d1a0b;
  color: #ffd700;
  border: 1px solid #ffd70044;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  border-radius: 2px;
}
.admin-btn:hover { background: #3d1f00; }
.admin-btn.on { background: #8b0000; border-color: #ff4444; }

/* Notification toast */
.toast {
  position: fixed;
  top: 60px; left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: #2d1a0bee;
  border: 1px solid #ffd70066;
  color: #ffd700;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 8px 24px;
  border-radius: 3px;
  animation: toastIn 0.3s, toastOut 0.3s 2.5s forwards;
  pointer-events: none;
}
@keyframes toastIn { from { opacity: 0; top: 40px; } to { opacity: 1; top: 60px; } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

/* Tab indicators for weapon wheel */
.weapon-wheel {
  position: fixed;
  bottom: 50px; left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  display: none;
  background: #1a0e06dd;
  border: 1px solid #66553388;
  border-radius: 6px;
  padding: 10px;
}
.weapon-wheel.active { display: flex; gap: 6px; }
.weapon-slot {
  width: 50px; height: 50px;
  background: #2d1a0b;
  border: 1px solid #66553388;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #997755;
  text-align: center;
  cursor: pointer;
}
.weapon-slot.selected { border-color: #ffd700; color: #ffd700; }

/* Crosshair */
#crosshair {
  position: fixed;
  width: 24px; height: 24px;
  pointer-events: none;
  z-index: 200;
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #1a0e06; }
::-webkit-scrollbar-thumb { background: #5a3010; border-radius: 3px; }
