/* Allgemeine Stile */
body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #ffffff; /* Standard Light Mode */
  color: #1e1e1e;
  padding-left: 15px;
  padding-right: 15px;
}

.about-text {
  width: 100%;
  max-width: 700px;   /* = wie table */
  margin: 0 auto;
}

#calendar-feedback {
  display: block;
  margin-top: 0.3em;
  color: gray;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.calendar-invite {
  text-align: center;
  margin: 1.5em 0;
  font-size: 0.95rem;
}

.live-indikator {
  display: none;
  margin-top: 1.1rem;
  margin-bottom: 2em;
}

.live-indikator--visible {
  display: block;
}

.live-embed {
  display: none;
  width: min(980px, calc(100vw - 30px));
  margin: 0 0 1.25rem 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
  background: #000;
}

.live-embed--visible {
  display: block;
}

.live-embed__frame {
  width: min(980px, calc(100vw - 30px));
  min-height: 420px;
  aspect-ratio: 16 / 9;
  display: block;
  border: 0;
}

@media (max-width: 900px) {
  .live-embed__frame {
    min-height: 240px;
  }
}

.streamplan-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.streamplan-entry__info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.streamplan-entry__status {
  font-size: 1.1rem;
}

.streamplan-entry__title {
  color: inherit;
}

.streamplan-entry__title--cancelled {
  text-decoration: line-through;
  color: #888;
}

.streamplan-entry__link {
  color: inherit;
  text-decoration: none;
  font-weight: inherit;
}

.streamplan-entry__link:hover {
  text-decoration: underline;
}

.streamplan-entry__live-icon {
  margin-left: auto;
  font-size: 1.2em;
}

.table-subhead {
  font-weight: 600;
}

.col-50 {
  width: 50%;
}

.active-games__category {
  font-style: normal;
}

.accordion-content--open {
  display: block;
}

/* Basis: zu */
.accordion-content { display: none; }

/* auf, wenn JS die Klasse setzt */
.accordion-content.accordion-content--open { display: block; }

/* optional nett: Handcursor auf dem Header */
.accordion-header { cursor: pointer; user-select: none; }

.abgesagt {
  text-decoration: line-through;
  opacity: 0.5;
}

.live-button {
  background-color: #e60000;
  color: white;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  font-size: 1em;
  animation: pulse 1.5s infinite ease-in-out;
  box-shadow: 0 0 0 rgba(255, 77, 77, 0.7);
}

.live-button:hover {
  text-decoration: none !important;
  color: #fff;
}

.live-indikator .live-button,
.live-indikator .live-button:hover,
.live-indikator .live-button:focus,
.live-indikator .live-button:active,
.live-indikator .live-button:visited {
  text-decoration: none !important;
}

.today {
  font-weight: bold;
}

.past {
  color: #d6d6d6; /* oder #aaa, je nach gewünschtem Grauton */
}

/* Logo */
.logo {
  width: 150px; /* Größe des Logos */
  filter: invert(1); /* Standard: Weiß bleibt weiß */
  transition: filter 0.3s ease;
}

/* Header */
header {
  text-align: center;
  margin: 20px;
}

header h1 {
  font-size: 2.5em;
  margin: 10px 0;
}

header p {
  font-size: 1.2em;
}

/* Tabelle */
main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

table {
  border-collapse: collapse;
  margin: 20px 0;
  width: 100%;
  max-width: 700px;
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

thead {
  background-color: #5C16C5;
}

thead th {
  color: #fff;
  padding: 10px;
  text-align: left;
}

tbody tr {
  border-bottom: 1px solid #ddd;
}

tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

tbody td {
  padding: 10px;
}

/* Links */
a {
  color: #5C16C5;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  margin-top: 20px;
  text-align: center;
}

.accordion {
  width: 100%;
  max-width: 700px;
  margin: 20px auto;
  border: 1px solid #ccc;
  border-radius: 10px;
  overflow: hidden;
  background-color: #fff;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

.accordion-header {
  background-color: #5C16C5;
  color: white;
  padding: 15px;
  cursor: pointer;
  font-weight: bold;
  text-align: left;
  border: none;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

.accordion-header:hover {
  background-color: #4a0f9d;
}

.accordion-content {
  background-color: #fff;
  color: #333;
  display: none;
  padding: 15px;
  border-top: 1px solid #ccc;
}

.accordion-content ul {
  list-style-type: disc;
  margin-left: 20px;
}

.accordion-content .finished-game--linked a {
  display: block;
  cursor: pointer;
  font-weight: 600;
}

.finished-games {
  width: 100%;
  max-width: 700px;
  margin: 20px 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background-color: #fff;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  text-align: left;
  overflow: hidden;
}

.finished-games__title {
  margin: 0;
  padding: 10px;
  color: #fff;
  background-color: #5C16C5;
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
}

.finished-games__list {
  margin: 0;
  padding: 14px 24px 10px 48px;
  list-style: disc;
}

.finished-games__list li {
  display: list-item;
  margin: 0 0 0.35rem;
  padding: 8px 10px;
  line-height: 1.45;
}

.finished-games__list .finished-game--linked a {
  display: inline;
  cursor: pointer;
  font-weight: 600;
}

.finished-game-title,
.finished-games__list .finished-game--linked a {
  align-items: center;
}

.completion-icon {
  display: inline-block;
  width: 28px;
  height: 28px;
  margin-left: 0.5rem;
  object-fit: contain;
  vertical-align: -0.42rem;
}

.finished-games__more {
  display: block;
  margin: 16px auto;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 8px;
  background: #5C16C5;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.finished-games__more[hidden] {
  display: none;
}

.finished-games__more:hover {
  background: #4a0f9d;
}

.played-game-badge {
  float: right;
  margin-left: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.played-game-badge--aktiv {
  color: #92400e;
  background: #fef3c7;
}

.played-game-badge--abgeschlossen {
  color: #155e2f;
  background: #dcfce7;
}

.played-game-badge--angespielt {
  color: #4b2bbd;
  background: #f3effd;
}

.played-game-badge--abgebrochen {
  color: #9f1239;
  background: #ffe4e6;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #1e1e2e;
    color: #f4f4f4;
  }

  .past {
    color: #828282; /* oder #aaa, je nach gewünschtem Grauton */
  }

  header h1,
  header p,
  footer p {
    color: #f4f4f4;
  }

  table {
    background-color: #2e2e3e;
  }

  thead {
    background-color: #5C16C5;
  }

  tbody tr {
    border-bottom: 1px solid #555;
  }

  tbody tr:nth-child(even) {
    background-color: #3e3e4e;
  }

  a {
    color: #5C16C5;
  }

  .logo {
    filter: invert(0) brightness(2);
  }

  .accordion {
    border: 1px solid #444;
    background-color: #2e2e3e;
    color: #f4f4f4;
  }

  .accordion-header {
    background-color: #4a0f9d;
    color: #fff;
  }

  .accordion-header:hover {
    background-color: #5C16C5;
  }

  .accordion-content {
    background-color: #3e3e4e;
    color: #f4f4f4;
  }

  .accordion-content ul li {
    color: #f4f4f4;
  }

  .finished-games {
    background-color: #2e2e3e;
    color: #f4f4f4;
  }

  .finished-games__title {
    background-color: #4a0f9d;
  }

  .finished-games__more {
    background: #4a0f9d;
  }

  .finished-games__more:hover {
    background: #5C16C5;
  }

  #calendar-feedback {
    color: #bcbcbc;
  }

  .streamplan-entry__title--cancelled {
    color: #b0b0b0;
  }
}

/* Responsive */
@media (max-width: 600px) {
  table,
  .accordion,
  .accordion2 {
    width: 90%;
    max-width: 600px;
  }
}

/* Pulsierender LIVE-Effekt */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.7);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(255, 77, 77, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 77, 77, 0);
  }
}
