/* ------------ fight ---------------------------------------------*/
#fight {
   background: url(../images/battlegrounds/bg5.jpg);
   background-size: cover;
   background-position: center center;
}



#battlefield {
   position: relative;
   z-index: 1;
}

#boxFightEffects {
   position: absolute;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
   pointer-events: none;
   z-index: 8;
}

#battlefield>div {
   height: 50vh;
}

#battlefield>div>div {
   height: 50%;
}

/* the 4 main rows */
.mainRow {
   padding: 0 6% 0 6%;
}

.placeholder {
   width: 40;
   margin: 0 -20px;
   /* remove marign so we dont have dead spots */
}

#battlefield .card,
#battlefield .cardMSSpacer,
.placeholder,
.cardMid {
   transform: scale(0.42);
   transform-origin: 0% 0%;
   /* zoom: 0.4; */
}

.cardMid {
   margin: 8px 0;
}

#boxUserHand,
.boxCardsPlayed {
   width: 100%;
   display: flex;
   justify-content: center;
   /* Center the divs horizontally */
   align-items: flex-start;
   /* Align the divs to the top */
   flex-wrap: nowrap;
}

#boxUserHand>div,
.boxCardsPlayed>div {
   flex: 0 0 calc(100% / 7);
   /* Each div takes up 1/7th of the container width */
   max-width: calc(100% / 7);
   /* Ensure divs do not exceed 1/7th of the container */
   box-sizing: border-box;
   /* Ensures padding and borders are included in the div's width */
   padding-left: 6px;
}

#boxUserHand .card {
   height: auto;
   aspect-ratio: 240/390;
}

#boxUserHand .dragging .cardPowers {
   display: block;
   max-width: 27vw;
   /* because playing the card puts it in absolute relations */
}

.boxCardsPlayed .card {
   background: none;
}

#boxCPUHandCount {
   position: absolute;
   top: -2px;
   left: 85%;
   text-align: center;
   font-size: 20px;
   border: 2px solid black;
   box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
   background: #222;
   padding: 5px !important;
   width: 40px;
   line-height: 40px;
   border-bottom-left-radius: 4px;
   border-bottom-right-radius: 4px;
}

/* motherships */
.boxMs {
   position: absolute;
   left: 45%;
   width: 10%;
   height: auto !important;
   aspect-ratio: 648/805;
   text-align: center;
   font-size: 20px;
   background-image: url(../images/sprites/ms/01/100.png);
   background-size: contain;
   background-repeat: no-repeat;
   z-index: 5;
}

#boxCPUMs {
   transform: rotate(180deg);
   top: 0;
}

#boxUserMs {
   bottom: 0;
}

#boxCPUTalk {
   position: absolute;
   top: 20px;
   left: 8%;
   max-width: 32%;
   padding: 0.5em;
   background: rgba(0, 0, 0, 0.6);
   backdrop-filter: blur(7px);
   -webkit-backdrop-filter: blur(7px);
   box-shadow: 2px 3px 4px rgba(0, 0, 0, 0.3);
   color: rgba(255, 255, 255, 0.7);
   text-shadow: 0 0 3px rgba(255, 255, 255, 0.3);
}

.boxPlayerEnergy,
.boxHp {
   position: absolute;
   left: 50%;
   transform: translateX(-50%);
   width: 50px;
   color: rgba(255, 255, 255, 0.8);
   text-align: center;
   text-shadow: 0 0 2px white;
}

.boxHp {
   font-size: 16px;
}

.boxPlayerEnergy {
   font-size: 15px;
   color: #2df8fd;
   /* height: 13.8vh;  */
   left: 48%;
   height: 54%;
   display: flex;
   align-items: center;
   justify-content: center;
}

#boxUserEnergy {}

#boxCPUEnergy {
   transform: rotate(180deg) translate(50%);
}

#boxUserHp {
   bottom: 1px;
}

#boxCPUHp {
   top: calc(100% - 23px);
   transform: rotate(180deg) translateX(50%);
}

/*#boxUserHand .card.selected {
    animation: slideOut 500ms ease-out forwards 1;
}

@keyframes slideOut {
    0% {
        margin-top: 10px;
        transform: scale(0.45);
    }
    100% {
        margin-top: -150px;
       transform: scale(0.85);
    }
}*/

#battlefield .dragging {
   position: absolute !important;
   z-index: 7;
   /* transform: scale(1.4) !important; */
   transition: transform 300ms;
}

#boxNextTurn {
   position: absolute;
   right: 0px;
   top: calc(50% - 45px);
   width: 90px;
   height: 90px;
   background-size: contain;
   background-repeat: no-repeat;
   background-image: url(../images/buttons/btn-next-off.png);
   z-index: 7;
}

#boxNextTurn div {
   position: absolute;
   left: 0;
   top: 0;
   right: 0;
   bottom: 0;
   background-size: contain;
   background-repeat: no-repeat;
}

#boxNextTurn.disabled div {
   background: none;
}

#boxNextTurn div.ring-1 {
   background-image: url(../images/buttons/btn-next1.png);
}

#boxNextTurn.active div.ring-1 {
   animation: nextTurnRotate 3s ease-in-out infinite;
}

#boxNextTurn div.ring-1-light {
   background-image: url(../images/buttons/btn-next1-light.png);
}

#boxNextTurn div.ring-2 {
   background-image: url(../images/buttons/btn-next2.png);
}

#boxNextTurn.active div.ring-2 {
   animation: nextTurnRotate 4s ease-in-out alternate-reverse infinite;
}

#boxNextTurn div.ring-2-light {
   background-image: url(../images/buttons/btn-next2-light.png);
}

#boxNextTurn div.inner {
   background-image: url(../images/buttons/btn-next3.png);
}

#boxNextTurn.active div.inner {
   background-image: none;
}

#boxNextTurn.blinking div.inner {
   animation: nextTurnBlink 1.6s ease-in-out infinite;
}

#boxNextTurn.spinDown div {
   animation: spinDown 1.6s ease-out once;
}

@keyframes nextTurnRotate {
   0% {
      transform: rotate(0deg);
   }

   100% {
      transform: rotate(360deg);
   }
}

@keyframes nextTurnBlink {
   0% {
      opacity: 1;
   }

   50% {
      opacity: 0;
   }

   100% {
      opacity: 1;
   }
}

/* spin down to 0deg */
@keyframes spinDown {
   100% {
      transform: rotate(0deg);
   }
}

#boxFightLog {
   xdisplay: none;
   position: absolute;
   left: -5px;
   top: 3%;
   max-height: 40%;
   width: 20%;
   overflow: hidden;
   overflow-y: scroll;

   padding: 0.3em;
   background: rgba(0, 0, 0, 0.6);
   backdrop-filter: blur(7px);
   -webkit-backdrop-filter: blur(5px);

   font-size: 60%;
   color: rgba(255, 255, 255, 0.7);

   border: 3px solid #f6e9a2;
   border-radius: 3px;
   box-shadow: 0px 0px 10px rgba(248, 183, 72, 0.6),
      /* outer shadow */
      0px 0px 15px rgba(248, 183, 72, 0.3),
      /* outer shadow */
      inset 0px 0px 30px rgba(0, 0, 0, 1);
   /* inset shadow */
   z-index: 6;
}

#boxFightLog p {
   margin: 0;
   padding: 0.3em;
}

#boxFightLog p.newTurn {
   color: #f6e9a2;
   font-weight: bold;
   border-top: 1px solid rgba(246, 233, 162, .5);
}

#boxFightLog p:nth-child(even) {
   background: rgba(248, 183, 72, 0.15);
}

#boxFightAlert {
   font-family: "orbitron", "Open Sans", sans-serif;
   display: none;
   position: absolute;
   left: 20%;
   top: 10%;
   right: 20%;

   padding: 0.4em;
   color: rgb(8, 224, 8);
   background: rgba(4, 71, 11, 0.95);
   font-size: 85%;

   border: 2px solid rgb(8, 224, 8);
   outline: 2px solid rgb(4, 71, 11);

   box-shadow: 4px 4px 0px black;
   z-index: 8;
}

#boxCallToAction {
   display: none;
   position: absolute;
   bottom: 15%;
   left: 25%;
   width: 50%;
   padding: 0.5em;
   background: rgba(0, 0, 0, 0.6);
   backdrop-filter: blur(7px);
   -webkit-backdrop-filter: blur(7px);

   color: rgba(255, 255, 255, 0.7);
   text-align: center;
   text-shadow: 0 0 3px rgba(255, 255, 255, 0.3);

   border: 5px solid #f6e9a2;
   border-radius: 3px;
   box-shadow: 0px 0px 10px rgba(248, 183, 72, 0.6), 0px 0px 15px rgba(248, 183, 72, 0.3);
   z-index: 7;
}

#boxSaveMatch {
   position: absolute;
   left: 10px;
   bottom: 10px;
   font-size: 26px;
   z-index: 8;
}

#btnEndTutorial {
   position: absolute;
   right: 10px;
   bottom: 10px;
   z-index: 8;
}

.beam {
   position: absolute;
   background-image: url(../images/sprites/beam.png);
   background-size: contain;
   background-repeat: no-repeat;
   width: 50px;
   height: 50px !important;
   z-index: 7;
}

.beamGreen {
   background-image: url(../images/sprites/beamGreen.png);
}

xxx.beam0 {
   background-image: url(../images/sprites/beamBlue.png);
}

.beamHacking {
   background-image: url(../images/sprites/beamHacking.png);
}


#battlefield .beamFromAbove {
   position: absolute; 
   left: 0px; 
   background-image: url(../images/sprites/beamGreenAnim.png);
   background-position: 0px 0px;
   background-size: 800px 800px;
   background-repeat: no-repeat;
   width: 100px;  
   height: 800px!important; 
   z-index: 7;
   animation: animateBeamFromAbove 0.7s steps(7) forwards;
}

@keyframes animateBeamFromAbove {
   from {
      background-position: 0px 0px;
   }
   to {
      background-position: -700px 0px;
   }
}

/* popup fight_enemy */

#fightEnemySelector {
   position: relative;
   background-color: #040200;
   background-image: url(../images/bg/fight_users.jpg);
   background-size: 100%;
   background-repeat: no-repeat;
   background-position: center top;
   height: 100vh;
}

#fightEnemySelector .userName {
   font-size: 0.9em;
   position: absolute;
   top: 5vw;
   /* has to move down the wider the display*/
   width: 19%;
   text-align: center;
}

#fightEnemySelector .user .userName {
   left: 9.5%;
}

#fightEnemySelector .enemy .userName {
   left: 71.5%;
   line-height: 1.25em;
}

#fightEnemySelector .user,
#fightEnemySelector .enemy {
   position: absolute;
   width: 100%;
   height: 100vh;
   left: 0;
   top: 0;
}

#fightEnemySelector .userStats {
   position: absolute;
   top: 21%;
   width: 19%;
}

#fightEnemySelector .user .userStats {
   left: 9.5%;
}

#fightEnemySelector .enemy .userStats {
   left: 71.5%;
}

#fightEnemySelector .avatar {
   position: absolute;
   top: 9vw;
   width: 16%;
   aspect-ratio: 1/1;
   outline: 1px solid rgba(180, 225, 240, 0.7);
   border-top: 1px solid #eeb5a4;
   box-shadow: 0 0 2px #6ef, 0 0 5px #6ef, 0 0 10px #6ef, 0 0 20px #6ef, 0 0 40px #6ef, 0 0 80px #6ef, 0 0 90px #6ef;
   zoom: 0;
}

#fightEnemySelector .user .avatar {
   right: 49%;
   z-index: 2;
}

#fightEnemySelector .enemy .avatar {
   left: 49%;
   top: 13vw;
}

.radar-box {
   font-family: "Orbitron", "Open Sans", sans-serif;
   margin-top: 2px;
   color: #0ef;
   text-align: center;
   width: 83%;
   height: 24px;
   line-height: 22px;
   border: 1px solid #0ef;
   border-radius: 7px;
   background: linear-gradient(to right, rgba(0, 0, 0, .8) 0%, #0ef 5%, rgba(0, 0, 0, .8) 10%, rgba(0, 0, 0, .8) 50%, #0ef 55%, rgba(0, 0, 0, .8) 60%, rgba(0, 0, 0, .8) 100%);
   background-size: 200% 100%;
   animation: moveRadar 2s linear infinite;
}

.boxWaitTime {
   font-size: 70%;
   text-align: center;
   color: #db561b;
   margin: 5px;
}

@keyframes moveRadar {
   0% {
      background-position: -100% 0;
   }

   100% {
      background-position: 100% 0;
   }
}


.boxFightButtons {
   position: absolute;
   left: 50%;
   width: 30%;
   margin-left: -15%;
   top: 33vw;
   text-align: center;
}

.boxFightButtons div {
   display: block;
   margin: 0 auto 10px auto;
}

#btnFight {
   font-size: 1.2em;
}

#btnCancel {
   font-size: 0.9em;
   opacity: 0.8;
}

#boxVS {
   position: absolute;
   left: 50%;
   width: 10%;
   margin-left: -5%;
   top: 14vw;
   text-align: center;
   z-index: 3;
   zoom: 0;
}

#boxVS h4 {
   font-size: 50px;
   margin: 0;
   color: #fff;
   text-shadow: 0 0 2px #6ef, 0 0 5px #6ef, 0 0 10px #6ef, 0 0 20px #6ef, 0 0 2px #6ef, 0 0 5px #6ef, 0 0 10px #6ef, 0 0 20px #6ef, 0 0 2px #6ef, 0 0 5px #6ef,
      0 0 30px #6ef, 0 0 50px #6ef;
}

.damageIndicator {
   position: absolute;
   right: 10px;
   bottom: 10px;
   font-size: 200%;
   font-weight: bold;
   text-shadow: 0 0 2px #211, 0 0 6px #211;
   color: crimson;
   opacity: 0;
   z-index: 4;
}

/* ---------------- game over -------------------------------- */

#fightGameOver {
   font-family: "Orbitron", "Open Sans", sans-serif;
   background-color: rgba(7, 14, 19, 0.4);
   backdrop-filter: blur(5px);
   background-image: url(../images/bg/fight_gameOver.jpg);
   background-repeat: no-repeat;
   background-size: auto 100%;
   background-position: center top;
   text-align: center !important;
}

#boxGameResult div,
.boxScanning {
   position: absolute;
   width: 30%;
   left: 35%;
   top: 12.5%;
   text-align: center;
   font-size: 1.6em;
   color: #fff;
   text-shadow: 0 0 2px #6ef, 0 0 5px #6ef, 0 0 10px #6ef, 0 0 20px #6ef, 0 0 2px #6ef, 0 0 5px #6ef, 0 0 10px #6ef, 0 0 20px #6ef, 0 0 2px #6ef, 0 0 5px #6ef,
      0 0 30px #6ef, 0 0 50px #6ef;
   text-transform: uppercase;
}

#eloChange {
   font-size: 1.2em;
   margin: 1.2em auto 0 auto;
}

#xpGain {
   font-size: 1.2em;
   margin: 1em auto 1em auto;
}

#xpModuleBonus {
   background: rgba(0, 0, 0, 0.95);
   margin: 20px -20px;
   color: #f88;
   border: 2px solid #f88;
   box-shadow: 0 0 3px #f88 0 0 3px #f88 inset;
}

.boxEloChange,
.boxTblDataGain {
   position: absolute;
   left: 5%;
   top: 35px;
   width: 20%;
}

.boxTblDataGain {
   text-transform: uppercase;
   top: auto;
   font-size: 70%;
   bottom: 20px;
}

.tblDataGain td:last-child {
   text-align: right;
   width: 50px;
}

.boxXpGain,
#fightGameOver .btnBox,
.boxCreditsChange {
   position: absolute;
   right: 5%;
   top: 90px;
   width: 20%;
}

.xpBar {
   color: rgba(255, 240, 240, 0.95);
   box-shadow: 0 0 2px #faa, 0 0 1px #faa inset;
   background-color: rgba(250, 200, 200, 0.9) !important;
}

.boxCreditsChange {
   top: 20px;
   padding: 10px;
}

.boxTblDataGain .bar {
   display: inline-block;
   width: 0%;
   height: 6px;
   font-size: 0.5em;
   background: #aef;
   box-shadow: 0 0 2px #6ef, 0 0 6px #6ef inset;
   border-radius: 0 !important;
}

.boxTblDataGain .bar.bonus {
   background: rgba(252, 177, 79, 0.95);
   box-shadow: 0 0 3px rgba(252, 177, 79, 0.95);
}

.legendBase {
   color: #aef;
   border-top: 3px solid #aef;
   text-shadow: none;
}

.legendModule {
   color: rgba(252, 177, 79, 0.95);
   border-top: 3px solid rgba(252, 177, 79, 0.95);
   text-shadow: none;
}

.boxScanning {
   font-size: 1em;
   left: 38%;
   width: 22%;
   top: 25%;
   height: 45vh;
}

.boxScanning [data-lang="scanningForLoot"] {
   width: 60%;
   margin: auto;
   margin-top: 10%;
}

.boxScanning .junk {
   position: absolute;
   width: 40px;
   height: 40px;
   line-height: 32px;
   border-width: 2px;
   border-style: solid;
   padding: 3px;
   font-size: 0.7em;
}

#boxPopLoot {
   z-index: 9;
}

#fightGameOver .btnBox {
   top: 85%;
}

#btnSurrender {
   position: absolute;
   right: 0px;
   top: 0;
   width: 40px;
   height: 40px;
   background-image: url(../images/buttons/btn-surrender.png);
   background-size: contain;
   background-repeat: no-repeat;
   opacity: 0.9;
   z-index: 6;
}

#debugFight {
   position: absolute;
   top: 0;
   left: 60%;
   height: 20%;
   width: 35%;
   overflow-y: scroll;
}

#boxFightLoading {
   position: absolute;
   top: -100vh;
   left: 0;
   right: 0;
   height: 100vh;
   background-image: url(../images/bg/fight_loading.jpg);
   background-size: cover;
   background-position: center center;
   z-index: 7;
}

#boxFightLoading h3 {
   line-height: 100vh;
   text-align: center;
}