html {
  background-color: black;
}

@font-face {
  font-family: "Pixellari";
  src: url("./fonts/Pixellari.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

/* Animations grouped at the top for organization */
@keyframes scroll-diag {
  from { background-position: 0 0; }
  to { background-position: 440px 360px; }
}

@keyframes appear {
  0% {
    filter: blur(80px);
    color: black;
    opacity: 0;
    transform: scale(0) translateY(-80px);
  }
  50% {
    filter: blur(0px);
    color: white;
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes red-holding {
  0%, 100% { transform: rotate(-15deg); }
  50% { transform: rotate(15deg); }
}

@keyframes yellow-sitting {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.95); }
}

/* Background and global settings */
body {
  pointer-events: none;
  font-family: "Pixellari", sans-serif;
  font-size: 20px;
  background-color: black; /* Makes the outside edges black */
  margin: 0; /* Removes default browser borders */
}

.Wrapper {
  max-width: 1920px;
  margin: 0 auto; /* Centers the container on the screen */
  min-height: 100vh; /* Ensures the background reaches the bottom of the screen */
  position: relative;
  overflow: hidden; /* Keeps your floating images from stretching the page */
}

@keyframes fade-in-bg {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.Background {
  background-image: url(./images/bg-downscaled.png);
  background-repeat: repeat;
  animation: scroll-diag 12s linear infinite, fade-in-bg 5s ease-out forwards;
  will-change: background-position;
}

/* Grouped shared animation styles */
.Panel, a, #logo {
  animation: appear 1s;
  position: relative;
}

a, #logo {
  pointer-events: auto;
}

/* Styles for the panels */
.PanelContainer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.Panel {
  color: white;
  border: 20px solid transparent;
  border-image: url("./images/panel.png") 5 fill stretch;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  image-rendering: pixelated;
  width: fit-content;

  /* Consolidated padding */
  padding: 30px 15px;
  margin: 20px;

  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 550px;
  max-width: 600px;
  text-align: center;
}

/* Standard Button styles */
button {
  cursor: pointer;
  color: white;
  font-family: inherit;
  font-size: 23px;
  border: 20px solid transparent;
  border-image: url("./images/panel.png") 5 fill stretch;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  padding: 8px;
  margin: 15px;
  background-color: transparent;
  width: fit-content;
  height: fit-content;
}

/* Styles for buttons with icons */
.IconButton {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 20px;
}

.IconButton img {
  width: 50px;
}

/* Link styles */
a {
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
  transition: transform 0.1s ease, opacity 0.1s ease;
}

a:hover {
  opacity: 0.9;
  transform: scale(1.1) translateY(-10px);
}

a:active {
  opacity: 0.7;
  transform: scale(0.8) translateY(8px);
}

/* Stuff for game buttons */
.GameButton {
  display: inline-block;
  margin: 15px;
}

.game_text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  color: white;
  text-shadow: 3px 3px 0px #000;
}

#banner {
position: absolute;
}

#logo {
cursor: pointer;
max-width: 100%;
}

/* Decorative images */
.RedHolding {
  position: absolute;
  width: 200px;
  height: auto;
  top: 100%;
  left: 75%;
  transform-origin: top center;
  animation: red-holding 12s ease-in-out infinite;
}

.YellowSitting {
  position: absolute;
  width: 150px;
  height: auto;
  top: -155px;
  left: 5%;
  transform-origin: bottom center;
  animation: yellow-sitting 4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

/* Misc text and image styling */
.AwerAvatar {
  image-rendering: pixelated;
}

.BottomText {
  margin-top: 0;
  text-align: center;
  width: 100%;
}

.FooterText {
  color: white;
}

/* MOBILE RESPONSIVENESS */
* {
  box-sizing: border-box;
}

#banner, #logo, img {
max-width: 100%;
height: auto;
}

/* When the screen is smaller than 650px (phones and small tablets) */
@media (max-width: 650px) {

  .Panel {
    min-width: 100%;
    width: 100%;

    margin: 10px 0px;
    padding: 20px 10px;
  }

  .GameButton {
    margin: 8px;
  }

  .AboutContent {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .YellowSitting, .RedHolding {
    display: none;
  }
}
