/* global vars */
:root { 
    --margin-per-track: 7px;
    --skew-angle: 10deg;
    --skew-angle-reverse: -10deg;
    --track-height: 40px;
}

/* containers */

#container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#racetrack {
    margin-top: 50px;
    position: relative;
    width: 1263px;
    height: calc(8 * var(--track-height));
    left: -31.5px;
}

#racetrack #tracks,
#racetrack #markers {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

#bottom-container {
    display: flex;
    flex-direction: row;
    margin-top: 10px;
    width: 1500px;
}

#bottom-container > div {
    width: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#bottom-container > #ranking-container {
    width: 525px;
}

#bottom-container > #controls-container {
    width: 450px;
    flex-direction: column;
    justify-content: space-evenly;
}

#bottom-container > #wheel-container {
    width: 525px;
}


/* tracks */

#racetrack #tracks {
    z-index: 10;
}

#racetrack #tracks .track {
    box-shadow: 1px 0 0 #000 inset, -1px 0 0 #000 inset;
    height: var(--track-height);
    width: 1200px;
    transform: skewX(var(--skew-angle));
    /* transform: skewX(var(--skew-angle)) skewY(-0.25deg); */
}

#racetrack #tracks .track:first-child {
    box-shadow: 0 1px 0 #000 inset, 1px 0 0 #000 inset, -1px 0 0 #000 inset;
}

#racetrack #tracks .track:last-child {
    box-shadow: 1px 0 0 #000 inset, -1px 0 0 #000 inset, 0 -1px 0 #000 inset;
}

/* show-tracks variant */

.show-tracks #racetrack #tracks .track,
.show-tracks #racetrack #tracks .track:first-child {
    box-shadow: 0 1px 0 #000 inset, 1px 0 0 #000 inset, -1px 0 0 #000 inset;
}

.show-tracks #racetrack #tracks .track:last-child {
    box-shadow: 0 1px 0 #000 inset, 1px 0 0 #000 inset, -1px 0 0 #000 inset, 0 -1px 0 #000 inset;
}

/* individual tracks offset */
:nth-child(1) { --nth-child: 1 }
:nth-child(2) { --nth-child: 2 }
:nth-child(3) { --nth-child: 3 }
:nth-child(4) { --nth-child: 4 }
:nth-child(5) { --nth-child: 5 }
:nth-child(6) { --nth-child: 6 }
:nth-child(7) { --nth-child: 7 }
:nth-child(8) { --nth-child: 8 }

#racetrack #tracks .track {
    margin-left: calc((var(--nth-child) - 1) * var(--margin-per-track))
}

/* markers */

#racetrack #markers {
    display: flex;
    flex-direction: row;
    left: 31.5px;
}

#racetrack #markers .marker {
    width: 150px;
    height: calc(8 * var(--track-height));
    transform: skewX(var(--skew-angle));
    box-shadow: -1px 0 0 #000 inset
}

#racetrack #markers .marker:last-child {
    box-shadow: none;
}
#racetrack #markers .marker.half-marker:after {
    content: "";
    background: white;
    width: 50px;
    height: calc(6 * var(--track-height));
    display: block;
    position: relative;
    left: 125px;
    top: var(--track-height);
}

/* numbers */

#racetrack #numbers {
    top: -25px;
    left: 15px;
    position: relative;
    display: flex;
    flex-direction: row;
}

#racetrack #numbers label {
    width: 300px;
    font-size: 20px;
    text-align: right;
}

/* wheels */

#wheel-container {
}

#wheel-wrapper {
    position: relative;
    width: 450px;
    height: 450px;
    margin-top: 20px;
}

#wheel-wrapper #pointer-wheel,
#wheel-wrapper #color-wheel {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* ranking list */

.ranking {
    display: flex;
    flex-direction: row;
    font-family: sans-serif;
    font-size: 30px;
    line-height: 45px;
    text-shadow: 1px 1px 2px black;
    transition: all 0.5s ease;
}

.ranking .rank-number {
    margin-right: 12px;
}

.ranking .bunny-name {
    text-transform: uppercase;
    width: 300px;
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    text-align: left;
}

.ranking.score .bunny-name {
    width: 200px;
}

.ranking .bunny-progress {
    margin-left: 2px;
}

.ranking.score .bunny-score {
    width: 55px;
    text-align: right;
}

/* shot clock and round counter */

#shot-clock, #round-counter {
    font-family: monospace;
    font-size: 40px;
    text-align: right;
}

#shot-clock {
    width: 100px;
}

#round-counter {
    width: 195px;
}

#shot-clock.paused {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
  50% {
    opacity: 0;
  }
}

/* rabbits */

/* .rabbit#purple-rabbit {
    background-image: url(/images/rabbit-purple.png);
}

.rabbit#gray-rabbit {
    background-image: url(/images/rabbit-gray.png);
}

.rabbit#red-rabbit {
    background-image: url(/images/rabbit-red.png);
}

.rabbit#pink-rabbit {
    background-image: url(/images/rabbit-pink.png);
}

.rabbit#orange-rabbit {
    background-image: url(/images/rabbit-orange.png);
}

.rabbit#blue-rabbit {
    background-image: url(/images/rabbit-blue.png);
}

.rabbit#green-rabbit {
    background-image: url(/images/rabbit-green.png);
}

.rabbit#yellow-rabbit {
    background-image: url(/images/rabbit-yellow.png);
} */

.rabbit {
    height: 150px;
    width: 150px;
    position: relative;
    top: -115px;
    left: -60px;
    transition: 2s ease-out all;
    transform: skewX(var(--skew-angle-reverse));
}

.rabbit > img {
    height: 100%;
    width: 100%;
}

/* multiplier notification */

#multiplier-overlay {
    transition: 1s ease all;
}

#multiplier-overlay #multiplier-label {
    z-index: 5;
    font-family: sans-serif;
    font-weight: bold;
    font-style: italic;
    text-align: center;
    width: 100px;
    height: 100px;
    left: 173px;
    top: 190px;
    position: relative;
}

#multiplier-overlay #multiplier-label .multiplier-first-row {
    font-size: 35px;
    text-shadow: 2px 1px #ff0000;
}

#multiplier-overlay #multiplier-label .multiplier-second-row {
    font-size: 20px;
}

/* popup overlay */

#popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(0,0,0,0.6);
    z-index: 10;
    width: 100%;
    height: 100%;
    justify-content: center;
}

#popup-overlay #popup {
    background: white;
    width: 600px;
    height: 400px;
    align-self: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: sans-serif;
}

#popup-overlay #popup #popup-heading {
    font-weight: bold;
    font-size: 40px;
    text-transform: uppercase;
}

#popup-overlay #popup #popup-text {
    font-size: 20px;
    line-height: 30px;
}

#popup-overlay #popup #popup-button-container {
    margin-top: 20px;
}

/* buttons */

button.game-button {
    width: 140px;
    height: 45px;
    font-size: 20px;
    font-family: sans-serif;
    text-transform: uppercase;
    border: none;
    color: white;
    background: green;
    border: 2px solid #a3d2a3;
    border-radius: 4px;
}

button.game-button.red {
    background: red;
    border: 2px solid #ff8a8a;
}

button.game-button.yellow {
    background: orange;
    border: 2px solid #ffd280;
}

button.game-button:disabled {
    background: gray !important;
    border: 2px solid lightgray !important;
    color: lightgray !important;
}

/* final score popup */

#popup-overlay #popup.final {
    height: 625px;
}

#popup-overlay #popup.final #popup-heading {
    font-style: italic;
    text-shadow: 2px 1px #ff0000;
}

#olympic-stand {
    background-image: url(../images/olympic-stand.png);
    background-repeat: no-repeat;
    background-position: bottom;
    width: 360px;
    height: 250px;
    position: relative;
    margin: auto;
    margin-bottom: 25px;
}

#olympic-stand .olympic-rabbit {
    height: 75px;
    width: 75px;
    transform: scaleX(-1);
    position: absolute;
}

#olympic-stand .olympic-rabbit#olympic-rabbit-1 {
    left: 140px;
    top: 20px;
}

#olympic-stand .olympic-rabbit#olympic-rabbit-2 {
    left: 20px;
    top: 45px;
}

#olympic-stand .olympic-rabbit#olympic-rabbit-3 {
    left: 260px;
    top: 63px;
}

#olympic-stand .olympic-label {
    position: absolute;
    text-shadow: 1px 1px 2px black;
    font-family: sans-serif;
    font-size: 40px;
    font-weight: bold;
}

#olympic-stand .olympic-label#olympic-label-1 {
    left: 148px;
    top: 125px;
}

#olympic-stand .olympic-label#olympic-label-2 {
    left: 24px;
    top: 150px;
}

#olympic-stand .olympic-label#olympic-label-3 {
    left: 268px;
    top: 168px;
}