@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");
@import "tailwindcss";

:root {
  overflow: hidden;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none;
}

body {
  background: #000d36;
  color: white;
}

#canvas {
  background: #fff;
  margin-left: 50%;
  margin-top: 1%;
  transform: translateX(-50%);
}

#game_over {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 3em;
  text-transform: uppercase;
  font-family: "Press Start 2P", cursive;
}



#score {
  position: absolute;
  font-size: larger;
  top: 75px;
  right: 9%;
  text-transform: uppercase;
  font-family: Arial, Helvetica, sans-serif;
  padding: 12px;
  border-radius: 25px;
  box-shadow: inset 0 0 8px lightgreen;
  color: #cccccc;
}
/* High Score Card Style */
.high-score-card {
  position: absolute;
  top: 25px;
  right: 5%;
  width: 150px;
  height: 120px;
  background: #1a1a1a;
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(255, 235, 59, 0.5),
              inset 0 0 10px rgba(255, 235, 59, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: "Press Start 2P", cursive;
  cursor: default;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.high-score-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 25px rgba(255, 235, 59, 0.8),
              inset 0 0 15px rgba(255, 235, 59, 0.4);
}

.high-score-number {
  font-size: 1.5em;
  font-weight: bold;
  z-index: 10;
  
}

.high-score-label {
  font-size: 0.7em;
  margin-top: 5px;
  

}


.high-score-card::before,
.high-score-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(15px);
  opacity: 0.4;
}

.high-score-card::before {
  width: 60px;
  height: 60px;
 
  bottom: -20px;
  right: -20px;
}

.high-score-card::after {
  width: 80px;
  height: 80px;
 
  top: -20px;
  left: -20px;
}

#high-score {
  position: absolute;
  top: 25px;
  right: 2%;
  
  font-family: "Press Start 2P", cursive;
}

#controls {
  position: absolute;
  top: 40%;
  left: 12%;
  display: flex;
  flex-direction: column;
}

#control-keys {
  top: 200px;
  right: 7%;
  position: absolute;
  color: #ccccccd7;
  padding: 12px;
  font-size: 1.2em;
  line-height: 48px;
  box-shadow: 0 0 8px lightgreen;
}

#control-head {
  text-align: center;
  font-family: "Press Start 2P", cursive;
}



.btn {
  --border-color: linear-gradient(-45deg, #ffae00, #7e03aa, #00fffb);
  --border-width: 0.125em;
  --curve-size: 0.5em;
  --blur: 30px;
  --bg: #080312;
  --color: #afffff;
  color: var(--color);
  cursor: pointer;
  
  position: relative;
  isolation: isolate;
  display: inline-grid;
  place-content: center;
  padding: 0.5em 1.5em;
  font-size: 17px;
  border: 0;
  text-transform: uppercase;
  box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.6);
  clip-path: polygon(
    0% var(--curve-size),
    var(--curve-size) 0,
    100% 0,
    100% calc(100% - var(--curve-size)),
     calc(100% - var(--curve-size)) 100%,
    0 100%
  );
  transition: color 250ms;
}

.btn::after,
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
}

.btn::before {
  background: var(--border-color);
  background-size: 300% 300%;
  animation: move-bg7234 5s ease infinite;
  z-index: -2;
}

@keyframes move-bg7234 {
  0% {
    background-position: 31% 0%;
  }

  50% {
    background-position: 70% 100%;
  }

  100% {
    background-position: 31% 0%;
  }
}

.btn::after {
  background: var(--bg);
  z-index: -1;
  clip-path: polygon(
    var(--border-width)
      calc(var(--curve-size) + var(--border-width) * 0.5),
    calc(var(--curve-size) + var(--border-width) * 0.5) var(--border-width),
    /* top-right */ calc(100% - var(--border-width)) var(--border-width),
    calc(100% - var(--border-width))
      calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5)),
    
      calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5))
      calc(100% - var(--border-width)),
    /* bottom-right 2 */ var(--border-width) calc(100% - var(--border-width))
  );
  transition: clip-path 500ms;
}

.btn:where(:hover, :focus)::after {
  clip-path: polygon(
    /* Top-left */ calc(100% - var(--border-width))
      calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5)),
    calc(100% - var(--border-width)) var(--border-width),
    /* top-right */ calc(100% - var(--border-width)) var(--border-width),
    calc(100% - var(--border-width))
      calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5)),
    /* bottom-right 1 */
      calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5))
      calc(100% - var(--border-width)),
    /* bottom-right 2 */
      calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5))
      calc(100% - var(--border-width))
  );
  transition: 200ms;
}

.btn:where(:hover, :focus) {
  color: #fff;
}


#reset,
#show-grid,
.pause-active {
  background: #000d36;
  color: #cccccc;
  border-radius: 25px;
  width: 120px;
  padding: 12px;
  margin-top: 18px;
  box-shadow: 0 0 3px lightgreen;
  font-size: 0.8em;
  font-weight: bold;
  transition: box-shadow 0.3s;
  text-shadow: 0 0 8px lightseagreen;
  text-transform: uppercase;
}



#reset:hover,
#show-grid:hover,
.pause-active:hover {
  box-shadow: 0 0 12px lightgreen;
  color: rgb(0, 0, 0);
}
.pause-not-active {
  background: rgba(239, 239, 240, 0.4);
  box-shadow: none;
  color: #cccccc;
  width: 120px;
  padding: 12px;
  margin-top: 18px;
  font-size: 0.8em;
  font-weight: bold;
  text-shadow: 0 0 8px lightseagreen;
  text-transform: uppercase;
}

#play {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Press Start 2P", cursive;
  font-size: 1.3em;
  padding: 20px;
  color: white;
  animation: animate-play 1.4s linear infinite;
}

@keyframes animate-play {
  0% {
    text-shadow: 0 0 4px lightgreen;
  }
  50% {
    text-shadow: 0 0 8px lightgreen;
  }
  100% {
    text-shadow: 0 0 4px lightgreen;
  }
}

#channel {
  position: absolute;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  text-transform: uppercase;
  top: 36%;
  left: 14px;
  font-size: 3.2em;
  font-family: "Press Start 2P", cursive;
  letter-spacing: 0.4em;
  color: #cccccc;
  text-shadow: 0 0 12px rgb(35, 11, 66);
  border: 5px solid rgba(68, 9, 98, 0.845);
  padding: 14px;
  background-color: black;
}
