/* Global styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #121212;
  color: #e0e0e0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box; /* Ensure padding is included in width calculations */
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

h1 {
  margin: 20px 0;
  font-size: 2rem;
  color: #fff;
  background-color: #1d1d1d;
  padding: 10px 20px;
  border-radius: 10px;
}

.button-container {
  display: flex;
  gap: 10px;
  margin: 20px;
  justify-content: center;
}

.search-container {
  margin-bottom: 20px;
  width: 100%;
  max-width: 600px;
}

#search-bar {
  width: 100%;
  padding: 10px;
  border: 4px solid #e83e8c;
  border-radius: 5px;
  font-size: 1rem;
  box-sizing: border-box;
}

button {
  color: white;
  border: none;
  border-radius: 5px;
  padding: 10px 20px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
}

button:hover {
  transform: scale(1.05);
}

button:active {
  transform: scale(1);
}

.btn-upcoming {
  font-weight: 900;
  color: #080808;
  background-color: #4DA0FF; /* Updated blue for higher contrast */
}

.btn-upcoming:hover {
  background-color: #0056b3;
}

.btn-past {
  font-weight: 900;
  color: #080808;
  background-color: #EF6CA9; /* Updated pink for higher contrast */
}

.btn-past:hover {
  background-color: #c2185b;
}

#events-container {
  width: 100%;
  max-width: 1200px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.event-list {
  display: flex;
  gap: 15px;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.event-card {
  border-radius: 10px;
  padding: 20px;
  background-color: #1d1d1d;
  color: #e0e0e0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.3s, transform 0.3s;
  text-decoration: none;
  display: block;
  width: 100%;
  max-width: 600px;
  font-size: 1rem;
}

.event-card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
  transform: translateY(-5px);
}

.event-card.upcoming {
  border: 2px solid #007bff; /* Blue border for upcoming events */
}

.event-card.past {
  border: 2px solid #e83e8c; /* Pink border for past events */
}

.past-event {
  filter: grayscale(100%);
}

/* Footer styles */
footer {
  background-color: #1d1d1d;
  color: #e0e0e0;
  text-align: center;
  padding: 10px;
  margin-top: 20px;
  width: 100%;
}

footer p {
  margin: 0;
  font-size: 14px;
}

footer a {
  color: #35CF59; /* Match the green color used for buttons */
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  body {
    margin: 0;
    padding: 0 10px; /* Add padding on the sides */
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #121212;
    font-size: 16px; /* Ensure legible font sizes */
    box-sizing: border-box;
  }

  .button-container {
    flex-direction: row;
    justify-content: center;
    margin: 20px;
  }

  .search-container {
    width: calc(100% - 20px); /* Full width minus side padding */
    padding: 0 10px;
    box-sizing: border-box;
    margin-bottom: 20px;
  }

  #search-bar {
    width: 100%;
    padding: 10px;
    font-size: 16px; /* Ensure the font size is readable */
    border: 2px solid #28a745; /* Green border */
    border-radius: 5px;
    background-color: #1d1d1d; /* Background color for better contrast */
    color: #e0e0e0; /* Text color for readability */
  }

  #events-container {
    width: calc(100% - 20px); /* Full width minus side padding */
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .event-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 15px;
  }

  .event-card {
    padding: 10px;
    width: 100%;
    max-width: 100%; /* Ensure it fills the container */
    box-sizing: border-box;
  }
}
