/* Variables */
:root {
  --bg-color: #16191c;
  --text-color: #e0e0e0;
  --primary-color: #ff7700;
  --secondary-color: #c740c7;
  --card-bg-color: #1e2226;
  --border-color: #444;
}

/* Global Styles */
body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Roboto', Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

h1 {
  color: var(--primary-color);
  margin: 0;
  font-size: 2rem;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
}

header {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 20px;
}

/* Components */
.logo {
  width: 300px;
  height: auto;
  margin-right: 0;
}

.event-box {
  background-color: var(--card-bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.event-box .activity-count {
  font-size: 3rem;
  font-weight: bold;
  color: white;
  margin: 10px 0;
}

.event-box h3 {
  color: var(--primary-color);
  margin-top: 0;
  font-size: 1.4em;
}

#events-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.event {
  background-color: var(--card-bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden; /* Prevent content from spilling out */
}

.event p {
  margin: 10px 0;
  word-wrap: break-word; /* Allow long words to break and wrap */
  overflow-wrap: break-word;
}

.event p:first-child {
  font-weight: bold;
}

.event p:last-child {
  max-height: 100px;
  overflow-y: auto; /* Add scrollbar for overflowing content */
}

/* Utility Classes */
.profile-picture {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-right: 15px;
  float: left;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
  background-color: #1a1a1a;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #333;
  border-radius: 8px;
  width: 80%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  right: 20px;
  top: 10px;
}

.close:hover,
.close:focus {
  color: #fff;
  text-decoration: none;
}

.event {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.event:hover {
  background-color: #2a2a2a;
}

/* Modal content styles */
.modal-event-details {
  color: #fff;
}

.modal-event-details h3 {
  margin-top: 0;
  color: #4da6ff;
}

.modal-event-details .event-field {
  margin-bottom: 15px;
}

.modal-event-details .event-field label {
  font-weight: bold;
  color: #4da6ff;
  display: block;
  margin-bottom: 5px;
}

.modal-event-details .event-field .value {
  background-color: #2a2a2a;
  padding: 10px;
  border-radius: 4px;
  font-family: monospace;
  word-break: break-all;
  white-space: pre-wrap;
}

.modal-event-details .event-field .value.json {
  max-height: 300px;
  overflow-y: auto;
}

.event-type-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 10px;
}

.event-type-badge.lightning-pub {
  background-color: #28a745;
  color: white;
}

.event-type-badge.other {
  background-color: #6c757d;
  color: white;
}

/* Media Queries */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
  
  .logo {
    width: 200px;
  }

  body {
    padding: 0 10px;
  }
  
  h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .logo {
    width: 150px;
    margin-bottom: 10px;
  }
}