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

*,
*::before,
*::after {
  box-sizing: border-box;
}

a {
  color: inherit;
  display: inline-block;
  text-decoration: none;
}
span {
  display: inline-block;
}
button {
  background-color: transparent;
  border: none;
  cursor: pointer;
  border: 0;
}
button:active {
  scale: 0.95;
}

ul,
ol {
  list-style: none;
}

html {
  scroll-behavior: smooth;
  scroll-padding-block-start: 100px;
}

body {
  font-family: "Barlow Semi Condensed", sans-serif;
  letter-spacing: 2px;
  background: rgb(31, 55, 86);
  background: radial-gradient(
    circle at top center,
    rgba(31, 55, 86, 1) 15%,
    rgba(20, 21, 57, 1) 100%
  );
  min-height: 115svh;
  display: flex;
  flex-direction: column;
  position: relative;
}
/* End CSS Reset */

.display-block {
  display: block !important;
}
.display-flex {
  display: flex !important;
}

.win::before {
  content: "";
  position: absolute;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  width: 0.01%;
  height: 0.01%;
  box-shadow: none;
  animation: concentricCircleEffect 1s ease-out forwards; /* Apply animation */
}

@keyframes concentricCircleEffect {
  0% {
    width: 0;
    height: 0;
    box-shadow: none;
  }
  100% {
    width: 100%;
    height: 100%;
    box-shadow: 0 0 0 50px rgba(96, 110, 133, 0.2),
      0 0 0 80px rgba(96, 110, 133, 0.15), 0 0 0 110px rgba(96, 110, 133, 0.1); /* Concentric circles effect */
  }
}
@media (max-width: 767px) {
  @keyframes concentricCircleEffect {
    0% {
      width: 0;
      height: 0;
      box-shadow: none;
    }
    100% {
      width: 100%; /* Final size */
      height: 100%; /* Final size */
      box-shadow: 0 0 0 40px rgba(96, 110, 133, 0.2),
        0 0 0 70px rgba(96, 110, 133, 0.15), 0 0 0 100px rgba(96, 110, 133, 0.1); /* Concentric circles effect */
    }
  }
}

.container {
  padding: 0 15px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  flex-direction: column;
  position: relative;
}

/* Mobile */
@media (min-width: 576px) {
  .container {
    width: 540px;
  }
}
/* Small */
@media (min-width: 768px) {
  .container {
    width: 750px;
  }
}
/* Medium */
@media (min-width: 992px) {
  .container {
    width: 970px;
  }
}
/* Large */
@media (min-width: 1200px) {
  .container {
    width: 1170px;
  }
}
/* Desktop */
@media (min-width: 1440px) {
  .container {
    width: 1400px;
  }
}

header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border: 3px solid hsl(217, 16%, 45%);
  border-radius: 10px;
  margin-top: 20px;
  width: 70%;
  margin-block-end: 80px;
}
header img {
  height: 100px;
}
header .score {
  background-color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 5px 40px;
  border-radius: 10px;
}
header .score span {
  color: hsl(229, 64%, 46%);
  font-weight: 600;
}
header .score h1 {
  color: hsl(229, 25%, 31%);
  font-size: 3.4rem;
  height: 55px;
}

article {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 350px;
}
article .pentagon {
  z-index: -1;
}
article button:not(.pentagon) {
  width: 100px;
  padding: 22px;
  border-radius: 50%;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.1) inset;
}
article button:not(.pentagon)::after {
  content: "";
  position: absolute;
  width: calc(100% + 18px);
  height: calc(100% + 18px);
  border-radius: 50%;
  z-index: -1;
}
article button.scissors {
  top: -32px;
  left: 126px;
}
article button.scissors::after {
  background-color: hsl(39, 89%, 49%);
  background: linear-gradient(180deg, hsl(39, 89%, 49%), hsl(40, 84%, 53%));
  box-shadow: 0 4.5px 0 hsl(39, 97%, 45%);
}
article button.paper {
  top: 95px;
  right: -60px;
}
article button.paper::after {
  background-color: hsl(230, 89%, 62%);
  background: linear-gradient(180deg, hsl(230, 89%, 62%), hsl(230, 89%, 65%));
  box-shadow: 0 4.5px 0 hsl(230, 84%, 55%);
}
article button.rock {
  top: 274px;
  right: 3px;
}
article button.rock::after {
  background-color: hsl(349, 71%, 52%);
  background: linear-gradient(180deg, hsl(349, 71%, 52%), hsl(349, 70%, 56%));
  box-shadow: 0 4.5px 0 hsl(349, 73%, 50%);
}
article button.lizard {
  top: 270px;
  left: 28px;
}
article button.lizard::after {
  background-color: hsl(261, 73%, 60%);
  background: linear-gradient(180deg, hsl(261, 73%, 60%), hsl(261, 72%, 63%));
  box-shadow: 0 4.5px 0 hsl(261, 73%, 54%);
}
article button.spock {
  top: 95px;
  left: -28px;
}
article button.spock img {
  margin-left: 7px;
}
article button.spock::after {
  background-color: hsl(189, 59%, 53%);
  background: linear-gradient(180deg, hsl(189, 59%, 53%), hsl(189, 58%, 57%));
  box-shadow: 0 4.5px 0 hsl(189, 63%, 47%);
}
article button img {
  width: 90%;
}
article button.pentagon img {
  width: 110%;
}
article.step-2 {
  align-items: stretch;
  justify-content: space-between;
  width: 70%;
}
article .step-2-player {
  color: white;
  font-size: 21px;
  font-weight: 600;
  flex: 1;
  align-items: center;
  justify-content: space-evenly;
  flex-direction: column;
  display: none;
}
article .step-2-player button {
  width: 55%;
  position: relative !important;
  left: 0 !important;
  top: 0 !important;
  pointer-events: none;
}
article .step-2-player button.spock img {
  margin-left: 23px;
}
article .step-2-player button.computer {
  background-color: rgba(0, 0, 0, 0.2);
  scale: 1.2;
  box-shadow: none;
}
article .step-2-player button.computer img {
  width: 80%;
}
article .result {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
article .result span {
  color: white;
  font-size: 30px;
  text-align: center;
  font-weight: 600;
}
article .result button {
  width: auto !important;
  border-radius: 10px !important;
  box-shadow: none;
  position: relative;
  padding: 12px 20px;
  color: hsl(229, 25%, 31%);
  transition: 0.3s;
  font-weight: 600;
}

.rules-btn {
  padding: 10px 30px;
  border: 1px solid white;
  border-radius: 10px;
  color: white;
  letter-spacing: 2px;
  position: absolute;
  right: 0;
  bottom: -80px;
  transition: 0.3s;
}
.rules-btn:active,
.rules-btn:hover {
  background-color: white;
  color: hsl(229, 64%, 46%);
}

.rules {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  border-radius: 10px;
  padding: 30px;
  z-index: 2;
  flex-direction: column;
  display: none;
}
.rules .heading {
  color: hsl(229, 25%, 31%);
  font-size: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.rules .heading img {
  cursor: pointer;
}
.overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
  display: none;
}
@media (min-width: 1439px) {
  body {
    min-height: 100svh;
  }
  article .pentagon {
    width: 500px;
  }
  article button:not(.pentagon) {
    width: 140px;
  }
  article button:not(.pentagon)::after {
    width: calc(100% + 27px);
    height: calc(100% + 27px);
  }
  article button.scissors {
    top: -32px;
    left: 208px;
  }
  article button.paper {
    top: 130px;
    right: -95px;
  }
  article button.spock {
    top: 120px;
    left: -26px;
  }
  article button.rock {
    top: 416px;
  }
  article button.lizard {
    top: 406px;
    left: 48px;
  }
  article.step-2 {
    width: 100%;
  }
  article .step-2-player {
    gap: 20px;
  }
  article .step-2-player button,
  article .step-2-player button.computer {
    width: 205.5px;
  }
  .rules {
    top: 59%;
    left: 59%;
    scale: 1.5;
  }
}

@media (max-width: 991px) {
  body {
    min-height: 140svh;
  }
  .rules-btn {
    left: 50%;
    transform: translateX(-32%);
    max-width: 116px;
    bottom: -110px;
  }
  article.step-2 {
    width: 100%;
  }
  article .step-2-player button {
    width: 50% !important;
  }
}
@media (min-width: 768px) {
  article .step-2-player button::after {
    width: calc(100% + 30px);
    height: calc(100% + 30px);
  }
}
@media (max-width: 767px) {
  .container {
    height: 125svh;
  }
  header {
    width: 100%;
    margin-block-end: 40px;
  }
  header img {
    height: 75px;
  }
  header .score {
    padding: 5px 25px;
  }
  header .score h1 {
    font-size: 3rem;
  }
  article {
    scale: 0.8;
    min-height: 215px;
  }
  article button.pentagon img {
    width: 100%;
  }
  article button:not(.pentagon) {
    width: 83px;
  }
  article button.paper {
    top: 85px;
    right: -25px;
  }
  article button.rock {
    top: 255px;
    right: 32px;
  }
  article button.lizard {
    top: 255px;
    left: 41px;
  }
  article button.spock {
    top: 85px;
  }
  article button img {
    width: 100%;
  }
  article.step-2 {
    width: 135%;
    gap: 10px;
  }
  article .step-2-player {
    gap: 20px;
  }
  article .step-2-player button.spock img {
    margin-left: 17px;
  }
  .rules-btn {
    bottom: 40px;
    transform: translateX(-50%);
  }
  .rules {
    width: 100%;
    height: 100%;
    border-radius: 0;
    gap: 20px;
  }
  .rules .heading {
    justify-content: center;
  }
  .rules .heading img {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 50px;
    width: 33px;
  }
  .rules > img {
    width: 100%;
  }
  .result {
    position: absolute;
    width: 100%;
    bottom: -200px;
    left: 50%;
    transform: translateX(-50%);
  }
  article .result span {
    font-size: 55px;
  }
  article .result button {
    width: 64% !important;
    font-size: 20px;
  }
  .min-height-100 {
    min-height: 100svh;
  }
}

@media (max-width: 330px) {
  article button.scissors {
    left: 100px;
  }
  article button.paper,
  article button.spock {
    top: 72px;
  }
  article button.rock,
  article button.lizard {
    top: 210px;
  }
  article button.rock {
    right: 23px;
  }
  article button.lizard {
    left: 30px;
  }
  article .step-2-player {
    font-size: 16px;
  }
  article .step-2-player button.spock img {
    margin-left: 10px;
  }
}
