@font-face {
  font-family: "BDCartoonShoutRegular";
  src: url("BD_Cartoon_Shout-webfont.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

#pacman {
  height: 450px;
  width: 342px;
  margin: 20px auto;
}

#shim {
  font-family: "BDCartoonShoutRegular";
  position: absolute;
  visibility: hidden;
}

body {
  margin: 0;
  height: 100vh;
  background-color: #1a2525;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
  color: #87ceeb;
}

a {
  text-decoration: none;
}

.game-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

#header {
  width: 100%;
  max-width: 600px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  box-sizing: border-box;
}

#game-title {
  font-size: 24px;
  font-weight: bold;
  background: rgba(0, 0, 0, 0.5);
  padding: 5px 10px;
  border-radius: 5px;
}

#level-display {
  font-size: 20px;
  background: rgba(0, 0, 0, 0.5);
  padding: 5px 10px;
  border-radius: 5px;
}

#settings-btn {
  font-size: 24px;
  padding: 5px 10px;
  background: #333333;
  color: #87ceeb;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

canvas {
  border: 1px solid #87ceeb;
  max-width: 90vw;
  max-height: 70vh;
}

.ad {
  width: 100%;
  max-width: 600px;
  height: 40px;
  background-color: #333333;
  text-align: center;
  line-height: 40px;
  font-size: 14px;
  overflow: hidden;
  z-index: 10;
}

.top-ad {
  order: 1;
  animation: scrollAd 10s infinite linear;
}

.bottom-ad {
  order: 3;
  animation: scrollAd 10s infinite linear reverse;
}

@keyframes scrollAd {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

#settings-menu {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #333333;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  z-index: 20;
}

#settings-menu h2,
#settings-menu p,
#settings-menu label {
  color: #87ceeb;
}

#settings-menu button {
  display: block;
  margin: 10px auto;
  padding: 5px 10px;
  font-size: 16px;
  background: #444444;
  color: #87ceeb;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#gyro-sensitivity,
#ball-speed {
  width: 80%;
}

.hidden {
  display: none;
}

#about-section,
#contact-section {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #333333;
  padding: 20px;
  box-sizing: border-box;
}

#about-section h3,
#contact-section h3 {
  color: #17a2b8;
}

#level-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  z-index: 30;
  color: #87ceeb;
}

#level-popup h2 {
  margin: 0;
  font-size: 28px;
}

#level-popup p {
  margin: 5px 0;
  font-size: 18px;
}

/* Styling for ORYX-GAMES */
.oryx {
  color: #ffffff;
}

.dash {
  background: linear-gradient(to right, white 50%, #17a2b8 50%);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

.games {
  color: #17a2b8;
  font-weight: bold;
}

@media (max-width: 600px) {
  canvas {
    max-width: 100vw;
    max-height: 60vh;
  }
  .ad {
    height: 30px;
    font-size: 12px;
    line-height: 30px;
  }
  #settings-menu {
    width: 80%;
  }
  #game-title {
    font-size: 18px;
  }
  #level-display {
    font-size: 16px;
  }
  #settings-btn {
    font-size: 20px;
  }
  #level-popup h2 {
    font-size: 20px;
  }
  #level-popup p {
    font-size: 14px;
  }
}