You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
EvoLyte/public/style/combat.css

133 lines
1.8 KiB

body {
margin: 0;
height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-image: url("../media/boxing_ring.jpg");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
overflow: hidden;
font-family: Arial, sans-serif;
}
.arena {
position: relative;
width: 400px;
height: 150px;
}
.emoji {
position: absolute;
top: 50%;
font-size: 5rem;
transform: translate(-50%, -50%);
}
.emoji-img {
width: 5rem;
height: 5rem;
object-fit: contain;
}
.winner-center .emoji-img {
width: 6rem;
height: 6rem;
}
.loser-fly-up .emoji-img {
opacity: 0.6;
}
.left-emoji {
left: -100px;
}
.right-emoji {
left: 500px;
}
@keyframes slideInLeft {
to {
left: 100px;
}
}
@keyframes slideInRight {
to {
left: 300px;
}
}
.slide-in-left {
animation: slideInLeft 3s forwards;
}
.slide-in-right {
animation: slideInRight 3s forwards;
}
@keyframes fightShake {
0%,
100% {
transform: translate(-50%, -50%) translateX(0);
}
20%,
60% {
transform: translate(-50%, -50%) translateX(-15px);
}
40%,
80% {
transform: translate(-50%, -50%) translateX(15px);
}
}
.fight-animation {
animation: fightShake 0.5s 3;
}
@keyframes flyUpFade {
to {
opacity: 0;
transform: translate(-50%, calc(-150px - 50%));
}
}
.loser-fly-up {
animation: flyUpFade 3s forwards;
position: absolute;
}
@keyframes moveToCenter {
to {
left: 50%;
transform: translate(-50%, -50%);
}
}
.winner-center {
animation: moveToCenter 1s forwards;
position: absolute !important;
top: 50% !important;
font-size: 6rem;
z-index: 10;
}
.winner-crown::after {
content: "👑";
position: absolute;
top: -1.5rem;
left: 50%;
transform: translateX(-50%);
font-size: 2rem;
}
#winner-text {
margin-top: 1rem;
font-size: 2rem;
text-align: center;
display: none;
}