@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideRight {
  from {
    transform: translateX(20px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes scaleUp {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes gradient-animation {
  0% {
    background-position: 0% 0%;
  }

  50% {
    background-position: 100% 100%;
  }

  100% {
    background-position: 200% 200%;
  }
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
    /* End at the original position */
  }
}



body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #333;
  color: #fff;
  min-height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  animation: fadeIn 1s ease-in-out;
  overflow-x: hidden;
}


header {
  width: 100%;
  background-color: #222;
  padding: 10px 0;
  z-index: 1001;
  /* Ensure header is above the sign-in popup */
  box-sizing: border-box;
  /* Include padding in width calculation */

}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
}

nav ul li {
  margin: 0 20px;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: #863abd;
  /* Match purple accent color */
}

main {
  flex-grow: 1;
  display: flex;
}

#description {
  text-align: center;
}

iframe {
  width: 100%;
  aspect-ratio: 16/9;
  max-width: 640px; /* Adjust this value as needed */
  display: block;
  margin: 0 auto;
}


.container {
  display: flex;
  justify-content: space-around;
  padding: 20px;
  padding-bottom: 10vh;
  width: 100%;
  height: 60vh;
}

.extractor {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 20px;
  margin-right: 20px;
  margin-left:20px;
  background-color: #444;
  border-radius: 10px;
}

.results {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 20px;
  margin-right: 20px;
  background-color: #444;
  border-radius: 10px;

  position: relative;
  /*for the spinner */
}

.results h2 {
  flex-shrink: 0;
  align-self: center;
}

.results #event-collection {
  flex-grow: 1;
  overflow-y: auto;
  max-height: 100%;
  background:
    linear-gradient(135deg, rgba(64, 64, 64, 1) 25%, rgba(64, 64, 64, 0) 25%) -50px 0,
    linear-gradient(225deg, rgba(64, 64, 64, 1) 25%, rgba(64, 64, 64, 0) 25%) -50px 0,
    linear-gradient(135deg, rgba(64, 64, 64, 0) 75%, rgba(64, 64, 64, 1) 75%) -50px 0,
    linear-gradient(225deg, rgba(64, 64, 64, 0) 75%, rgba(64, 64, 64, 1) 75%) -50px 0;
  background-size: 100px 100px;
  background-repeat: repeat;
  position: relative;

  text-align: left;
}

.results #event-collection::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, transparent, rgba(68, 68, 68, 1) 80%);
  pointer-events: none;
}



textarea {
  width: 100%;
  border-radius: 5px;
  border: none;
  resize: none;
  margin-bottom: 10px;
  flex-grow: 1;
  background-color: #555555;
  color: #FFFFFF;
  filter: drop-shadow(1px 2px 2px #252525);
}

.button-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* aligns items to the right horizontally */
}



button {  
  background: linear-gradient(135deg, #7243cc, #a37fff);
  background-size: 200% 200%;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-position 0.25s ease-in-out;
  width: 150px;
  /* Set a fixed width for the buttons */
  text-align: center;
}

button:hover {
  background-position: 100% 0%;
}

gCal-button {
  font-size: medium;
  background: linear-gradient(135deg, #7243cc, #a37fff);
  background-size: 200% 200%;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-position 0.25s ease-in-out;
  max-width: 200px;
  /* Set a fixed width for the buttons */
  text-align: center;
}

gCal-button:hover {
  background-position: 100% 0%;
}

#gCalLink-Href {
  font-size: medium;
  display: flex; /* Enables flexbox layout */
  align-items: center; /* Vertically centers the content */
  justify-content: center; /* Horizontally centers the content */
  background: linear-gradient(135deg, #7243cc, #a37fff);
  background-size: 200% 200%;
  color: #fff;
  text-decoration: none; /* Removes the default underline on links */
  padding: 10px 20px;
  border-radius: 5px;
  max-width: 200px;
  cursor: pointer;
  transition: background-position 0.25s ease-in-out;
  margin-top: 20px;
}


#gCalLink-Href:hover {
  background-position: 100% 0%;
}


.event {
  background-color: #555;
  filter: drop-shadow(1px 2px 2px #252525);
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  opacity: 0;
  /* Initially hidden */
  transform: translateY(20px);
  /* Start slightly lower */
  animation: fadeInUp 2s forwards;
  /* Fade-in and slide-up animation */

}




.event .text {
  line-height: 1.5;
  flex-grow: 1;
}

.event .button {
  margin-left: 10px;
}

/* Sign-in Popup */
.signin-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.505);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  /*animation stuff */
  opacity: 0;
  /* Initially hidden */
  transform: translateY(20px);
  /* Start slightly lower */
  animation: fadeInUp 0.5s forwards;
  /* Fade-in and slide-up animation */
}

.signin-popup-content {
  background-color: #444;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
}

.signin-popup-content h2 {
  margin-top: 0;
}

#signin-btn,
#backout-btn {
  background-color: #8a4aff;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  width: 35%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#signin-btn:hover,
#backout-btn:hover {
  background-color: #7243cc;
}

#signin-btn img {
  margin-right: 8px;
  /* Spacing between logo and text */
  width: 20px;
  height: 20px;
  vertical-align: middle;
}

#backout-btn {
  margin-right: 10%;
  /* Keep margin if necessary */
}


#backout-btn:hover {
  background-color: #7243cc;
}


/* Loading spinner container */
.loading-spinner {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;

  align-items: center;
  align-self: center;
}

.spinner {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #3498db;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

#loading-text {
  align-self: center;
}

/*Swal2*/
/* Custom styling for SweetAlert2 buttons */
.auth-signin-btn,
.auth-backout-btn {
  background-color: #8a4aff;
  color: #fff !important;
  border: none !important;
  padding: 10px 20px !important;
  border-radius: 5px !important;
  cursor: pointer !important;
  width: 35% !important; /* Make both buttons the same width */
  height: 75%;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 10px 5px !important; /* Add margin to create space between buttons */
}




@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

#global-counter {
  margin: 20px auto;
  padding: 10px;
  text-align: center;
  background-color: #444444;
  
  border-radius: 5px;
  font-size: 18px;
  color: #ffffff;
  max-width: 400px;
}

#stats-box {
  margin-top: 10px;
  padding: 8px;
  background-color: #333333; /* slightly darker color */
  border-radius: 5px;
  line-height: 30px;
}

/* Footer Styling */
footer {
  text-align: center;
  padding: 10px 0;
  background-color: #222;
  color: #e0e0e0;
  font-size: 14px;
  margin-top: auto;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
}



/* Styles for mobile devices.*/
@media only screen and (max-width: 1024px) {

    /* Allow the body to expand with content on mobile */
    body {
      height: auto;
      min-height: 220vh;
    }

  .container {
    display: flex;
    flex-direction: column;
    padding: 5%;
    width: 100%;
    min-height: 95vh;
    max-height: 100vh; /* Changed from height: 100vh */
    box-sizing: border-box;
  }

  .extractor {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    /* Remove height: 100vh; or use min-height if necessary */
  }

  .results {
    width: 100%;
    box-sizing: border-box;
    margin: 5% 0 0 0;
    /* Remove fixed height to allow dynamic expansion */
  }



  

  footer {
    padding: 5%;
  }
}

