@import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap'); *{ margin: 0; padding: 0; box-sizing: border-box; font-family: 'Ubuntu', sans-serif; } body{ display: flex; justify-content: center; align-items: center; flex-direction: column; min-height: 100dvh; background-color: #333; color: #fff; text-align: center; } #home{ position: fixed; right: 0; bottom: 0; height: 50px; width: 50px; border-radius: 25px 0 0 0; background: #555; } .dice{ width: 100px; height: 100px; margin: 1rem; border-radius: 10px; filter: drop-shadow(1.5px 1.5px 6px #aaa); } div{ min-height: 50vh; min-width: 100dvw; background-color: var(--clr); display: flex; justify-content: space-around; align-items: center; flex-direction: column; } button{ margin-top: .5rem; padding: .5rem; border: none; border-radius: 5px; box-shadow: inset 2px 2px 5px #ddddddcc, 2px 2px 5px #111; background: darkblue; color: #fff; } .dice.pop{ animation: pop 0.2s ease-in-out; } .result{ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); filter: drop-shadow(1.5px 1.5px 6px #000); text-transform: uppercase; font-size: 125px; } .won{ color: #0f0; animation: pop 0,5s ease-in-out; transition: .5s; } .lost{ color: #f00; animation: pop 0,5s ease-in-out; transition: .5s; } .draw{ color: #ff0; animation: pop 0,5s ease-in-out; transition: .5s; } @keyframes pop{ 0%{ scale: 0.1; } 100%{ scale: 1; } } @media screen and (max-width: 500px){ .dice{ width: 40px; height: 40px; margin: .60rem; border-radius: 5px; } .result{ font-size: 69px; } } @media screen and (max-width: 600px){ .dice{ width: 50px; height: 50px; margin: .7rem; border-radius: 7.5px; } } @media screen and (max-width: 676px){ .dice{ width: 60px; height: 60px; margin: .8rem; border-radius: 9px; } } .cash{ position: absolute; left: 0; top: 0; background: #222222cc; padding: .5rem; border-radius: 0 0 1rem 0; display: flex; flex-direction: row; justify-content: space-evenly; align-items: center; } .cash img{ margin-right: .5rem; aspect-ratio: 1/1; object-fit: contain; } .coins{ position: absolute; color: #0f0; z-index: 5; user-select: none; left: 135px; top: 17px; transform: translate(-50%, -50%); animation: money .15s ease-in; } @keyframes money{ from{ transform: translate(-50%, -50%); opacity: 1; top: 17px; } to{ transform: translate(-50%, -50%); opacity: 0; top: -10px; } }