@font-face {
  font-family: Eliot Lord;
  src: url(Fonts/Eliothand-Regular.otf);
}

@font-face {
  font-family: Jumpman;
  src: url(Fonts/Jumpman.ttf);
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: white;
  overflow-x: hidden;
  background: black;
}

p {
  color: white;
}

.game-wrapper {
  font-family: "Courier New", Courier, monospace;
}

h1 {
  font-family: Jumpman;
}

.container {
  text-align: center;
  padding: 20px;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

h1 {
  font-size: clamp(1.5em, 5vw, 2.5em);
  color: #ec1801;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.instructions {
  font-family: Jumpman;
  font-size: clamp(0.7em, 2vw, 0.9em);
  margin-bottom: 20px;
  color: white;
  padding: 0 10px;
}

#gameCanvas {
  border: 4px solid #002169;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
  background: #000;
  max-width: 100%;
  height: auto;
  display: block;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  border-radius: 10px;
}

.overlay-content {
  text-align: center;
  padding: clamp(20px, 5vw, 40px);
}

.overlay h2 {
  font-size: clamp(1.2em, 4vw, 2em);
  margin-bottom: 20px;
}

.overlay p {
  margin: 10px 0;
  font-size: clamp(0.9em, 2.5vw, 1.1em);
}

.pulse {
  color: #00bed6;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

button {
  background: #0a3161;
  color: white;
  border-radius: 15px;
  width: 60%;
  font-size: 2dvw;
  font-family: Eliot Lord;
}

button:hover {
  background: #b31942;
  transform: scale(1.05);
  cursor: url("img/background/Pointer.svg"),
    url("img/background/cursors/Finger%20cursor.png"), pointer;
}

/* Mobile Start Button */
.mobile-start-btn {
  display: none;
  background: #faa61a;
  color: #000;
  border: 3px solid #002169;
  border-radius: 15px;
  padding: 15px 40px;
  font-size: 1.5em;
  font-family: Jumpman, sans-serif;
  font-weight: bold;
  margin-top: 20px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(250, 166, 26, 0.5);
  transition: all 0.2s;
  width: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mobile-start-btn:active {
  background: #d48d15;
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(250, 166, 26, 0.5);
}

.mobile-start-btn:hover {
  background: #d48d15;
  transform: scale(1.02);
}

/* Show mobile start button on touch devices */
@media (hover: none) and (pointer: coarse), (max-width: 768px) {
  .mobile-start-btn {
    display: inline-block;
  }
  
  .pulse {
    display: none;
  }
}

.banner-arrow {
  background: #000;
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.2s;
}

.game-wrapper {
  position: relative;
  display: inline-block;
}

.footer {
  margin-top: 20px;
  color: #999;
  font-size: clamp(0.7em, 1.8vw, 0.85em);
  max-width: 600px;
  padding: 0 20px;
}

#gameCanvas {
  border: 10px solid #faa61a;
  border-radius: 10px;
  box-shadow: 0 0 10px #faa61a;
  background: #000;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Mobile Controls */
.mobile-controls {
  display: none;
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  width: 100%;
  pointer-events: none;
  z-index: 10;
}

.controls-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 20px;
  max-width: 600px;
  margin: 0 auto;
}

.direction-controls {
  display: flex;
  gap: 10px;
  pointer-events: all;
}

.control-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(0, 33, 105, 0.8);
  border: 3px solid #faa61a;
  color: white;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: all 0.1s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.control-btn:active {
  background: rgba(0, 33, 105, 1);
  transform: scale(0.95);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.jump-btn {
  width: 70px;
  height: 70px;
  pointer-events: all;
  font-weight: bold;
}

/* Show mobile controls on touch devices or small screens */
@media (hover: none) and (pointer: coarse), (max-width: 768px) {
  .mobile-controls {
    display: block;
  }
  
  .instructions {
    display: none;
  }
}

@media (max-width: 650px) {
  .container {
    padding: 10px;
  }

  #gameCanvas {
    border-width: 2px;
  }

  .overlay-content {
    padding: 20px;
  }
  
  .control-btn {
    width: 55px;
    height: 55px;
    font-size: 20px;
  }
  
  .jump-btn {
    width: 65px;
    height: 65px;
  }
}
