:root {
   --cardWidth: 240px;
   --cardHeight: 390px;
   --cardPlayedHeight: 180px;
   /* --cardWidthInner: calc(var(--cardWidth) - var(--cardBorderWidth) * 2);
   --cardBorderWidth: 5px; */
}

#templateCard {
   position: absolute;
   left: 30%;
   top: 20%;
}


/*------------------ CARD ------------------------*/

.card {
   font-family: "Open Sans", sans-serif;
   width: 240px;
   height: 390px; /* ar 11/16 */
   background: #111;
   background-size: contain;
   background-repeat: no-repeat;
   background-position: center top;
   border: none;
   border-radius: 2px;
   border-top-right-radius: 20px;
}

.card b {
   xcolor: salmon;
}
.boxEffectIcon b {
   color: #2df8fd;
}

.cardMSSpacer {
   width: 10%;
   margin: 0 30px !important;
}

#pop .card {
   position: absolute;
   left: calc(50% - 100px);
   top: 20px;
}

.card > div {
   position: absolute;
}

.grid2 .card {
   transform: scale(0.85)
}

.grid3 .card {
   transform: scale(0.7)
}


#popupCardDetail.grid2  .boxIconDesc,
#popupCardDetail.grid3  .boxIconDesc,
#popupCardDetail.grid4  .boxIconDesc
{
   display: none;
}


.unitType {
   left: 50%;
   width: 50%;
   line-height: 90%;
   text-align: center;
   top: calc(50% + 1px);
   font-size: 0.8em;
   text-transform: uppercase;
   color: rgba(255, 255, 255, 0.8);
   z-index: 3;
}

.card .cardTypeInstant {
   left: 44%;
   top: -19px;
   width: 40px;
   height: 40px;
   border-radius: 100%;
   border: 1px solid white;
   background-image: url(../images/card/icon-instant.png);
   background-size: contain;
   background-repeat: no-repeat;
   z-index: 3;
}

.card .name {
   display: flex;
   align-items: center; 
   justify-content: center; 
   font-family: "Barlow", Arial, sans-serif;
   top: 50%;
   left: -10px;
   right: -10px;
   height: 72px;
   background-image: url(../images/card/bgName6.png);
   background-size: 100%;
   background-repeat: no-repeat;
   background-position: center;
   xbackground: none;

   color: #62e4e5;
   text-shadow: 0 0 5px rgba(98, 228, 228, 0.5), 0 0 10px rgba(98, 228, 228, 0.4);
   font-size: 26px;

   text-align: center;
   padding: 6px;
   z-index: 2;
}

.boxNameOuter {
   top: 45%;
   width: var(--cardWidth);
   left: -5px;

   background: linear-gradient(45deg, rgba(126, 215, 215, 1) 0%, rgba(30, 90, 96, 1) 100%);
   box-shadow: 0 0 5px rgba(126, 215, 215, 0.5), 0 0 15px rgba(126, 215, 215, 0.5);
   padding: 4px;
   z-index: 3;
}

.boxNameInner {
   width: 100%;
   background: linear-gradient(45deg, rgba(20, 50, 50, 1) 0%, rgba(10, 15, 15, 1) 100%);
}

/* b.name {
   color: #62e4e5;
   text-shadow: 0 0 5px rgba(98, 228, 228, 0.5), 0 0 10px rgba(98, 228, 228, 0.4);
} */

/* colors used for text messages/values */
.colorEnergy{ color: #2df8fd!important;}
.colorCard{ color: white!important; background: black; padding: 2px 5px}
.colorDamage{ color: lightcoral!important;}
.colorHeal{ color: rgba(20, 255, 0, 1)!important;}
.colorSpawn{ color: yellow}
.colorUnitType { color: #666; text-transform: uppercase;}

.card .energy,
.cardMid .energy,
#boxFilterEnergy .energy {
   display: flex;
   align-items: center;
   justify-content: center; 
   width: 40px;
   height: 40px;
   line-height: 40px;
   left: -10px; /*calc(50% - 30px);*/
   top: -10px;
   color: #2df8fd;
   font-size: 160%;
   font-weight: bold;
   text-shadow: 0 0 3px #2df8fd, 0 0 2px #2df8fd;
   text-align: center;
   background-size: contain;
   background-repeat: no-repeat;
   background-image: url(../images/card/icon-energy3.png);
   border-radius: 100%;
   box-shadow: 0 0 5px #2df8fd, 0 0 5px #2df8fd, 0 0 10px #2df8fd, 0 0 10px #2df8fd, 0 0 10px #2df8fd;
   z-index: 3;
}

.card .rarityRibbons {
   left: -45px;
   right: 5px;
   top: calc(50% + 3px);
   height: 20px;
   background-repeat: no-repeat;
   background-size: contain;
   background-image: url(../images/card/rarity-1.png);
   z-index: 3;
}

.rarityRibbons[data-rarity="1"] {
   background-image: url(../images/card/rarity-2.png);
}
.rarityRibbons[data-rarity="2"] {
   background-image: url(../images/card/rarity-3.png);
}
.rarityRibbons[data-rarity="3"] {
   background-image: url(../images/card/rarity-4.png);
}
.rarityRibbons[data-rarity="4"] {
   background-image: url(../images/card/rarity-5.png);
}


.cardPowers {
   display: flex;
   align-items: center; 
   justify-content: center; 
   color: white;
   font-size: 200%;
   font-weight: bold;
   text-align: center;
   width: 50px;
   aspect-ratio: 1/1;
   top: calc(50% - 54px);
   background-size: contain;
   background-repeat: no-repeat;
   z-index: 3;
}

/* widgetAttack2 Design
.card .attack {
    background-image: url(../images/card/widgetAttack2.png);
    left: -23px;
}*/

.card .attack, .cardMid .attack {
   xbackground-image: url(../images/card/widgetAttack0.png);
   background: rgba(150,60,60,.7);
   left: 0px;
  /*  transform-style: preserve-3d;
   transform-origin: left center;
   transform: rotateY(270deg);
   animation: rotateFlat 0.5s ease-in forwards; */
}

.card .hp, .cardMid .hp{
   right: 0px;
   background: rgba(100,100,100,.7);
   xbackground-image: url(../images/card/widgetHp0.png);
   transform-style: preserve-3d;
   transform-origin: right center;
   transform: rotateY(90deg);
   animation: rotateFlat 0.5s ease-in forwards;
}

.cardMid .attack {
   left: -12px;
}
.cardMid .hp {
   right: -12px;
}

.card .cardTexts {
   font-size: 100%;
   background: linear-gradient(rgba(30, 40, 40, 0.9) 0%, rgba(16, 20, 20, 1) 100%);
   border-bottom-left-radius: 10px;
   border-bottom-right-radius: 10px;
   color: rgba(200, 228, 228, 0.85);
   text-align: center;
   left: 0;
   right: 0;
   bottom: 0;
   top: calc(50% + 55px);
   padding: 12px;
   hyphens: auto; /* Aktiviert automatische Silbentrennung */
   word-wrap: break-word; /* Bricht Wörter nur, wenn nötig */
   z-index: 2;
}

.cardTexts div {
   margin: 0 auto 0.5em auto;
}

.card .poem {
   font-style: italic;   
   font-size: 90%;
   margin-top: 6px;
   color: rgba(255, 255, 255, 0.7)

}

.card .poem .effect {
   font-style: normal;
   font-weight: normal;
   font-size: 110%;
   color: rgba(255, 255, 255, 0.9)

}

.card .shield {
   display: none;
   left: -10%;
   right: -10%;
   top: -10%;
   bottom: -10%;
   background-image: url(../images/card/shield.png);
   background-size: 100%;
   background-repeat: no-repeat;
}

.card.shielded .shield {
   display: block;
}

/*
.cardBorder {
   width: var(--cardWidth);
   height: var(--cardHeight);
   position: relative;
   border-top-right-radius: 17px;
   padding: 5px;
   background-color: #111;
    background-size: 150% 150%;
         background-image: repeating-linear-gradient(0deg,rgba(32, 48, 48, 1) 50%, rgba(126, 215, 215, 1) 50%, rgba(125, 212, 212, 1) 60%, rgba(20, 50, 50, 1) 60%,  rgba(32, 48, 48, 1) 100%); 
    animation: animateBorder alternate 5s infinite;

      @keyframes animateBorder {
        0% {background-position: 0% -20%}
        100% {background-position: 0% 50%}
       } 

 */

.cardInner {
   /*    width: var(--cardWidthInner);
   height: calc(var(--cardHeight) - var(--cardBorderWidth) * 2);
   left: var(--cardBorderWidth);
   top: var(--cardBorderWidth); */

   width: 100%;
   height: 100%;
   left: 0;
   right: 0;
   top: 0;

   position: relative;
   background: linear-gradient(0deg, rgba(6, 16, 16, 1) 0%, rgba(6, 16, 16, 1) 100%);
   border-radius: 19px;
   /* breaks ios
         perspective: 800px;
         transform-style: preserve-3d;
         transform-origin: center;
 */
}

.cardInner > div {
   position: absolute;
/*  breaks ios   transform: translateZ(50px); */
}

.cardImage {
   width: 100%;
   aspect-ratio: 1/1;
   background-size: contain;
   background-repeat: no-repeat;
   background-position: center top;
   border-top-right-radius: 15px;
}

/* boxCardPlayed: played cards display ---------------------------------------------------------------------------------        */

.boxCardsPlayed > div,
.boxCardsPlayed .card,
.boxCardsPlayed .cardBorder,
.boxCardsPlayed .cardImage {
   height: 180px;
   background-size: 100% auto;
}

/* .boxCardsPlayed .cardInner,
.boxCardsPlayed .cardImage {
   height: calc(var(--cardPlayedHeight) - var(--cardBorderWidth) * 2);
} */

.boxCardsPlayed .unitType {
   left: auto;
   top: auto;
   right: 5px;
   bottom: -10px;
   width: auto; 
   background: rgba(33, 33, 33, 0.8);
   backdrop-filter: blur(5px);
   -webkit-backdrop-filter: blur(5px);
   text-align: left;
   padding: 2px 10px;
}

/* .boxCardsPlayed .cardTexts {
   background: linear-gradient(90deg, black 0%, rgba(0, 0, 0, 0.3) 100%);
   backdrop-filter: blur(5px);
   top: auto;
   padding: 5px;
   border: none;
   border-radius: 0;
} */

.boxCardsPlayed .cardPowers {
   top: auto;
   bottom: 15px;
}



.boxCardsPlayed .rarityRibbons,
.boxCardsPlayed .cardTexts,
.boxCardsPlayed .name,
.boxCardsPlayed .desc,
.boxCardsPlayed .poem,
.boxCardsPlayed .energy {
   display: none;
}

.boxCardsPlayed .card.used {
   opacity: 0.7;
   filter: grayscale(0.7);
}

.boxCardsPlayed .card .shield {
   top: -25%;
   left: -15%;
   right: -15%;
}




#popupCardDetail {
   position: absolute;
   left: 10%;
   top: 10%;
   xheight: 80%;
   zoom: 0.95;
   z-index: 7;
}

#popupCardDetail .card {
   box-shadow: 0 0 20px black, 0 0 30px black, 0 0 40px black, 0 0 50px black, 0 0 60px black;
}


.popup .boxIconDesc, #popupCardDetail .boxIconDesc {
   display: block;
   position: absolute !important;
   width: 150%;
   left: 240px;
   font-size: 95%;
   background: black;
   height: auto;
   aspect-ratio: auto;
   padding: 5px 8px;
}

.card .attributeIcons, .cardMid .attributeIcons {
   position: absolute;
   right: 0;
   top: 0;
   width: 40px;
   padding: 2px;
   z-index: 3;
}


.boxIconDesc {
   display: none;
}

.boxIconDesc .boxAttributeIcon,
.boxIconDesc .boxEffectIcon, .boxIconDesc .icon_mod {
   float: left;
   margin: 5px 10px 17px 0;
}

.iconDesc {
   min-height: 51px;
   padding: 5px;
   border-bottom: 1px solid rgba(126, 215, 215, 5);
   margin: 5px;
   clear: both;
}
.iconDesc:last-child {
   border: none;
}

.boxAttributeIcon,
.boxEffectIcon {
   background: rgba(15, 37, 37, 0.7);
   border: 2px solid rgba(255, 255, 255, 0.8);
   position: static !important;
   width: 36px;
   height: 36px;
   margin-bottom: 3px;
   opacity: 0.8;
}

.boxEffectIcon {
   border: 2px solid #2df8fd;
   background: rgba(30, 90, 96, 0.7);
}

.boxAttributeIcon div,
.boxEffectIcon div {
   position: static !important;
   width: 100%;
   height: 100%;
   aspect-ratio: 1/1;
   background-position: center;
   background-size: 87%;
   background-repeat: no-repeat;
}

.boxIconDesc .icon_mod {
   width: 36px;
   height: 36px;
}

.attr_cloaked {
   background-image: url(../images/card/attr_cloaked.png);
}

.attr_defensive {
   background-image: url(../images/card/attr_defensive.png);
}
.attr_draining {
   background-image: url(../images/card/attr_draining.png);
}
.attr_evasive {
   background-image: url(../images/card/attr_evasive.png);
}
.attr_explosive {
   background-image: url(../images/card/attr_explosive.png);
}
.attr_fast {
   background-image: url(../images/card/attr_fast.png);
}
.attr_fastfire {
   background-image: url(../images/card/attr_fastfire.png);
}
.attr_flanking {
   background-image: url(../images/card/attr_flanking.png);
}
.attr_flying {
   background-image: url(../images/card/attr_flying.png);
}
.attr_hacking {
   background-image: url(../images/card/attr_hacking.png?v=4);
}
.attr_ion {
   background-image: url(../images/card/attr_ion.png);
}
.attr_passive {
   background-image: url(../images/card/attr_passive.png);
}
.attr_ranged {
   background-image: url(../images/card/attr_ranged.png);
}
.attr_rapid-fire {
   background-image: url(../images/card/attr_rapid-fire.png);
}
.attr_shielded {
   background-image: url(../images/card/attr_shielded.png);
}
.attr_single-shot {
   background-image: url(../images/card/attr_single-shot.png);
}
.attr_slowfire {
   background-image: url(../images/card/attr_slowfire.png);
}
.attr_shy {
   background-image: url(../images/card/attr_shy.png);
}
.attr_small {
   background-image: url(../images/card/attr_small.png);
}
.attr_spy {
   background-image: url(../images/card/attr_spy.png);
}
.attr_stealthy {
   background-image: url(../images/card/attr_stealthy.png);
}
.attr_stunning {
   background-image: url(../images/card/attr_stunning.png);
}
.attr_supercharged {
   background-image: url(../images/card/attr_supercharged.png);
}
.attr_synergetic {
   background-image: url(../images/card/attr_synergetic.png);
}

.attr_unstoppable {
   background-image: url(../images/card/attr_unstoppable.png);
}


.icon_energy {
   background-image: url(../images/other/tutorial-decks2-energy.png);
}
.icon_attack {
   background-image: url(../images/other/tutorial-decks2-attack.png);
}
.icon_defense {
   background-image: url(../images/other/tutorial-decks2-defense.png);
}




.effect_damage {
   background-image: url(../images/card/effect_damage.png);
}
.effect_destroy {
   background-image: url(../images/card/effect_destroy.png);
}

.effect_heal {
   background-image: url(../images/card/effect_heal.png);
}

.effect_drainEnergy {
   background-image: url(../images/card/effect_drain.png);
}
.effect_drawCard {
   background-image: url(../images/card/effect_drawCard.png);
}
.effect_energy {
   background-image: url(../images/card/effect_energy.png);
}
.effect_shield {
   background-image: url(../images/card/effect_shield.png);
}
.effect_spawn {
   background-image: url(../images/card/effect_spawn.png);
}
.effect_stun {
   background-image: url(../images/card/effect_stun.png);
}

.effect_revive {
   background-image: url(../images/card/effect_revive.png);
}

.effect_upkeep {
   background-image: url(../images/card/effect_upkeep.png);
}

.icon_mod {
   position: static !important;
   width: 30px;
   height: 30px;
   margin-bottom: 3px;
   background-color: white;
   background-position: center;
   background-size: contain;
   background-repeat: no-repeat;
   background-image: url(../images/card/icon_mod.png);
}

.boxExplainRarity {
   position: absolute;
   top: 75%;
   left: 40%;
   width: 20%;
   height: 10%;
   z-index: 9;
   background-size: contain;
   background-repeat: no-repeat;
}


/* .cardMid .cardVals div {
    width: 25px;
    height: 25px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    backdrop-filter: blur(5px);
    text-align: center;
}

.cardMid .boxAttack{
    width: 20px;
    height: 20px;
    transform: rotate(45deg);
    left: 0;
    background-color: #EB6374;
}

.cardMid .attack{
    transform: rotate(-45deg);
}

.cardMid .hp{
    right: 0;
    color: #648895;
    background: rgba(0,0,0,.9);
}

.cardMid .energy{
    left: calc(50% - 10px);
    top: -12px;
    color: white;
    background: #2975a6;
    border-radius: 50px
} */
