@import url("https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Orbitron:wght@900&display=swap");

/* Resets and defaults */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Default Fontsize 10px = 1rem */
  font-size: 62.5%;
}

body {
  font-family: "Lato", sans-serif;
  font-size: 1.6rem;
  background-color: hsl(265, 42%, 85%);
  background-image: linear-gradient(
    62deg,
    hsl(265, 42%, 85%) 0%,
    hsl(189, 60%, 85%) 100%
  );
  color: hsl(0, 0%, 0%);
}

/* Container */

.container {
  display: grid;
  justify-content: center;
  align-content: start;
  height: 100vh;
  grid-template:
    ". header ."
    "left main right"
    ". footer .";
}

/* Header */

header {
  grid-area: header;
  margin-top: 4.8rem;
}

header img {
  max-width: 45rem;
}

/* Main Window */

main {
  grid-area: main;
  margin-bottom: 7.2rem;
  max-width: 45rem;
}

.play_window {
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  border-radius: 2.4rem;
  background-color: hsl(0, 0%, 100%);
  box-shadow: 0px 10px 15px -3px rgba(0, 0, 0, 0.2);
  position: relative;
}

.play_window div {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 15rem;
  height: 15rem;
  transition: all 100ms;
}

#block_5 {
  border: 2px solid hsl(0, 0%, 0%);
}

#block_2,
#block_8 {
  border-left: 2px solid hsl(0, 0%, 0%);
  border-right: 2px solid hsl(0, 0%, 0%);
}

#block_4,
#block_6 {
  border-top: 2px solid hsl(0, 0%, 0%);
  border-bottom: 2px solid hsl(0, 0%, 0%);
}

#block_1 {
  border-top-left-radius: 2.4rem;
}

#block_3 {
  border-top-right-radius: 2.4rem;
}

#block_7 {
  border-bottom-left-radius: 2.4rem;
}

#block_9 {
  border-bottom-right-radius: 2.4rem;
}

.player1 {
  background-color: hsl(265, 42%, 63%);
  color: hsl(0, 0%, 100%) !important;
}

.player2 {
  background-color: hsl(189, 60%, 34%);
  color: hsl(0, 0%, 100%) !important;
}

.disable {
  pointer-events: none;
}

/* Player indicator */

.indicator {
  display: flex;
  justify-content: center;
}

.indicator img {
  width: 10rem;
  transition: all 100ms;
}

.hide {
  visibility: hidden;
  opacity: 0;
}

/* Left Sidebar for Scores */

.left {
  grid-area: left;
}

h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20rem;
  padding: 1rem 0;
  margin: 2.4rem 0;
  font-size: 1.6rem;
  color: hsl(0, 0%, 100%);
  text-transform: uppercase;
}

h2 span {
  font-family: "Orbitron", sans-serif;
  font-size: 3.2rem;
}

#p1 {
  border-top-left-radius: 1.2rem;
  border-bottom-left-radius: 1.2rem;
}

#p2 {
  border-top-right-radius: 1.2rem;
  border-bottom-right-radius: 1.2rem;
}

#player1_score {
  margin-left: 2.4rem;
  border-left: 2px solid hsl(0, 0%, 100%);
  padding-left: 2.4rem;
}

#player2_score {
  margin-right: 2.4rem;
  border-right: 2px solid hsl(0, 0%, 100%);
  padding-right: 2.4rem;
}

/* Status bar */

.status_bar {
  text-align: center;
}

.status {
  font-size: 3.6rem;
  font-weight: 700;
  padding: 1.2rem 0;
  margin: 4.8rem 0 1.2rem;
  transition: all 100ms;
}

.win {
  display: none;
  width: 100%;
}

/* Right side bar for play and reset buttons */

.right {
  grid-area: right;
}

.btn {
  display: none;
  background-color: hsl(0, 0%, 0%);
  color: hsl(0, 0%, 100%);
  border: none;
  width: 20rem;
  border-top-right-radius: 1.2rem;
  border-bottom-right-radius: 1.2rem;
  padding: 1.6rem 0;
  font-size: 2.4rem;
  margin: 1.4rem 0;
  box-shadow: 0px 10px 15px -3px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

#play_again {
  position: absolute;
  top: 42rem;
}

#reset {
  position: absolute;
  top: 50rem;
}

/* Footer */

footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  text-align: center;
  grid-area: footer;
  font-size: 1.2rem;
  padding: 1.2rem;
  color: hsl(0, 0%, 100%);
  background-color: hsl(0, 0%, 0%);
  background-image: linear-gradient(
    62deg,
    hsl(0, 0%, 0%) 0%,
    hsl(265, 42%, 63%) 100%
  );
}

footer a:link,
footer a:visited {
  text-decoration: none;
  color: hsl(0, 0%, 100%);
}

footer a:hover,
footer a:active {
  color: hsl(265, 42%, 63%);
}
