:root {
  
  /* Weitere Farben */
  --color-primary: #667eea;
  --color-secondary: #764ba2;
  --color-text: #2c3e50;
  --color-text-light: #666;
  --color-background: rgba(255, 255, 255, 0.95);
  --color-border: #ddd;
  --color-shadow: rgba(0, 0, 0, 0.1);
}

/* Bestehender Code */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  min-height: 100vh;
  color: #333;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 30px;
  background: var(--color-background);
  padding: 15px;
  border-radius: 15px;
  box-shadow: 0 8px 32px var(--color-shadow);
  backdrop-filter: blur(10px);
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--color-text);
}

.calender-day-header {
  font-weight: bold;
  text-align: center;
  padding: 10px;
  background: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.filters {
  display: flex;
  gap: 20px;
  justify-content: flex-start;
}

.filters select,
.filters input {
  padding: 12px 20px;
  border: 2px solid var(--color-border);
  border-radius: 25px;
  font-size: 16px;
  outline: none;
  transition: all 0.3s ease;
}

.filters select:focus,
.filters input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  min-width: 300px;
  padding: 10px;
  border-radius: 15px;
  background: var(--color-background);
  box-shadow: 0 8px 32px var(--color-shadow);
}

.calendar-header h2 {
  font-size: 1.4rem;
  color: var(--color-text);
}

.calendar-header button {
  background: var(--color-primary);
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.3s ease;
}

.calendar-header button:hover {
  background: #5a6fd8;
  transform: scale(1.1);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  background: var(--color-background);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 8px 32px var(--color-shadow);
  margin-bottom: 30px;
}

.calendar-day {
  aspect-ratio: 1;
  border: 1px solid #eee;
  padding: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  min-height: 80px;
}

.calendar-day:hover {
  background: #f8f9ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--color-shadow);
}

.calendar-day.other-month {
  color: #ccc;
  background: #f9f9f9;
}

.calendar-day.today {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
  font-weight: bold;
}

.day-number {
  font-weight: bold;
  margin-bottom: 4px;
}

/* Event-Indicator: Standardfarbe, wenn kein Tag matcht */
.event-indicator {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  margin: 1px;
  display: inline-block;
  background: var(--color-tag-default); /* Neutrale Farbe für Events ohne passende Tags */
}


.events-list {
  background: var(--color-background);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 8px 32px var(--color-shadow);
}

.events-list h3 {
  margin-bottom: 20px;
  color: var(--color-text);
  font-size: 1.5rem;
}

#eventsList {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  align-items: start;
}

/* Event-Item: Standard-Border, wenn kein Tag matcht */
.event-item {
  background: white;
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid var(--color-tag-default); /* Neutrale Farbe für Events ohne passende Tags */
  box-shadow: 0 2px 8px var(--color-shadow);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: fit-content;
}

.event-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Event-Item Border-Farben nach Tags */
.event-item.tag_wichtig {
  border-left-color: var(--color-tag-wichtig);
}
.event-item.tag_hauptkampf {
  border-left-color: var(--color-tag-hauptkampf);
}
.event-item.tag_titelkampf {
  border-left-color: var(--color-tag-titelkampf);
}
.event-item.tag_featured {
  border-left-color: var(--color-tag-featured);
}
.event-item.tag_mma {
  border-left-color: var(--color-tag-mma);
}


.event-title {
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--color-text);
}

.event-details-stacked {
  display: flex;
  flex-direction: column;
  font-size: 0.95rem;
  color: #444;
  gap: 5px;
}

.time-location-row, .promotion-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tag-row { /* Geändert von .category-row zu .tag-row */
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.scroll-btn {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
  border: none;
  border-radius: 25px;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.scroll-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #5a6fd8, #6a4c93);
}

.scroll-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.more-details-link a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.more-details-link a:hover {
  color: #5a6fd8;
  text-decoration: underline;
}

/* Event-Badge: Standardfarbe für Tags */
.event-badge {
  background: var(--color-tag-default-light); /* Hellere neutrale Farbe */
  color: #666;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
  white-space: nowrap;
}

/* Event-Badge Farben nach Tags (falls gewünscht, hier aber generell neutral) */
/* .event-badge.tag_wichtig {
  background: var(--color-tag-wichtig-light);
  color: var(--color-tag-wichtig);
} */

footer {
  display: flex;
  justify-content: space-evenly;
  width: 100%;
  position: fixed;
  bottom: 0;
  left: 0;
  color: white;
  font-size: 0.7rem;
  background-color: var(--color-text);
  text-align: center;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

footer a {
  color: #ecf0f1;
  text-decoration: none;
  transition: color 0.2s ease;
}

#footerlogo {
  width: 15px;
  height: auto;
}


/* 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.5);
  backdrop-filter: blur(5px);
  overflow-y: auto;
}

.modal-content {
  display: flex; /* Bleibt bei column für den Titel und den Grid-Container */
  flex-direction: column;
  background-color: white;
  margin: 5% auto;
  padding: 30px;
  border-radius: 15px;
  max-width: 900px; /* Optional: Eine maximale Breite, damit es nicht zu riesig wird */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  position: relative;
  min-height: 200px;
}

.events-grid { /* DAS IST DIE KLASSE AUS DEINEM JS */
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Für immer 2 Spalten, die sich den Platz teilen */
  gap: 20px; /* Einheitlicher Abstand */
  margin: 15px 0; /* Passt zum ursprünglichen Inline-Stil */
  /* align-items und justify-items sind optional, falls du die Items selbst im Grid ausrichten willst */
}

/* Optional: Wenn nur 1 Element da ist, nimm die volle Breite (bei repeat(auto-fit) nicht nötig) */
.events-grid:has(> .event-item:only-child) {
  grid-template-columns: 1fr; /* Eine Spalte, wenn nur ein Kind vorhanden */
}
/* Der `:has()` Selektor ist noch nicht in allen Browsern vollständig unterstützt,
   daher wäre eine Medial Query oder JavaScript hier robuster, falls du 100% nur eine Spalte willst. */


/* Die einzelnen Event-Elemente IM Modal */
.events-grid .event-item { /* Spezifischer Selektor für Items innerhalb dieses Grids */
  background-color: #f8f8f8; /* Etwas anderer Hintergrund für Modal-Items */
  padding: 15px;
  border-radius: 8px;
  text-align: left; /* Oder center, je nachdem */
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-left: 5px solid var(--color-primary); /* Beispiel-Border */
  display: flex; /* Flexbox innerhalb des Grid-Items, um Inhalt zu stapeln */
  flex-direction: column;
  gap: 8px;
}

/* Anpassung der Border-Farbe für die Events im Modal, basierend auf Tags */
.events-grid .event-item.tag_ufc {
  border-left-color: var(--color-tag-ufc); /* Beispiel: Farbe für UFC Tag */
}
/* ... weitere tag_ Klassen hier für das Grid-Item */

/* Medien-Query für kleinere Bildschirme im Modal */
@media (max-width: 768px) {
  .events-grid {
    grid-template-columns: 1fr; /* Nur eine Spalte auf kleineren Bildschirmen */
  }
}

.close {
  position: absolute;
  right: 20px;
  top: 15px;
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #333;
}

.past-event {
  opacity: 0.8;
}

.past-event .event-title {
  color: #555;
}

.past-event-label {
  background: #e0e0e0;
  color: #777;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
  white-space: nowrap;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.calendar-day:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Responsivität */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  header h1 {
    font-size: 1.8rem;
  }

  .filters {
    flex-direction: column;
    align-items: center;
  }

  .filters select,
  .filters input {
    width: 100%;
    max-width: 300px;
  }

  .calendar-grid {
    padding: 10px;
  }

  .calendar-day {
    min-height: 60px;
    padding: 4px;
  }

  #eventsList {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .tag-row { /* Geändert von .category-row zu .tag-row */
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
}

@media (min-width: 1400px) {
  #eventsList {
    grid-template-columns: repeat(3, 1fr);
  }
}