/* Universal Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: auto;
  font-family: Arial, sans-serif;
  background-color: black; /* WALKING PORYGON STYLE */
  :root {
    --walk-height: 120px;
  }
  .walk-area {
    position: absolute; /* relative to the footer */
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--walk-height);
    overflow: visible;
  }
  .walker-container {
    position: absolute;
    bottom: -100px;
    left: 0;
    animation: walkerMove 18s linear infinite alternate;
    width: 265px;
  }
  #walker {
    display: block;
    height: calc(var(--walk-height) - 12px);
    transform-origin: center;
    user-select: none;
    -webkit-user-drag: none;
  } /* bubble stays with walker */
  .speech {
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translate(-200px, 42px);
    padding: 35px 35px;
    text-align: center;
    color: #000000;
    font-family: sans-serif;
    font-size: 20px;
    font-weight: 500;
    background: url("images/speech bubble.png") no-repeat center;
    background-size: 200% 150%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
  }
  .speech.show {
    opacity: 1;
  } /* Walker path animation — moves across footer width */
  @keyframes walkerMove {
    0% {
      left: 0;
      transform: scaleX(1);
    }
    50% {
      transform: scaleX(1);
    }
    100% {
      left: calc(100% - 120px); /* adjust for walker width */
      transform: scaleX(-1);
    }
  }
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
#clock {
  font-size: 2rem;
  color: #44ff00;
  text-shadow: 0 0 5px #00ff15aa;
}
.audio-controls {
  display: flex;
  align-items: center;
  margin: -35px 0 0 205px;
  gap: 5px;
  font-family: monospace;
  background-color: #000;
}
.audio-controls button,
button {
  background-color: #1900d5;
  border-radius: 45px;
  color: #fff;
  padding: 0 5px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}
.audio-controls button:hover {
  color: #9400ff;
}
.audio-controls input[type="range"] {
  width: 100px;
  accent-color: #0f0;
}
.audio-controls label {
  color: #838383;
}
#song-banner {
  position: absolute;
  top: 33px;
  left: 100%;
  white-space: nowrap;
  font-family: monospace;
  font-size: 16px;
  background-color: #000;
  padding: 2px 10px;
  border: 1px solid #0f0;
  border-radius: 25px;
  animation: slideBanner 10s linear infinite;
  visibility: hidden;
}
.now-playing-label {
  color: #0f0;
}
.song-title {
  color: #fff;
}
@keyframes slideBanner {
  0% {
    left: 100%;
  }
  100% {
    left: -25%;
  }
}
.outer-container {
  position: relative;
  max-width: 1000px;
  margin: auto;
  padding: 20px;
  border: 1px solid #61ff00;
  background-image: url(images/bgs/DistortedGirl4.png);
  z-index: 0;
}
.header,
.footer {
  position: relative; /* make footer the positioning context */
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
  gap: 5px;
  margin: 5px;
  padding: 0px;
  background: #000;
  border: solid 2px #03004d;
  background-color: #000000;
}
.middle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas:
    "top-right top-middle top-left"
    "middle-right middle-middle middle-left"
    "bottom-right bottom-middle bottom-left";
  gap: 20px;
}
.cell {
  position: relative;
  color: #0b00ff;
  text-shadow: 1px 1px #4f00ff;
  overflow: hidden;
}

[class^="spin-overlay"] {
  position: relative;
  transition: transform 0.6s;
  margin-left: auto;
  margin-right: auto;
}
.spin-overlay-game {
  position: absolute;
  width: 68%;
  left: 8%;
  top: 11%;
  aspect-ratio: 257 / 204;
  border-radius: 10%;
  z-index: 1;
}
[class^="spin-overlay"]:hover {
  transform: rotate(0deg) scale(1.3);
}
.top-middle,
.middle-right,
.middle-left {
  background-color: #000000;
  text-align: center;
  border: 1px solid #61ff00;
}
.middle-middle {
  width: 100%;
  text-align: center;
  background-color: #000000;
  border: 1px solid #61ff00;
}
.top-left {
  width: 100%;
  text-align: center;
  background-color: #000000;
  border: 1px solid #61ff00;
}
.top-right {
  position: relative;
  background-size: cover;
  background-color: #000000;
  background-position: center;
  width: 100%;
  max-width: 471px;
  margin-bottom: 0px;
  aspect-ratio: 471 / 318;
  background-image: url("images/tv.png");
  z-index: 1;
}

.box {
  background-color: #000;
  border-radius: 5px;
  padding: 0;
  margin-bottom: 0px;
  color: #00cc00;
  text-shadow: 1px 1px #7700ff;
  text-align: center;
}

.grid-box{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 0;
  margin-left: 5px;
  margin-right: 5px;
}
.grid-box {
  background: #000000;
  margin: 10px;
  border: 0px solid #340404;
  grid-template-columns: repeat(3, 1fr); /* 3 equal-width columns */
}

.letter,
.directory {
  display: inline-block;
  position: relative;
  animation: floatAnimation 1.5s ease-in-out infinite alternate;
  transition: text-shadow 0.1s;
}
.letter:hover {
  text-shadow: 0 0 20px yellow;
}
.directory:hover {
  text-shadow: 4px 4px 4px #13ff00;
}
@keyframes floatAnimation {
  0% {
    transform: translateY(-3px);
  }
  100% {
    transform: translateY(3px);
  }
}
@media (max-width: 600px) {
  .middle-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "top-right" "top-middle" "top-left" "middle-right" "middle-middle" "middle-left";
  }
}
@keyframes fadeInOut {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}