:root {
  --primary: rgb(52, 0, 105);
  --secondary: rgb(161, 121, 78);
  --third: rgb(168, 202, 17);
}

body {
  margin: 0;
  padding: 0;
  text-align: center;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--primary);
  background-color: var(--light);
  line-height: 1.5;
}

header {
  padding: 15px 6% 15px 0;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  background-color: var(--primary);
}

header h1 {
  color: var(--primary);
  background-color: var(--secondary);
  padding: 5px 1% 5px 6%;
  margin: 0;
  font-size: 4vw;
  line-height: 1;
}

nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

nav a {
  border-radius: 75px;
  text-decoration: none;
  padding: 5px 10px;
  margin-right: 10px;
  font-size: 1.4rem;
  background-image: url("https://www.icegif.com/wp-content/uploads/2022/09/icegif-1618.gif"),
    linear-gradient(180deg, var(--secondary) 0%, var(--primary) 100%);
}
.navbar-toggler {
  border-radius: 75px;
  border-color: var(--primary);
}

nav a:hover {
  background-size: 100% 100%;
  color: var(--primary);
  cursor: default;
}
#modeSwitchContainer {
  color: var(--secondary);
}

html[data-bs-theme="light"] nav {
  background-color: var(--primary);
  color: var(--secondary);
}

html[data-bs-theme="light"] .navbar-brand {
  background-color: var(--primary);
  color: var(--secondary);
}

html[data-bs-theme="light"] #score {
  color: var(--primary);
}
html[data-bs-theme="light , dark"] .btn {
  background-color: var(--primary);
  border-color: var(--secondary);
  color: var(--secondary);
}
html[data-bs-theme="dark"] .btn {
  background-color: var(--primary);
  border-color: var(--secondary);
  color: var(--secondary);
}

html[data-bs-theme="light"] .btn {
  background-color: var(--primary);
  border-color: var(--secondary);
  color: var(--secondary);
}

html[data-bs-theme="light"] .btn:hover {
  background-color: var(--secondary);
}

html[data-bs-theme="dark"] .btn:hover {
  background-color: var(--secondary);
  color: var(--primary);
}

html[data-bs-theme="dark"] #game {
  border: 2px solid var(--secondary);
}
#title-modal {
  color: var(--secondary);
  text-align: center;
}
#modal-body{
  color: var(--secondary);
}

#scores-body {
  color: var(--secondary);
}

#score {
  color: antiquewhite;
}

#game {
  width: 600px;
  height: 300px;
  border: 2px solid black;
  margin: auto;
  background-image: url(Sprites/tropicalCity.jpg); /* Replace with your image path */
  background-size: cover; /* Ensures the image covers the entire area */
  background-position: center; /* Centers the image */
  background-repeat: no-repeat; /* Prevents tiling of the image */
}

#char {
  height: 50px; 
  width: 50px;
  position: relative;
  top: 245px;
  left: 10px;
  background-image: url(Sprites/main_char-removebg-preview.png); /* Replace with your file path */
  background-size: cover; /* Ensures the image covers the element */
}

#char.collided {
  top: 248px;
  left: 10px;
  background-image: url(./Sprites/dead_player-removebg-preview.png); /* New image after collision */
  background-size: cover;
  background-repeat: no-repeat;
  animation: none; /* Stop animations if any */
}

.animateJump {
  animation: charJump 500ms linear;
}

.animateSlide{
  animation: objectSlide 0.75s linear infinite;
}

#object {

    height: 100px; /* Adjust height if needed */
    width: 50px; /* Adjust width if needed */
    position: relative;
    top: 155px;
    right: -540px;
    background-image: url(./Sprites/Building\ img..png); /* Replace with your file path */
    background-size: cover; /* Ensures the image covers the element */
    animation: objectSlide 0.75s linear infinite; /* Keeps the sliding animation */
    animation-delay: 3s;
  }

  #object.collided {
    left: 50px;
    top: 163px;
    background-image: url(./Sprites/Broken_building-removebg-preview.png); /* Path to your new image */
    background-size: cover;
    background-repeat: no-repeat;
    animation: none; /* Stop animation */
    
  }

#footerbrand{
  color: var(--secondary);
  border-radius: 75px;
  text-decoration: none;
  padding: 5px 10px;
  margin-right: 10px;
  font-size: 1.4rem;
  background-image: url("https://www.icegif.com/wp-content/uploads/2022/09/icegif-1618.gif"),
    linear-gradient(180deg, var(--secondary) 0%, var(--primary) 100%);
}

#footerbrand:hover {
  background-size: 100% 100%;
  color: var(--secondary);
  cursor: default;
}

footer a {
  color: var(--secondary);
  padding: 10px;
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.footer-container{
  padding-right: 10px;
  padding-left: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  justify-content: space-around;
}

.footer-link{
  display: flex;
  margin: 32px;
}

@keyframes objectSlide {
  0% {
    left: 560px;
  }
  100% {
    left: 0;
  }
}

@keyframes charJump {
  0%,
  100% {
    top: 266px;
  }
  50% {
    top: 140px;
    transform: rotate(360deg);
  }
}
