:root {
  --light-bg: #f4f7fa;
  --dark-bg: #1e1e2f;
  --light-card: linear-gradient(135deg, #e0eafc, #cfdef3);
  --dark-card: linear-gradient(135deg, #2c3e50, #4ca1af);
  --text-light: #1a1a1a;
  --text-dark: #f1f1f1;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background-color: var(--light-bg);
  color: var(--text-light);
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Dark mode styles */
body[data-theme="dark"] {
  background-color: var(--dark-bg);
  color: var(--text-dark);
}

body[data-theme="dark"] .card {
  background: var(--dark-card);
}

body[data-theme="dark"] button.dark-toggle-mode {
  color: var(--text-dark); /* Change icon color in dark mode */
}

.match-accomplished {
  font-weight: bold;
  text-transform: uppercase;
  text-decoration: underline;
  color: #4CAF50;
}

/* General button styling */
button.dark-toggle-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px; /* Space between icons */
  background-color: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  transition: color 0.4s ease;
}

/* Light mode styles */
body[data-theme="light"] .dark-toggle-mode span:first-child {
  display: inline-block; /* Show sun icon in light mode */
}

body[data-theme="light"] .dark-toggle-mode span:last-child {
  display: none; /* Hide moon icon in light mode */
}

/* Dark mode styles */
body[data-theme="dark"] .dark-toggle-mode span:first-child {
  display: none; /* Hide sun icon in dark mode */
}

body[data-theme="dark"] .dark-toggle-mode span:last-child {
  display: inline-block; /* Show moon icon in dark mode */
}

/* HOME CSS */
.home-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1000px;
    margin-bottom: 120px;
}

.card {
    background: var(--light-card);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, background 0.4s ease;
    cursor: pointer;
}

body.dark-mode .card {
    background: var(--dark-card);
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
}

.card h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.card p {
    font-size: 1rem;
}

.footer-links {
    color: #c8b27b !important;
}

/* MATCH COLOURS CSS */
.nav-link {
    color:#444242; 
    font-weight: bold;
    font-size: 1.3rem;
}

.nav-link:hover {
    color:#c0990d; 
}

#jb-ecd-tech-logo {
    width: 100px;
}

#startGameBtn {
    width: 100%;
    border-radius: 30px;
}

.start-btn-sec {
    margin-top: 20px;
}

/* ITEMS TO MATCH */
.beautified-text {
    display: inline-block;
    font-size: 4rem; 
    font-weight: bold; 
    color: #705b09; 
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); 
    letter-spacing: 2px; 
    background: linear-gradient(135deg, #4682b4, #6495ed); 
    -webkit-background-clip: text; 
    background-clip: text;
    color: transparent; 
    transition: all 0.5s ease; 
    animation: pulse 3s infinite alternate; 
  }
  
  /* Hover effect with a different gradient and shadow */
  .beautified-text:hover {
    border: 2px solid  #ffa500;
    padding: 5px;
    text-shadow: 
      3px 3px 6px rgba(0, 0, 0, 0.5),
      0 0 10px rgba(255, 255, 255, 0.8);
    transform: scale(1.1); 
  }
  
  /* Pulsing animation */
  @keyframes pulse {
    0% {
      text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.3), 
        0 0 5px rgba(255, 255, 255, 0.5); 
    }
    100% {
      text-shadow: 
        3px 3px 6px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(255, 255, 255, 0.8);
    }
  }

@keyframes pulse {
    0% {
        text-shadow:
            0 0 5px #fff,
            0 0 10px #fff,
            0 0 20px #7d6905,
            0 0 30px #ff00ff;
    }

    100% {
        text-shadow:
            0 0 10px #fff,
            0 0 20px #fff,
            0 0 30px #ff00ff,
            0 0 40px #ff00ff,
            0 0 50px #ff00ff;
    }
}

.draggable {
    color: #000;
    padding: 12px 16px;
    border: 2px dashed #ccc;
    border-radius: 12px;
    background-color: #f9f9f9;
    margin: 0 5px;
    cursor: grab;
    font-size: 1.4em;
    transition: background-color 0.8s ease;
}

.droppable {
    width: 100px;
    height: 100px;
    margin: 10px;
    border-radius: 10px;
    border: 2px dashed #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.draggable,
.droppable {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 5px;
}

.animal-match-droppables {
  font-size: 1.2rem;
}

.droppable.correct {
    background-color: #d4edda;
    border-color: #28a745;
}

.droppable.incorrect {
    background-color: #f8d7da;
    border-color: #dc3545;
}

.listing {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    max-width: fit-content;
}

body.dark-mode {
    background-color: var(--dark-bg);
    color: var(--text-dark);
}

.toggle-mode {
    padding: 0 7px 1px 7px;
    border: 1px dotted #357abd;
    background-color: #585958;
    color: white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.toggle-mode:hover {
    background-color: #357abd;
}

@keyframes correct {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes incorrect {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }
}

.faded {
    opacity: 0.3 !important;
}

.jb-footer {
    position: relative;
    bottom: 0;
    margin-bottom: -20px;
}

.footer-links {
    color: #c8b27b;
}


  /* MATCH ANIMALS */
  
.score {
  font-family: monospace;
  text-align: center;
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: 0.25rem;
  margin: 1rem;
  position: relative;
  transition: opacity 0.2s;
}
#play-again-btn {
  position: absolute;
  top: -0.3rem;
  left: 50%;
  margin-left: -50px;
  font-size: 1rem;
  font-weight: bold;
  color: #fff;
	border: 5px double #fff; 
	border-radius: 14px;
	padding: 8px 10px;  
  outline: none;
  letter-spacing: .05em;
  cursor: pointer;
  display: none;
  opacity: 0;
  transition: opacity 0.5s, transform 0.5s, background-color 0.2s;
}
#play-again-btn:hover {
  background-color: #333;
}
#play-again-btn:active {
  background-color: #555;
}
#play-again-btn.play-again-btn-entrance {
  opacity: 1;
  transform: translateX(6rem);
}
.draggable-items {
  display: flex;
  justify-content: center;
  margin: 1rem 1rem 1.5rem 1rem;
  transition: opacity 0.5s;
}
.draggable {
  height: 5rem;
  width: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: bold;
  margin: 0rem 0.5rem;
  cursor: move;
  transition: opacity 0.2s;
}

.draggable:hover {
  opacity: 0.5;
}
.matching-pairs {
  transition: opacity 0.5s;
}
.matching-pair {
  height: 6rem;
  width: 22rem;
  margin: 1rem auto;
  display: flex;
  justify-content: center;
}

.draggable,
.matching-pairs {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 5px;
}
.matching-pair span {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  user-select: none;
}
.label {
  font-size: 1.5rem;
}
.droppable {
  width: 6rem;
  font-size: 4rem;
  background-color: #fff;
  border: 3px dashed #111;
  transition: 0.2s;
}

.droppable-hover {
  background-color: #bee3f0;
  transform: scale(1.1);
}
.dropped {
  border-style: solid;
}
.dragged {
  user-select: none;
  opacity: 0.1;
  cursor: default;
}
.draggable.dragged:hover {
  opacity: 0.1;
}

@media (max-width: 600px) {
  html { font-size: 14px; }
  #play-again-btn { top: -0.4rem; }
  #play-again-btn.play-again-btn-entrance { transform: translateX(7rem); }
}

/* MATCH SOUNDS CSS */
.game-container {
  text-align: center;
}

.sound-button {
  padding: 15px 30px;
  font-size: 18px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 20px;
  transition: transform 0.1s;
}

.sound-button:active {
  transform: scale(0.95);
}

.choices-container {
  display: none;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
}

.choice-item {
  width: 150px;
  height: 150px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 3px solid transparent;
}

.choice-item:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.choice-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#result-message {
  margin-top: 20px;
  font-size: 20px;
  font-weight: bold;
  min-height: 24px;
}

.correct {
  border-color: #4CAF50 !important;
}

.incorrect {
  border-color: #ff4444 !important;
}

.ms-game-instructions, p {
  font-size: 12;
}