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

body {
  font-family: "Segoe UI", sans-serif;
  background-color: #0d1117;
  color: #e6edf3;
  padding: 20px;
  text-align: center;
}

/* Main Container */
main {
  max-width: 960px;
  margin: 0 auto;
  padding-bottom: 40px;
}

/* Header */
h1 {
  color: #58a6ff;
  margin-bottom: 20px;
}

/* Event List */
#event-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 30px;
  padding: 0 10px;
}

/* Event Card */
.card {
  background-color: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s, border-color 0.2s;
  text-align: left;
  display: flex;
  flex-direction: column;
  max-width: 600px;
  margin: 0 auto; /* center horizontally */
}

.card:hover {
  transform: scale(1.02);
  border-color: #58a6ff;
}

/* Card Header */
.card-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.card-header h2 {
  color: #f0f6fc;
  font-size: 1.4rem;
  margin: 0;
}

.event-date {
  font-size: 0.95rem;
  color: #8b949e;
  font-weight: 500;
}

/* Thumbnail Container */
.thumbnail-container {
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  margin-bottom: 16px;
}

.thumbnail {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.thumbnail:hover,
.thumbnail:focus {
  transform: scale(1.05);
  outline: none;
}

/* Card Footer */
.card-footer {
  text-align: center;
}

.button {
  display: inline-block;
  padding: 12px 28px;
  background-color: #238636;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  transition: background-color 0.25s ease;
  user-select: none;
}

.button:hover,
.button:focus {
  background-color: #2ea043;
  outline: none;
}

/* No Events / Error Messages */
.no-events,
.error-message {
  color: #f85149;
  font-size: 1.1rem;
  margin-top: 20px;
  text-align: center;
}

/* Responsiveness */
@media (min-width: 480px) {
  .card {
    flex-direction: row;
    align-items: center;
  }

  .thumbnail-container {
    width: 180px;
    flex-shrink: 0;
    margin-right: 20px;
    margin-bottom: 0;
  }

  .card-header {
    flex: 1;
    margin-bottom: 0;
  }

  .card-footer {
    flex-shrink: 0;
    margin-left: 20px;
    text-align: right;
  }
}

/* Footer styles */
footer {
  margin-top: 60px;
  padding: 20px 0;
  border-top: 1px solid #30363d;
  color: #8b949e;
  font-size: 0.9rem;
  text-align: center;
  user-select: none;
}
