
/* === Global Styles === */
body {
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  position: relative;
  background: radial-gradient(140% 85% at 50% 10%, #ffffff 0%, #f6f6f6 52%, #efefef 100%);
  color: #1c1c1c;
  
  font-family: 'Doto', sans-serif;
  font-style: normal;
  font-optical-sizing: auto;
  font-variation-settings: "ROND" 100;
  
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

body::before {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  top: -16%;
  height: 62%;
  background-image:
    repeating-linear-gradient(to right, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 34px);
  transform: perspective(760px) rotateX(68deg);
  transform-origin: top center;
  opacity: 0.52;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 58%;
  background:
    radial-gradient(70% 42% at 16% 100%, transparent 0 66%, rgba(0, 0, 0, 0.2) 66.5% 67.2%, transparent 68%),
    radial-gradient(72% 45% at 50% 100%, transparent 0 66%, rgba(0, 0, 0, 0.19) 66.5% 67.2%, transparent 68%),
    radial-gradient(75% 44% at 84% 100%, transparent 0 66%, rgba(0, 0, 0, 0.18) 66.5% 67.2%, transparent 68%),
    linear-gradient(to top, rgba(0, 0, 0, 0.09), transparent 45%);
  opacity: 0.56;
  pointer-events: none;
  z-index: 0;
}

/* === Retro Header === */
h1,
p {
  position: relative;
  z-index: 2;
}

h1 {
  margin: 22px 0 4px;
}

p {
  margin: 0;
}

.start-letter,
.rest-title{
  display: inline-block;
  font-family: 'Press Start 2P', monospace;
  color: #111111;
  font-size: 40px;
  font-weight: 800;
  vertical-align: middle;
  letter-spacing: 2px;
  text-shadow:
    3px 3px 0 #d7d7d7,
    -1px -1px 0 #f8f8f8;
}
.rest-title {
  font-size:48px;
}

.start-letter {
  font-size:72px;
}

.body-text{
  display: inline-block;
  font-family: 'Press Start 2P', monospace;
  color: #2a2a2a;
  font-size: 18px;
  font-weight: 400;
  vertical-align: middle;
  letter-spacing: 2px;
  text-shadow: 1px 1px 0 #e9e9e9;
}

.game-over-text{
  display: inline-block;
  font-family: 'Press Start 2P', monospace;
  color: #111111;
  font-size: 32px;
  font-weight: 400;
  vertical-align: middle;
  letter-spacing: 2px;
  text-shadow: 2px 2px 0 #dcdcdc;
}

#gameOverText {
  display: none; /* ✅ this hides the whole block */
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  text-align: center;
}

#restartButton {
  margin-top: 20px;
  margin-left: 0;
  display: inline-block;
  background-color: #141414;
  color: #ffffff;
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
  padding: 10px 20px;
  border: 2px solid #111111;
  cursor: pointer;
  text-shadow: none;
  box-shadow: 4px 4px 0 #bdbdbd;
}

#restartButton:hover {
  background-color: #2a2a2a;
}

/* === Pixel Font Option === */
.press-start-2p-regular {
  font-family: "Press Start 2P", system-ui;
  font-style: normal;
}

/* === Canvas Style === */
#board {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: clamp(96px, 18vh, 190px);
  max-width: calc(100vw - 20px);
  image-rendering: pixelated;
  z-index: 3;
  border-bottom: 2px solid rgba(0, 0, 0, 0.16);
}

@media (max-width: 768px) {
  .start-letter {
    font-size: 48px;
  }

  .rest-title {
    font-size: 32px;
  }

  .body-text {
    font-size: 14px;
    letter-spacing: 1px;
    text-align: center;
    padding: 0 12px 8px;
  }

  .game-over-text {
    font-size: 20px;
  }

  #restartButton {
    font-size: 12px;
    padding: 8px 14px;
  }

  #board {
    bottom: clamp(72px, 15vh, 130px);
  }
}
