/* INFINITYBOUND V51 - Boton Mobile en una capa superior y solo en lobby 2/6. */

/* Evita que aparezca el fondo blanco del documento debajo del lienzo 800x600. */
html{
  min-height:100%!important;
  background-color:#090314!important;
}
body{
  min-height:100vh!important;
  background-color:#090314!important;
}

/* Fondo de pantalla completo solamente para los lobbies especiales 2 y 6. */
body.IBTournamentWideBG:after{
  content:"";position:fixed;inset:0;z-index:0;pointer-events:none;
  background-color:#090314;background-image:var(--ib-wide-bg)!important;
  background-repeat:no-repeat;background-position:center center;background-size:cover;
}

/* Fondo exclusivo del lobby para los servidores visibles 2 y 6.
   El archivo pertenece al tema ThorsHammer; no altera salas ni partidas. */
body.IBServer2,
body.IBServer6{
  --ib-wide-bg:url(/static/images/themes/ThorsHammer/server2_server6_bg.jpg?v=4);
}
body.IBServer2 #container.Lobby #channelScreen,
body.IBServer6 #container.Lobby #channelScreen{
  background-image:url(/static/images/themes/ThorsHammer/server2_server6_bg.jpg?v=4)!important;
  background-position:center center!important;
  background-size:cover!important;
  background-repeat:no-repeat!important;
}
#container{z-index:1}

/* V45: en los servidores 2 y 6 el fondo ancho se genera como una capa fija.
   Dragon2D no tenia z-index y esa capa terminaba dibujandose encima del mapa.
   El orden correcto es: fondo (0), canvas del mapa (2), interfaz/HUD (3).
   Dragon2D permanece oculto en el lobby, por lo que su diseno no cambia. */
body.IBTournamentWideBG #Dragon2D{
  z-index:2!important;
}
body.IBTournamentWideBG #container{
  z-index:3!important;
}

/* Selector original de moviles para Serve 2 y Serve 6.
   El elemento y su accion ya existen en el cliente. Estas reglas vencen la
   clase hide del HTML y muestran exactamente el PNG entregado. */
body.IBServer2 #container.Lobby #lobbyButtonMobile,
body.IBServer6 #container.Lobby #lobbyButtonMobile,
#container.Lobby #lobbyButtonMobile.IBMobileForcedVisible{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
  position:absolute!important;
  left:530px!important;
  top:145px!important;
  width:53px!important;
  height:71px!important;
  background-image:url(/static/images/mobile-selector-original.png?v=50)!important;
  background-position:0 0!important;
  background-repeat:no-repeat!important;
  background-size:53px 71px!important;
  background-color:transparent!important;
  border:0!important;
  box-shadow:none!important;
  cursor:pointer!important;
  z-index:2147483646!important;
  transform:none!important;
  isolation:isolate!important;
}
body.IBServer2 #container.Lobby #lobbyButtonMobile.IBMobileWaiting,
body.IBServer6 #container.Lobby #lobbyButtonMobile.IBMobileWaiting{
  display:none!important;
}
body.IBServer2 #container.Lobby #lobbyButtonMobile .Alt,
body.IBServer6 #container.Lobby #lobbyButtonMobile .Alt,
#container.Lobby #lobbyButtonMobile.IBMobileForcedVisible .Alt{
  display:none!important;
}

/* Cuando no estamos realmente en el lobby 2/6, nunca se muestra. Esto evita
   que el parche pueda aparecer dentro de una sala o durante una partida. */
#container:not(.Lobby) #lobbyButtonMobile,
#lobbyButtonMobile:not(.IBMobileForcedVisible){
  display:none!important;
}

/* El diseño del lobby fue creado sobre un lienzo exacto de 800 x 600.
   Se impide que el tema lo estire, recorte o desplace respecto a la interfaz. */
#container.Lobby #channelScreen{
  width:800px!important;height:600px!important;
  background-size:800px 600px!important;
  background-position:0 0!important;
  background-repeat:no-repeat!important;
}

/* El tema puede cambiar imágenes y colores, pero no la geometría del panel. */
#container.Lobby #myInfoBox{left:566px!important;top:76px!important;width:229px!important;height:191px!important;box-sizing:border-box!important;overflow:hidden!important}
#container.Lobby #myName2,#container.Lobby #myName3{left:574px!important;top:84px!important;max-width:207px!important;white-space:nowrap!important;overflow:hidden!important}
#container.Lobby #myPhotoDiv{left:570px!important;top:103px!important;width:35px!important;height:35px!important;overflow:hidden!important}
#container.Lobby #myGP2{right:66px!important;top:208px!important;line-height:13px!important}
#container.Lobby #myCash2{right:52px!important;top:222px!important;line-height:13px!important}
#container.Lobby #myGold2{right:52px!important;top:237px!important;line-height:13px!important}
#container.Lobby #channel_player{left:661px!important;top:205px!important;max-width:120px!important;max-height:48px!important;overflow:hidden!important}

#container.Lobby #buttonAllBuddyList1{left:568px!important;top:282px!important}
#container.Lobby #buttonAllBuddyList2{top:282px!important}
#container.Lobby #buttonAllBuddyList3{top:282px!important}
body.SD #container.Lobby #buttonAllBuddyList2{left:641px!important}
body.SD #container.Lobby #buttonAllBuddyList3{left:711px!important}
body.HD #container.Lobby #buttonAllBuddyList1{left:568px!important}
body.HD #container.Lobby #buttonAllBuddyList2{left:632px!important}
body.HD #container.Lobby #buttonAllBuddyList3{left:713px!important}

#container.Lobby #itemsSelection{left:569px!important;top:311px!important;width:224px!important;height:207px!important;box-sizing:border-box!important;overflow:hidden!important}
#container.Lobby #friendsList,#container.Lobby #guildMembersList{left:568px!important;top:311px!important;width:226px!important;height:207px!important;box-sizing:border-box!important;overflow:hidden!important}
#container.Lobby #friendsList .viewport,#container.Lobby #guildMembersList .viewport{height:205px!important;max-width:213px!important;overflow:hidden!important}
#container.Lobby #guildRoomTabExtra{max-width:226px!important;overflow:hidden!important}
#container.Lobby #buttonOptions{left:584px!important;top:536px!important}
#container.Lobby #buttonChannels{left:718px!important;top:536px!important}

/* Server 2: quitar solamente la capa gris que cubria el marco del perfil. */
body.IBServer2 #container.Lobby #myInfoBox{
  background:transparent!important;
  background-image:none!important;
  background-color:transparent!important;
}

/* V41: subir solamente los controles del chat hasta la ranura dibujada.
   No depende del nombre del tema y funciona en todos los servidores. */
#container #channelInput{
  top:559px!important;
  width:392px!important;
}
#container #lobby_channel{
  bottom:21px!important;
}
#container #channelInputAlt{
  left:485px!important;
  top:561px!important;
}
#container #channelEmojiBtn{
  left:475px!important;
  top:560px!important;
}
#container #roomInput{
  left:100px!important;
  top:555px!important;
  width:448px!important;
  height:18px!important;
  box-sizing:border-box!important;
}
#container #roomEmojiBtn{
  top:557px!important;
}

/* Ventana de servidores ThorsHammer: marco Halloween 690x560.
   Solo cambia la pantalla de selección y conserva los IDs reales. */
body.IBThemeThorsHammer #BrokerWindow{
  left:55px!important;
  top:20px!important;
  width:690px!important;
  height:560px!important;
  transform:none!important;
  background-size:690px 560px!important;
  background-position:0 0!important;
  background-repeat:no-repeat!important;
  background-color:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
body.IBThemeThorsHammer #BrokerPlayer{
  left:200px!important;
  top:62px!important;
}
body.IBThemeThorsHammer #BrokerTitle{
  top:96px!important;
}
body.IBThemeThorsHammer #BrokerChannel0{left:45px!important;top:135px!important}
body.IBThemeThorsHammer #BrokerChannel1{left:250px!important;top:135px!important}
body.IBThemeThorsHammer #BrokerChannel2{left:455px!important;top:135px!important}
body.IBThemeThorsHammer #BrokerChannel3{left:45px!important;top:230px!important}
body.IBThemeThorsHammer #BrokerChannel4{left:250px!important;top:230px!important}
body.IBThemeThorsHammer #BrokerChannel5{left:455px!important;top:230px!important}
/* Server 7 centrado directamente debajo de Server 5. */
body.IBThemeThorsHammer #BrokerChannel6{left:250px!important;top:325px!important}
body.IBThemeThorsHammer #BrokerChannel6.IBServerLocked{
  cursor:not-allowed!important;
  filter:grayscale(.65) brightness(.72)!important;
  opacity:.88!important;
}
body.IBThemeThorsHammer #BrokerChannel6.IBServerLocked .BrokerChannelName{
  color:#ffd36b!important;
}
body.IBThemeThorsHammer #BrokerLogout{right:24px!important;bottom:22px!important}
body.IBThemeThorsHammer #BrokerRefresh{right:25px!important;top:22px!important}

/* V39: indicador visible de la municion realmente seleccionada.
   La clase Pressed ya la controla el juego para clic, tactil y teclado. */
#btnShot1,#btnShot2,#btnShotSS{
  transition:filter .12s ease,box-shadow .12s ease!important;
}
#btnShot1.Pressed,#btnShot2.Pressed,#btnShotSS.Pressed{
  border-radius:5px!important;
  outline:2px solid #ffe178!important;
  outline-offset:-2px!important;
  box-shadow:
    0 0 0 2px #ff8a00,
    0 0 9px 4px rgba(255,105,0,.95),
    inset 0 0 11px 3px rgba(255,195,45,.88)!important;
  filter:brightness(1.38) saturate(1.35) drop-shadow(0 0 4px #ffbd3d)!important;
  z-index:20!important;
}

/* InfinityBound - FIX FONDO RESULTADOS */
#game_over {
    background-image: url("/static/images/themes/dragonbound/scores_stuff.png?infinity-results-fix-20260920") !important;
    background-repeat: no-repeat !important;
    background-position: center top !important;
    background-size: auto !important;
}

#game_over #scores_lose_a,
#game_over #scores_lose_b {
    background-repeat: no-repeat !important;
    background-position: center !important;
}

#game_over .score {
    position: relative;
    z-index: 2;
}

/* FIX DEFINITIVO - FONDO DEL RESULTADO GANADOR */
#game_over #scores_lose_a,
#game_over #scores_lose_b {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-image: url("/static/images/themes/dragonbound/scores_stuff.png?winner-fix-20260920") !important;
    background-repeat: no-repeat !important;
    background-position: center top !important;
    background-size: 800px auto !important;
}

/* RESULTADOS - RESTAURAR SPRITE ORIGINAL */
#game_over #scores_lose_a,
#game_over #scores_lose_b {
    background-image: url("/static/images/themes/dragonbound/scores_stuff.png?infinity-results-final-20260920") !important;
    background-repeat: no-repeat !important;
    background-size: 800px 773px !important;
    width: 200px !important;
    height: 64px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#game_over #scores_lose_a {
    left: 115px !important;
    top: 24px !important;
    background-position: -200px -708px !important;
}

#game_over #scores_lose_a.win {
    background-position: 0 -708px !important;
}

#game_over #scores_lose_b {
    left: 485px !important;
    top: 24px !important;
    background-position: -200px -708px !important;
}

#game_over #scores_lose_b.win {
    background-position: 0 -708px !important;
}
