* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column; /* Stack the h1 above the flashcards */
  justify-content: center;
  align-items: center; /* Center both the h1 and flashcards horizontally */
  height: 100vh;
  margin: 0;
  background-color: #f5f5f5;
}

.flashcard {
  text-align: initial; /* Reset text alignment for child elements */
}


.flashcard-title {
  display: hidden;
  text-align: center; /* Center the text horizontally */
  font-size: 1.5rem; /* Adjust the size as needed */
  margin-bottom: 10px; /* Add space between the title and the flashcard deck */
  font-weight: bold;
  color: #333;
}

.flashcard-container {
  display: flex;
  overflow: hidden;
  width: 90%; /* Adjust width */
  height: 100%; /* Adjust height */
  border-radius: 10px;
}

.navigation-instructions {
  text-align: center;
  font-size: 12px;
  color: #333;
  margin-top: 5px;
  padding: 5px;
  background-color: #ffffff;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.flashcard {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.3s ease;
}

/* Make the answer scrollable if it overflows */
.flashcard p {
  font-size: clamp(16px, 2.5vw, 36px); /* Adjust between 16px and 36px based on the viewport */
  text-align: center;
  max-height: 90%; /* Adjust this value based on the height of your flashcard */
  overflow-y: auto; /* Enables vertical scrolling */
  padding-right: 10px; /* Prevents text from hiding behind the scrollbar */

  /* New styles for making the question readable over background images */
  background-color: rgba(255, 255, 255, 0.8); /* White background with 80% opacity */
  padding: 15px; /* Space around the text */
  border-radius: 10px; /* Rounded corners */
  border: 1px solid #ccc; /* Optional border */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
  margin: 0 auto; /* Center the text block */
  max-width: 90%; /* Prevent text from stretching too wide */
  color: #333; /* Text color */
}

.flashcard .category {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 14px;
  font-weight: bold;
  color: #555;

  /* New styles for making the category text readable over background images */
  background-color: rgba(255, 255, 255, 0.8); /* White background with 80% opacity */
  padding: 10px; /* Space around the category text */
  border-radius: 10px; /* Rounded corners */
  border: 1px solid #ccc; /* Optional border */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
  color: #333; /* Text color */
  display: inline-block; /* Ensure it doesn’t take full width */
  width: auto; /* Auto width for better fit */
}

.flashcard .flashcard-counter {
  position: absolute;
  bottom: 10px;
  left: 20px;
  font-size: 16px;
  font-weight: bold;
  color: #555;

  /* New styles for making the counter readable over background images */
  background-color: rgba(255, 255, 255, 0.8); /* White background with 80% opacity */
  padding: 10px; /* Space around the counter text */
  border-radius: 10px; /* Rounded corners */
  border: 1px solid #ccc; /* Optional border */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
  color: #333; /* Text color */
  display: inline-block; /* Ensure it doesn’t take full width */
  width: auto; /* Auto width for better fit */
}

.memorized-btn {
  position: absolute;
  bottom: 10px;
  right: 20px;
  padding: 10px 15px;
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.flashcard.front {
  background-color: #fff;
  color: #333;
}

.flashcard.back {
  background-color: #f0f0f0;
  color: #226E93;
}

.flashcard.flipped {
  background-color: #f0f0f0;
  color: #555;
  transform: rotateY(180deg);
}


.filter-btn {
  padding: 10px 20px;
  font-size: 16px;
  background-color: rgba(0, 123, 255, 0.8); /* Semi-transparent blue background */
  color: white;
  border: 1px solid rgba(0, 123, 255, 0.8); /* Subtle border matching the button color */
  border-radius: 10px; /* Rounded corners for consistency */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
  cursor: pointer;
  display: block;
  margin: 10px auto;
  transition: background-color 0.3s ease; /* Smooth transition for hover effect */
}

.filter-btn:hover {
  background-color: rgba(0, 86, 179, 0.8); /* Darker shade of blue on hover */
  border: 1px solid rgba(0, 86, 179, 0.8); /* Adjust border on hover */ 
}

.nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 24px;
  padding: 10px;
  cursor: pointer;
  z-index: 10;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-button.left {
  left: 20px; /* Adjust this based on your layout */
}

.nav-button.right {
  right: 20px; /* Adjust this based on your layout */
}

.nav-button:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

/* Hide navigation buttons on screens smaller than 768px (mobile) */
@media (max-width: 768px) {
  .nav-button {
    display: none;
  }
}

.swipe-icon {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(-10px);
  }
}

/* Add this for the right arrow bounce */
.swipe-icon.fa-arrow-right {
  animation: bounce-right 2s infinite;
}

@keyframes bounce-right {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(10px); /* Moves right by 10px */
  }
}

/* Add a subtle pulsing animation to the memorized button */
.memorized-btn {
  animation: pulse 2s infinite; /* Adjust the speed of the pulse */
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05); /* Slightly increase the size */
  }
  100% {
    transform: scale(1);
  }
}


.cta-button {
  padding: 12px 24px;
  background-color: #2C3E50; /* Navy blue */
  color: white;
  border: 1px solid #AED6F1; /* Light blue border */
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Light shadow */
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
  background-color: #2980B9; /* Slate blue */
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15); /* Slightly deeper shadow */
}



/*Sidebar/////////////////////////////////////////////////////////////*/

/* Sidebar styling */
.sidebar {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  background-color: #111;
  overflow-x: hidden;
  transition: 0.5s;
  padding-top: 60px;
}

.sidebar a {
  padding: 10px 15px;
  text-decoration: none;
  font-size: 25px;
  color: #818181;
  display: block;
  transition: 0.3s;
}

.sidebar a:hover {
  color: #f1f1f1;
}

.sidebar .closebtn {
  position: absolute;
  top: 0;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
}

/* Sidebar styling */
.sidebar {
  height: 100%;
  width: 250px; /* Visible on desktop by default */
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  background-color: #111;
  overflow-x: hidden;
  transition: 0.5s;
  padding-top: 60px;
}

.sidebar a {
  padding: 10px 15px;
  text-decoration: none;
  font-size: 25px;
  color: #818181;
  display: block;
  transition: 0.3s;
}

.sidebar a:hover {
  color: #f1f1f1;
}

.sidebar .closebtn {
  position: absolute;
  top: 0;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
  display: none; /* Hide close button on desktop */
}

/********************************************************************888*/

.code-block {
  text-align: left;
  background-color: #f0f0f0;
  padding: 10px;
  border-radius: 5px;
  font-family: monospace; /* Ensures code font style */
  overflow-x: auto; /* Allows horizontal scrolling for long lines */
}

code-block {
  display: flex;
  text-align: left;
  background-color: #f4f4f4;
  color: #333; 
  font-family: monospace; 
  padding: 15px; 
  border-radius: 8px; 
}



