/* Global styles */
@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@400..900&family=Josefin+Sans:ital,wght@0,100..700;1,100..700&display=swap");

:root {
  --primary-color: #84a4af;
  --secondary-color: #d0c8ba;
  --tertiary-color: #f4f4f4;
  --text-color: #090b0b;
  --primary-font: "Cinzel", serif;
  --secondary-font: "Josefin Sans", serif;
  --primary-blue: #84a4af;
  --secondary-beige: #d0c8ba;
  --dark-background: #090b0b;
}

/* Body styles */

body {
  background-image: url("../images/background-image.jpg");
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow-x: hidden;
  position: relative;
}

main {
  font-family: var(--secondary-font);
}

#contactOffcanvas {
  z-index: 1050;
  background-color: var(--primary-color);
}

#contactOffcanvas .btn {
  background-color: var(--secondary-color);
  color: var(--text-color);
  border-color: var(--text-color);
}

#contactOffcanvas .btn:hover {
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

#contactOffcanvas .form-control {
  background-color: var(--secondary-color);
  color: var(--text-color);
  border-color: var(--text-color);
}

/* Navbar styles */

.navbar,
footer {
  font-family: var(--primary-font);
  background-color: var(--primary-color);
}

#icon {
  height: 30px;
  padding-right: 1rem;
}

/* Floating audio toggle button styles */
.floating-audio-toggle {
  position: fixed;
  top: 70px; /* Adjust based on the height of your navbar */
  left: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  color: var(--text-color);
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000; /* Ensure it stays on top */
}

.floating-audio-toggle i {
  font-size: 1.5rem;
}

/* Hero Section Styles */
#hero-section {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh; /* Full viewport height */
  z-index: 10; /* Ensure it floats over other content */
  overflow: hidden;
  transition: position 0.3s ease-in-out;
  padding: 0;
}

.hero-carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slides {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-slide {
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out, transform 5s ease-in-out;
}

.hero-slide:first-child {
  opacity: 1;
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 2rem;
  border-radius: 10px;
  min-width: 300px;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

.hero-content .btn {
  background-color: white;
  color: black;
  border: none;
  padding: 1rem 2rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.hero-content button:hover {
  background-color: var(--primary-blue);
  color: white;
}

.hero-content .btn:active {
  background-color: var(--primary-color);
}

/* Game Area Styles */

.score-style {
  font-size: 1rem;
  font-weight: bold;
  color: var(--text-color);
  background-color: var(--tertiary-color);
  border: var(--primary-color) 2px solid;
  border-radius: 0.25rem; /* Matches Bootstrap's default border radius */
  display: flex;
  text-align: center;
  align-items: center;
  justify-content: center;
  white-space: pre;
  max-height: 2rem;
  min-width: 5rem;
}

#game-section {
  background-color: var(--secondary-color);
  opacity: 0.95;
  border-radius: 0.25rem; /* Matches Bootstrap's default border radius */
}

#gameTabs > .nav-item > .nav-link.active {
  color: var(--text-color);
  background-color: var(--primary-color);
}

#gameTabs > .nav-item > .nav-link.active {
  color: var(--text-color);
  background-color: var(--primary-color);
}

#gameTabs > .nav-item > .nav-link {
  color: var(--text-color);
  border-color: var(--tertiary-color);
}

/* Mole Game Styles */

.mole-game-area {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  align-items: center;
  width: 100%;
  max-width: 600px; /* Static width for larger screens */
  margin: 0 auto;
  padding: 3.3%;
  box-sizing: border-box;
  background-color: lightgreen; /* Default background color */
  background-image: url("../images/mole-board.jpg");
  background-size: cover;
  transition: background-color 0.3s;
  position: relative; /* Ensure the padding trick works */
  z-index: 1;
}

.mole-game-area::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: transparent;
  z-index: -1;
  transition: background-color 1s;
}

.mole-game-area.miss-one::before {
  background-color: rgba(255, 165, 0, 0.2);
}

.mole-game-area.miss-two::before {
  animation: flash 1s infinite alternate; /* Apply flash animation */
}

.mole-game-area:hover,
.mole-game-area:hover * {
  cursor: url("../images/mallet-large.webp") 32 16, auto;
}

/* Mole Styles */

#start-button {
  background-color: var(--primary-color);
  border-color: var(--secondary-color);
}
#start-button:hover {
  background-color: var(--secondary-color);
  border-color: var(--primary-color);
}
.mole {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 27%; /* Adjust the size of the holes */
  aspect-ratio: 1; /* Maintain aspect ratio */
  margin: 3.1%;
  position: relative;
  cursor: pointer;
  transition: background-color 0.1s;
  font-size: 24px;
  color: white;
  font-weight: bold;
}
/* adjust the middle row of moles */
#mole-4,
#mole-5,
#mole-6 {
  margin-top: 50%;
  margin-bottom: 50%;
}

.mole.up {
  background-image: url("../images/mole-token.jpg");
  background-size: cover;
  animation-name: grow-shrink;
  animation-duration: 0.5s;
}

.mole.whack {
  background-image: url("../images/mole-token-broken.png");
  background-size: cover;
}

.mole.miss {
  background: radial-gradient(
    circle,
    rgba(255, 0, 0, 1) 0%,
    rgba(255, 0, 0, 0.5) 60%,
    rgba(255, 0, 0, 0) 80%
  );
  opacity: 0.5;
  color: black;
}

/* Animation for the moles */
@keyframes grow-shrink {
  25% {
    transform: scale(0.8);
  }

  50% {
    transform: scale(1.1);
  }
  75% {
    transform: scale(0.95);
  }
}

@keyframes flash {
  0% {
    background-color: rgba(255, 0, 0, 0.4);
  }
  100% {
    background-color: rgba(255, 0, 0, 0.1);
  }
}

/* Cornish Combination */
#combo-question {
  font-size: 1.5rem;
}

#combo-answer {
  font-size: 1.5rem;
}

#combo-attempt {
  text-transform: uppercase;
}

/* Oscar Snake */
#snake h2 {
  padding: 1rem 0 1rem 0;
}
#snakeContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}
#snakeDiv {
  width: -webkit-fill-available;
}
#gameCanvas {
  width: 100%;
  height: 100%;
  background-color: #000000;
  overflow: hidden;
  border-radius: 10px;
  border: 50px solid transparent; /* Set a transparent border to define the border width */
  border-image: url("../images/mole-board.jpg") 30 round;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.839);
}
button.snakeButton {
  background-color: var(--primary-color);
  border-color: var(--secondary-color);
  color: white;
  padding: 1rem 2rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
  border-radius: 10px;
}
button.snakeButton:hover {
  background-color: var(--secondary-color);
  border-color: var(--primary-color);
}
button.snakeButton:focus {
  background-color: var(--secondary-color);
  border-color: var(--primary-color);
}
button.snakeButton:active {
  background-color: var(--secondary-color) !important;
  border-color: var(--primary-color);
}

/* Hangman styles */

ul > li {
  display: inline-block;
  margin: 5px;
}

#hangman-reset-btn {
  background-color: gray !important;
  color: white !important;
  display: none;
}

#hangman-score {
  display: none;
}

#hangman .btn {
  background-color: var(--primary-color);
  color: var(--text-color);
  border-color: var(--tertiary-color);
}

#hangman-img-space {
  min-height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#combo-img-space {
  display: flex;
  justify-content: center;
  align-items: center;
}

#hangman-img,
#combo-picture {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

#hangmanGameOverText {
  width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-content button {
    padding: 0.75rem 1.5rem;
  }
}

/* Media Queries */

/* Media query for larger screens */
@media (min-width: 768px) {
  .game-area {
    width: 600px; /* Static width for larger screens */
  }
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2rem;
  }
}
