/* ========== Reset ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ========== Body Styles ========== */
body {
  background-color: #3b4764;
  font-family: 'Segoe UI', sans-serif;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
}

/* ========== Layout ========== */
.container {
  max-width: 400px;
  width: 100%;
}

.result-container,
.button-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}

/* ========== Typography ========== */
h1 {
  font-size: 2.5rem;
  text-shadow: 2px 2px 0px #35383f;
  -webkit-text-stroke-width: 1px;
  -webkit-text-stroke-color: #35383f;
}

p {
  font-size: 1rem;
  margin: 0.5rem 0 2rem;
}

/* ========== Coin Section ========== */
.coin-box {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

#coin-img {
  width: 120px;
  cursor: pointer;
  transition: transform 0.6s ease;
}

#shadow-img {
  width: 90px;
  position: absolute;
  bottom: -10px;
  z-index: -1;
}

/* ========== Result Styles ========== */
#result {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 1.5rem 0;
}

.flipping-text {
  font-size: 1rem;
  color: #ccc;
  opacity: 0.8;
}

.result-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 1.4rem;
  background-color: #fff;
  color: #2c3e50;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  text-align: center;
}

/* ========== Button Styles ========== */
#flip-button {
  background-color: #2980b9;
  color: #fff;
  font-weight: bold;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0px 4px 0px 0px #23649b;
  transition: transform 0.1s ease-in-out;
}

#flip-button:active {
  transform: translateY(2px);
}

/* ========== Animation Classes ========== */
.flipping {
  animation: flip 0.6s ease;
  filter: blur(2px);
}

@keyframes flip {
  0% {
    transform: rotateX(0);
  }
  100% {
    transform: rotateX(720deg);
  }
}

@keyframes pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* ========== Responsive Styles ========== */
@media screen and (max-width: 600px) {
  #coin-img {
    width: 100px;
  }

  #shadow-img {
    width: 75px;
  }

  h1 {
    font-size: 2rem;
  }

  #result {
    font-size: 1.3rem;
  }
}