/* ============================================================
   game.css — estilos do gameplay, portados do DragonBound
   Referência: dragonbound/src/web/public_html/data/css/dragonbound.min.css
   Escala: 800×600 → 900×500 (x×1.125, y×0.833)
   ============================================================ */

/* --- Containers principais --- */
#screen-game {
  overflow: hidden;
  background: #0a1a2a;
}

#game_back {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  z-index: 1; overflow: hidden;
}

#game_back_inner {
  position: absolute;
  transform-origin: top left;
}

#game_back_inner canvas {
  position: absolute;
  top: 0; left: 0;
}

#game_front {
  position: absolute;
  left: 0; top: 0;
  width: 0; height: 100%;
  z-index: 2;
  pointer-events: none;
}

#game_front > * { pointer-events: auto; }

/* --- HUD principal (#gameui) --- */
/* DragonBound: top:487 / 800×114; BoomBound: top:405 / 900×95 */
#gameui {
  position: absolute;
  left: 0; top: 405px;
  width: 900px; height: 95px;
  background: #1a1008;
  border-top: 2px solid #4a3010;
  pointer-events: auto;
  overflow: hidden;
  user-select: none;
}

/* --- Botões de tiro --- */
#btnShot1, #btnShot2, #btnShotSS {
  position: absolute;
  width: 35px; height: 35px;
  cursor: pointer;
  background: #2a1808;
  border: 1px solid #5a3010;
  border-radius: 3px;
}
#btnShot1  { left: 14px; top: 42px; }
#btnShot2  { left: 62px; top: 42px; }
#btnShotSS { left: 110px; top: 42px; }

#btnShot1:hover, #btnShot2:hover, #btnShotSS:hover { border-color: #e08030; }
#btnShot1:active, #btnShot2:active, #btnShotSS:active { filter: brightness(1.4); }
#btnShot1.Pressed, #btnShot2.Pressed, #btnShotSS.Pressed {
  background: #5a2800;
  border-color: #e08030;
  box-shadow: inset 0 0 6px rgba(230,120,0,.5);
}

/* --- Botões Pass / Esc --- */
#btnPass, #btnEsc {
  position: absolute;
  width: 65px; height: 18px;
  cursor: pointer;
  border-radius: 3px;
  text-align: center;
  font-size: 10px;
  line-height: 18px;
  font-weight: 700;
  letter-spacing: .5px;
}
#btnEsc  { left: 14px; top: 72px; background: #3a0808; border: 1px solid #802020; color: #ff8888; }
#btnPass { left: 84px; top: 72px; background: #083820; border: 1px solid #208040; color: #88ff88; }
.opacity_button:hover  { opacity: .7; }
.opacity_button:active { opacity: .5; }

/* --- Alt labels dentro dos botões --- */
.Alt  { position: absolute; top: 0; left: 0; color: #fff; font-size: 12px; pointer-events: none; }
.Alt2 { color: #ffca41; }

/* --- Slots de item F1-F6 --- */
/* DragonBound: left:291+n×35, top:36; BoomBound: left:327+n×39, top:30 */
#gameItemSlot0, #gameItemSlot1, #gameItemSlot2,
#gameItemSlot3, #gameItemSlot4, #gameItemSlot5 {
  position: absolute; top: 30px;
  width: 36px; height: 36px;
  background: #2a211c;
  border: 1px solid #4a3a2a;
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
  background-repeat: no-repeat;
}
#gameItemSlot0 { left: 327px; }
#gameItemSlot1 { left: 366px; }
#gameItemSlot2 { left: 405px; }
#gameItemSlot3 { left: 444px; }
#gameItemSlot4 { left: 483px; }
#gameItemSlot5 { left: 522px; }

#gameItemSlot0:hover, #gameItemSlot1:hover, #gameItemSlot2:hover,
#gameItemSlot3:hover, #gameItemSlot4:hover, #gameItemSlot5:hover { border-color: #7baacc; }

#gameItemSlot0 .Alt2, #gameItemSlot1 .Alt2, #gameItemSlot2 .Alt2,
#gameItemSlot3 .Alt2, #gameItemSlot4 .Alt2, #gameItemSlot5 .Alt2 {
  position: absolute; bottom: 1px; left: 2px;
  font-size: 9px; color: rgba(255,202,65,.6);
  top: auto;
}

#message_over_items {
  position: absolute; left: 327px; top: 30px;
  width: 235px; height: 31px;
  display: none;
  background: rgba(0,0,0,.7);
  color: #fff; font-size: 11px;
  text-align: center; line-height: 31px;
}

/* --- Weather slots --- */
/* BoomBound: left:564+n×24, top:4 dentro de #gameui */
#weatherSlot0, #weatherSlot1, #weatherSlot2, #weatherSlot3, #weatherSlot4 {
  position: absolute; top: 4px;
  width: 21px; height: 21px;
  image-rendering: pixelated;
  background-repeat: no-repeat;
  background-size: cover;
}
#weatherSlot0 { left: 564px; }
#weatherSlot1 { left: 588px; }
#weatherSlot2 { left: 612px; }
#weatherSlot3 { left: 636px; }
#weatherSlot4 { left: 660px; }

/* --- Barra de poder --- */
/* DragonBound: powerBar left:241,bottom:17,h:19; BoomBound: left:271,bottom:14,h:16 */
#powerBar {
  position: absolute; left: 271px; bottom: 14px;
  width: 1px; height: 16px;
  background: #de1821;
}
#walkBar {
  position: absolute; left: 271px; bottom: 3px;
  width: 1px; height: 7px;
  background: #6b8cc6;
}
#powerMarkArea {
  position: absolute; left: 271px; bottom: 0;
  width: 450px; height: 32px;
}
#powerMark {
  position: absolute; left: 225px;
  width: 3px; height: 22px;
  background: rgba(255,255,255,.85);
  margin-left: -1px;
}

/* --- Ângulo (#MyAngle canvas) --- */
/* DragonBound: top:43,left:210; BoomBound: top:36,left:236 */
#MyAngle {
  position: absolute; top: 36px; left: 236px;
}

.LastAngleDigit { position: absolute; top: 51px; width: 8px; height: 6px; }
#LastAngleDigit- { left: 192px; display: none; }
#LastAngleDigit1 { left: 200px; }
#LastAngleDigit2 { left: 208px; }

/* --- Score panel (placar de equipes) --- */
#score_panel {
  position: absolute; right: 10px; top: 4px;
  display: flex; gap: 10px;
}
#score_panel_a, #score_panel_b {
  color: #fff; font-size: 11px; font-weight: bold;
}

/* --- Drag-fire button (#slice_drag_button) --- */
/* Posicionado no canto direito do #gameui */
#slice_drag_button {
  position: absolute;
  right: 5px; top: 4px;
  width: 80px; height: 86px;
  cursor: grab;
  background: radial-gradient(circle at 40% 35%, #ffe066, #c05000);
  border: 2px solid rgba(255,200,100,.6);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  user-select: none; touch-action: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
}
#slice_drag_button .Alt { color: rgba(255,255,255,.8); font-size: 14px; }
#slice_drag_button.disabled { opacity: .35; pointer-events: none; }
#slice_drag_button.dragging {
  cursor: grabbing;
  background: radial-gradient(circle at 40% 35%, #ff9933, #cc3300);
  box-shadow: 0 0 12px rgba(255,100,0,.6);
}

/* --- Wind meter (#wind_meter2 canvas) --- */
/* DragonBound: top:1,left:367; BoomBound: top:1,left:413 */
#wind_meter2 {
  position: absolute; top: 1px; left: 413px;
  opacity: .9; pointer-events: none;
}

/* --- Timer de turno (#turn_timer) --- */
/* DragonBound: top:0,left:675,125×100; BoomBound: left:759 */
#turn_timer {
  position: absolute; top: 0; left: 759px;
  width: 125px; height: 100px;
  display: none; pointer-events: none;
  text-align: center; line-height: 100px;
  font-size: 3rem; font-weight: 900;
  color: #ff2222;
  text-shadow: 0 0 14px rgba(255,0,0,.7), 0 2px 4px rgba(0,0,0,.9);
  font-variant-numeric: tabular-nums;
}

/* --- Lista de turnos (#turns_list) --- */
/* DragonBound: left:2,bottom:86,w:200; BoomBound: bottom:72 */
#turns_list {
  position: absolute; left: 2px; bottom: 72px;
  width: 200px;
  border: 1px solid rgba(0,0,0,.6);
  padding-bottom: 1px; overflow: hidden;
  pointer-events: none;
  transform: translateZ(0);
  background: rgba(0,0,0,.3);
}
.turn_list_title {
  color: #fff; font-size: 11px;
  padding: 1px 3px 2px;
}
.turn_line {
  position: relative; height: 15px;
  display: none;
  margin: 0 2px 0 3px;
}
.turn_line_number {
  position: absolute; left: 0; top: 2px;
  width: 15px; height: 15px;
  font-size: 10px; color: rgba(255,202,65,.7);
}
.turn_line_rank {
  position: absolute; left: 15px; top: 2px;
  width: 25px; height: 15px;
}
.turn_line_name {
  position: absolute; left: 40px; top: 2px;
  width: 121px; height: 15px;
  color: #ffca41; font-size: 12px;
  white-space: nowrap; overflow: hidden;
}
.turn_line_delay {
  position: absolute; right: 0; top: 2px;
  width: 30px; height: 15px;
  color: #aaa; font-size: 10px; text-align: right;
}

/* --- Chat in-game --- */
/* DragonBound: left:20,top:20,w:542,h:111; BoomBound adaptado */
#gameChat {
  position: absolute; left: 22px; top: 22px;
  width: 490px; height: 92px;
  color: #acf2f6; font-size: 12px;
  pointer-events: none;
  overflow: hidden;
}
#gameChat .viewport {
  width: 490px; height: 92px;
  overflow: hidden; position: relative;
}
#gameChat .overview {
  position: absolute; left: 0; top: 0;
  padding: 0; margin: 0;
  word-wrap: break-word; width: 490px;
}
.chat-line {
  color: #acf2f6; font-size: 12px;
  line-height: 1.3;
  text-shadow: 1px 1px 0 rgba(0,0,0,.8);
}

#gameInput {
  position: absolute; left: 326px; bottom: 77px;
  width: 450px;
  color: #acf2f6;
  background: transparent; border: 0;
  font-size: 12px;
  pointer-events: auto; outline: none;
  z-index: 3;
}
#gameInput:focus {
  border-bottom: 1px solid orange;
  background: rgba(0,24,57,.7);
}

/* --- Player HP boxes --- */
/* Ficam dentro de #players-hud, posicionados pelo engine */
.Player {
  position: absolute; display: none;
  width: 160px;
  transform: translate3d(0,0,0);
  pointer-events: none;
}
.PlayerHPBox {
  position: absolute; top: 10px; left: -40px;
  width: 76px; height: 3px;
  border: 1px solid white;
  background: #292c29; z-index: 1;
}
.PlayerHP {
  position: absolute; top: 0; left: 0;
  height: 3px; background: #63b64a;
}
.PlayerShield {
  position: absolute; top: 0; left: 0;
  height: 3px; background: #00f; width: 0;
}
.PlayerRank {
  position: absolute; top: 17px; left: -40px;
  width: 25px; height: 15px;
}
.PlayerName {
  position: absolute; top: -2px; left: -40px;
  width: 76px; font-size: 9px;
  color: #fff; text-align: center;
  white-space: nowrap;
  text-shadow: 1px 1px 0 #000, -1px 1px 0 #000;
}

/* --- Touch UI --- */
/* DragonBound: left:430,top:150,350×350; BoomBound: left:484,top:125,394×292 */
#touch_ui {
  position: absolute; left: 484px; top: 125px;
  width: 394px; height: 292px;
  display: none; z-index: 5;
  pointer-events: auto;
}
#btnLeft, #btnRight, #btnUp, #btnDown {
  position: absolute;
  opacity: .4; cursor: pointer;
  background: rgba(255,255,255,.1);
  border-radius: 8px;
  transition: opacity .1s;
}
#btnLeft:active, #btnRight:active, #btnUp:active, #btnDown:active { opacity: .7; }
#btnLeft  { left: 113px; top: 83px; width: 79px; height: 125px; }
#btnRight { left: 315px; top: 83px; width: 79px; height: 125px; }
#btnUp    { left: 169px; top:  0;   width: 169px; height: 58px; }
#btnDown  { left: 169px; top: 233px; width: 169px; height: 58px; }

/* --- Tela de resultado (#game_over) --- */
#game_over {
  position: absolute; left: 0; top: 0;
  width: 900px; height: 500px;
  display: none;
  background: rgba(0,0,0,.85);
  transform: translate3d(0,0,0);
  z-index: 50;
  pointer-events: auto;
}
.score {
  position: absolute; display: none;
  width: 380px; height: 88px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 4px;
}
#score0 { left: 80px; top:  50px; }
#score1 { left: 80px; top: 150px; }
#score2 { left: 80px; top: 250px; }
#score3 { left: 80px; top: 350px; }

.score_name {
  position: absolute; left: 80px; top: 11px;
  width: 260px; color: #ffca41;
  font-size: 11px; font-weight: bold;
}
.score_gp {
  position: absolute; left: 80px; top: 29px;
  color: #fff; font-size: 11px; font-weight: bold;
}
.score_gold {
  position: absolute; left: 80px; top: 47px;
  color: #e1ce84; font-size: 11px;
}
.score_rank {
  position: absolute; left: 5px; top: 5px;
  width: 25px; height: 15px;
}
.score_me {
  position: absolute; right: 5px; top: 5px;
  font-size: 10px; color: #ffca41;
}
.score_state {
  position: absolute; right: 5px; bottom: 5px;
  font-size: 11px; color: #aaa;
}

#GameOverMyGPGot {
  position: absolute; left: 50%; top: 60px;
  transform: translateX(-50%);
  font-size: 22px; font-weight: bold;
  color: #ffca41;
}
#GameOverMyGP, #GameOverMyGPNext {
  position: absolute; color: #ffca41;
  font-size: 13px; font-weight: bold;
}
#GameOverMyGP    { left: 50%; top: 100px; transform: translateX(-50%); }
#GameOverMyGPNext{ left: 50%; top: 120px; transform: translateX(-50%); color: #aaa; }

#GameShare {
  position: absolute; bottom: 20px; right: 20px;
  cursor: pointer; color: #ffca41;
  font-size: 14px; font-weight: bold;
  padding: 8px 20px;
  background: rgba(255,202,65,.15);
  border: 1px solid rgba(255,202,65,.4);
  border-radius: 4px;
}
#GameShare:hover { background: rgba(255,202,65,.25); }

/* --- Mensagem flutuante de turno --- */
.turn-message {
  position: fixed;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,.88);
  border: 2px solid #f59e0b;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 1rem; font-weight: 700;
  text-align: center; z-index: 9000;
  pointer-events: none; white-space: nowrap;
  text-shadow: 0 1px 3px #000;
}

/* --- Utilitários DragonBound --- */
.NoSelect {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.ForceHW { transform: translateZ(0); }
.blackShadow { text-shadow: -1px 0 2px #000, 0 1px 2px #000, 1px 0 2px #000, 0 -1px 2px #000; }
.whiteShadow { text-shadow: -1px 0 2px #fff, 0 1px 2px #fff, 1px 0 2px #fff, 0 -1px 2px #fff; }
.CanSelect   { user-select: text; }
