/* styles.css */
@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700&family=Rajdhani:wght@300;400;600&display=swap");

:root {
  /* Main Color Palette */
  --neon-blue: #00f3ff;
  --neon-pink: #ff00ff;
  --neon-purple: #c900ff;
  --neon-green: #00ff9d;
  --dark-bg: #050a1a;
  --darker-bg: #030612;
  --ui-bg: rgba(5, 10, 26, 0.85);
  --text-glow: 0 0 10px rgba(0, 243, 255, 0.8);
  --button-glow: 0 0 20px rgba(0, 243, 255, 0.6);
  --border-glow: 0 0 8px rgba(0, 243, 255, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body,
html {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background-color: var(--darker-bg);
  font-family: "Rajdhani", sans-serif;
  color: white;
  touch-action: manipulation;
}

/* Game Container */
.game-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Background Layers */
.background-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-repeat: repeat-x;
  background-size: 1280px 720px;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.layer1 {
  background-image: url("assets/images/layer1.svg");
  /* background-color: #111; */
  animation-duration: 15s;
  animation-name: moveBackground1;
  z-index: 3;
}

.layer2 {
  background-image: url("assets/images/layer2.svg");
  /* background-color: #222; */
  animation-duration: 30s;
  animation-name: moveBackground2;
  z-index: 2;
}

.layer3 {
  background-image: url("assets/images/layer3.svg");
  /* background-color: #333; */
  animation-duration: 60s;
  animation-name: moveBackground3;
  z-index: 1;
}

@keyframes moveBackground1 {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: -1280px 0;
  }

  /* Move by image width */
}

@keyframes moveBackground2 {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: -1280px 0;
  }
}

@keyframes moveBackground3 {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: -1280px 0;
  }
}

/* Canvas */
#gameCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  /* background-color: var(--dark-bg); */
  background-color: rgba(5, 10, 26, 0.5);
}

/* Modal Styles */
.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--ui-bg);
  padding: 2rem;
  /* Adjusted padding */
  border-radius: 12px;
  /* Adjusted border radius */
  text-align: center;
  border: 1px solid var(--neon-blue);
  /* Adjusted border */
  box-shadow: var(--border-glow);
  /* Adjusted box shadow */
  backdrop-filter: blur(8px);
  /* Added backdrop filter */
  z-index: 10;
  max-width: 600px;
  /* Adjusted max width */
  width: 90%;
}

.modal h1 {
  font-family: "Orbitron", sans-serif;
  font-size: 2.5rem;
  /* Adjusted font size */
  margin-bottom: 1rem;
  color: var(--neon-blue);
  text-shadow: var(--text-glow);
  text-transform: uppercase;
  letter-spacing: 0.2rem;
}

.modal p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: #ffffff;
}

.dino-logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
  background-color: var(--neon-purple);
  background-image: url("assets/images/fox_logo.png");
  /* Set the image */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  box-shadow: 0 0 20px var(--neon-purple);
  border-radius: 50%;
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Controls Info */
.controls-info {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.control {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.key {
  background-color: rgba(0, 243, 255, 0.2);
  border: 1px solid var(--neon-blue);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-family: "Orbitron", sans-serif;
  color: var(--neon-blue);
  margin-bottom: 0.5rem;
  box-shadow: var(--border-glow);
}

.action {
  font-size: 0.9rem;
  color: #cccccc;
}

.neon-button {
  background-color: var(--neon-blue);
  color: var(--darker-bg);
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: var(--button-glow);
  font-family: "Orbitron", sans-serif;
  margin: 5px;
}

#connectWalletButton {
  background-color: var(--neon-green);
  color: var(--darker-bg);
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: var(--button-glow);
  font-family: "Orbitron", sans-serif;
  margin: 5px;
}

#connectWalletButtonGameOver {
  background-color: var(--neon-green);
  color: var(--darker-bg);
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: var(--button-glow);
  font-family: "Orbitron", sans-serif;
  margin: 5px;
}

#leaderboardScreen ol {
  list-style-type: decimal;
  padding-left: 20px;
  text-align: left;
}

#leaderboardScreen li {
  margin-bottom: 5px;
}

/* Neon Border Animation */
@keyframes neonBorder {
  0% {
    box-shadow: 0 0 8px var(--neon-blue), 0 0 16px var(--neon-blue),
      0 0 24px var(--neon-blue);
  }

  100% {
    box-shadow: 0 0 12px var(--neon-pink), 0 0 20px var(--neon-pink),
      0 0 28px var(--neon-pink);
  }
}

/* Media Queries for Mobile Instructions */
@media (max-width: 768px) {
  #instructionText {
    font-size: 1em;
  }

  #instructionText br {
    display: block;
  }
}

@media (min-width: 769px) {
  #instructionText br {
    display: block;
  }
}

/* Mobile View Screen */
#mobileViewScreen {
  display: none;
}

@media (max-width: 768px) {
  #mobileViewScreen {
    display: block;
  }

  #welcomeScreen,
  #gameOverScreen,
  #leaderboardScreen,
  #gameCanvas,
  #scoreDisplay,
  #powerupWidget,
  #audioToggle {
    display: none;
  }
}

/* Game Elements */
.game-element {
  position: absolute;
  color: white;
  font-family: "Orbitron", sans-serif;
  z-index: 2;
}

.stats-panel {
  position: absolute;
  top: 20px;
  /* Adjust the top position as needed */
  left: 20px;
  display: flex;
  gap: 1.5rem;
  background-color: rgba(5, 10, 26, 0.7);
  border-radius: 12px;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(0, 243, 255, 0.3);
  backdrop-filter: blur(4px);
  z-index: 3;
  /* Ensure it is above other elements */
}

.stats-panel .stat {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.icon {
  width: 30px;
  height: 30px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.username-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300f3ff'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22C4.16 15.33 8.25 14 12 14s7.84 1.33 10 3.98c-1.29 1.94-3.5 3.22-6 3.22z'/%3E%3C/svg%3E");
}

.distance-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300f3ff'%3E%3Cpath d='M13 4v2.67l-1 1-1-1V4h2m7 7v2h-2.67l-1-1 1-1H20M6.67 11l1 1-1 1H4v-2h2.67M12 16.33l1 1V20h-2v-2.67l1-1M15 2H9v5.5l3 3 3-3V2zm7 7h-5.5l-3 3 3 3H22V9zM7.5 9H2v6h5.5l3-3-3-3zm4.5 4.5l-3 3V22h6v-5.5l-3-3z'/%3E%3C/svg%3E");
}

.cherry-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff0055'%3E%3Cpath d='M16.84,10.28a11.2,11.2,0,0,0,1.91-5.34,8.88,8.88,0,0,0-4.72,2.67A11.84,11.84,0,0,0,12,12C9.94,16.29,15.69,20.29,16.84,10.28ZM7.43,15.28a3.55,3.55,0,0,0,5.06,0L10,12.81ZM8.34,10.05a1.72,1.72,0,0,0,2.6.16L9.65,8.93ZM18,15c0,3.31-2.69,6-6,6s-6-2.69-6-6c0-2.28,1.88-5.5,6-5.5S18,12.72,18,15Z'/%3E%3C/svg%3E");
}

.coin-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffcc00'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.31-8.86c-1.77-.45-2.34-.94-2.34-1.67 0-.84.79-1.43 2.1-1.43 1.38 0 1.9.66 1.94 1.64h1.71c-.05-1.34-.87-2.57-2.49-2.97V5H10.9v1.69c-1.51.32-2.72 1.3-2.72 2.81 0 1.79 1.49 2.69 3.66 3.21 1.95.46 2.34 1.15 2.34 1.87 0 .53-.39 1.39-2.1 1.39-1.6 0-2.23-.72-2.32-1.64H8.04c.1 1.7 1.36 2.66 2.86 2.97V19h2.34v-1.67c1.52-.29 2.72-1.16 2.73-2.77-.01-2.2-1.9-2.96-3.66-3.42z'/%3E%3C/svg%3E");
}

/* Audio Toggle */
#audioToggle {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 40px;
  height: 40px;
  background-color: var(--ui-bg);
  border: 1px solid var(--neon-blue);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: var(--button-glow);
  z-index: 10;
  /* Make sure it's above other elements */
}

#audioIcon {
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300f3ff'%3E%3Cpath d='M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

#audioToggle.audio-off #audioIcon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300f3ff'%3E%3Cpath d='M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z'/%3E%3C/svg%3E");
}

#powerupWidget {
  position: absolute;
  top: 20px;
  /* Adjust the top position as needed */
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--ui-bg);
  padding: 20px;
  border-radius: 5px;
  color: var(--neon-blue);
  font-family: "Orbitron", sans-serif;
  box-shadow: var(--button-glow);
  text-align: center;
}

#powerupBar {
  width: 100px;
  height: 10px;
  background-color: rgba(255, 255, 255, 0.3);
  border: 1px solid var(--neon-blue);
}

.wallet-icon {
  width: 25px;
  height: 25px;
  background-image: url("data:image/svg+xml,%3Csvg fill='%2300f3ff' version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 969.486 969.486' xml:space='preserve' stroke='%2300f3ff'%3E%3Cg id='SVGRepo_bgCarrier' stroke-width='0'%3E%3C/g%3E%3Cg id='SVGRepo_tracerCarrier' stroke-linecap='round' stroke-linejoin='round'%3E%3C/g%3E%3Cg id='SVGRepo_iconCarrier'%3E %3Cg%3E %3Cg%3E %3Cpath d='M806.582,235.309L766.137,87.125l-137.434,37.51L571.451,9.072L114.798,235.309H0v725.105h907.137V764.973h62.35v-337.53 h-62.352V235.309H806.582z M718.441,170.63l17.654,64.68h-52.561h-75.887h-126.19l111.159-30.339l66.848-18.245L718.441,170.63z M839.135,892.414H68V522.062v-129.13v-10.233v-69.787v-9.602h35.181h27.538h101.592h409.025h75.889h37.43h35.242h35.244h13.994 v51.272v72.86h-15.357h-35.244h-87.85H547.508h-55.217v27.356v75.888v8.758v35.244v35.244v155.039h346.846v127.441H839.135z M901.486,696.973h-28.352h-34H560.291V591.375v-35.244v-35.244v-23.889v-1.555h3.139h90.086h129.129h56.492h34h4.445h23.904 V696.973z M540.707,100.191l21.15,42.688l-238.955,65.2018L540.707,100.191z'%3E%3C/path%3E %3Cpolygon points='614.146,564.57 614.146,576.676 614.146,631.152 680.73,631.152 680.73,564.57 658.498,564.57 '%3E%3C/polygon%3E %3C/g%3E %3C/g%3E%3C/g%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.wallet-address {
  font-size: 0.9rem;
  color: #cccccc;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 150px;
}

.wallet-address:hover {
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
  max-width: none;
}

#usernameInput {
  /* Add any specific styles here if needed, */
  /* overriding or supplementing the inline ones */
  font-family: "Rajdhani", sans-serif;
  font-size: 1rem;
}

#usernameInput::placeholder {
  color: #aaa;
}

#userProfileModal p {
  display: flex;
  /* Use flexbox to align items in a row */
  align-items: center;
  /* Vertically align items in the center */
  gap: 5px;
  /* Add some spacing between text and icon */
}

#userProfileModal .icon {
  display: inline-block;
  /* Make icons inline-block to allow styling */
  width: 20px;
  /* Adjust as needed */
  height: 20px;
  /* Adjust as needed */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.button-row {
  display: flex;
  justify-content: center;
  /* Center buttons horizontally */
  gap: 10px;
  /* Add some space between buttons */
  margin-top: 20px;
  /* Add some space between score and buttons */
}

.leaderboard-table-container {
  overflow-x: auto;
  /* Enable horizontal scrolling if needed */
  margin-top: 20px;
}

#leaderboardTable {
  width: 100%;
  border-collapse: collapse;
  color: white;
  font-family: "Courier New", Courier, monospace;
}

#leaderboardTable th,
#leaderboardTable td {
  border: 1px solid var(--neon-blue);
  padding: 8px;
  text-align: left;
}

#leaderboardTable th {
  background-color: rgba(0, 243, 255, 0.1);
  font-weight: bold;
  text-transform: uppercase;
}

#leaderboardTable tr:nth-child(even) {
  background-color: rgba(0, 243, 255, 0.05);
}

#leaderboardTable tr:hover {
  background-color: rgba(0, 243, 255, 0.15);
}

/* Neon effect for table rows */
#leaderboardTable tr {
  transition: box-shadow 0.3s ease;
}

#leaderboardTable tr:hover {
  box-shadow: 0 0 10px 2px var(--neon-blue);
}

/* Neon effect for table headers */
#leaderboardTable th {
  text-shadow: 0 0 5px var(--neon-blue);
}

/* Neon effect for table cells */
#leaderboardTable td {
  text-shadow: 0 0 3px var(--neon-blue);
}