/* Import external fonts from Google*/
@import url("https://fonts.googleapis.com/css2?family=Raleway&family=Righteous&display=swap");

/* Set up root variables */
:root {
  --brand-oxford-blue: #011638;
  --brand-cultured: #edf2f4;
  --brand-indian-red: #db5461;
  --brand-titanium-yellow: #e9df00;
  --brand-celadon-blue: #007ea7;

  --brand-mb: 15px;
}

/* Reset the default styling of the browser. Only for more control*/
html {
  box-sizing: border-box;
}
*,
*::before,
*:after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--brand-cultured);
}

img,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
}

h1,
h2,
p {
  margin: 0;
  padding: 0;
}

h1,
h2 {
  font-family: "Righteous", cursive;
}

p {
  font-family: "Raleway", sans-serif;
}

/* Classes and id styling*/
.game-canvas {
  text-align: center;
}

.title {
  background-color: var(--brand-oxford-blue);
  color: var(--brand-cultured);
  padding: 15px 0;
  margin-bottom: var(--brand-mb);
}

.title > h1 {
  margin-bottom: var(--brand-mb);
  font-size: clamp(2rem, 10vw, 2.5rem);
}

.title > p {
  font-size: clamp(1rem, 2.5vw, 1.1rem);
}

.selection-container,
.score-container {
  display: flex;
  flex-direction: column;
}

.selection-container > p,
.score-container > p {
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  margin-bottom: var(--brand-mb);
  flex: 1;
}

.asset-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.asset-container > figure {
  width: 8rem;
  height: 8rem;
}

.asset-container > #winner {
  color: var(--brand-indian-red);
}

#image {
  background-image: url("../assets/heads.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  width: 100%;
  height: 100%;
}

.choice-container > h2 {
  margin-bottom: var(--brand-mb);
  font-size: clamp(1.5rem, 10vw, 2rem);
}

.choice-container > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: var(--brand-mb);
}

.choice-container > div > button {
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  border-radius: 5px;
  padding: 10px;
  outline: none;
  cursor: pointer;
  transition-duration: 0.4s;
  font-family: "Raleway", sans-serif;
  width: 80%;
}

.choice-container > div > button:hover {
  border: 2px solid black;
  box-shadow: 0 5px 6px 0 #999;
}

.choice-container > div > button:nth-child(1) {
  background-color: var(--brand-celadon-blue);
  border: 2px solid var(--brand-celadon-blue);
  color: var(--brand-cultured);
}

.choice-container > div > button:nth-child(2) {
  background-color: var(--brand-titanium-yellow);
  border: 2px solid var(--brand-titanium-yellow);
  color: var(--brand-cultured);
}

.animate {
  background-image: url("../assets/heads.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  width: 100%;
  height: 100%;
  animation-name: spin;
  animation-iteration-count: 2;
  animation-duration: 1s;
}

@keyframes spin {
  0% {
    background-image: url("../assets/heads.png");
  }

  25% {
    background-image: url("../assets/tails.png");
  }

  50% {
    background-image: url("../assets/heads.png");
  }

  75% {
    background-image: url("../assets/tails.png");
  }

  100% {
    background-image: url("../assets/heads.png");
  }
}

/* 


 */
/* Behavior for laptops and larger devices */
@media screen and (min-width: 768px) {
  .selection-container,
  .score-container {
    flex-direction: row;
  }

  .asset-container > figure {
    width: 10rem;
    height: 10rem;
  }

  .choice-container > div {
    flex-direction: row;
    gap: 2rem;
  }

  .choice-container > div > button {
    width: 30%;
  }
}
