* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  background: #ffffff;
  color: #111;
  font-size: 26px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

header {
  background: #111;
  color: white;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header .titel {
  font-size: 32px;
  font-weight: 700;
}

header .stand {
  font-size: 18px;
  opacity: 0.7;
  margin-top: 4px;
}

.filter {
  display: flex;
  gap: 12px;
  padding: 18px 20px;
  background: white;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 9;
}

.filter button {
  flex: 1;
  background: #eee;
  border: none;
  color: #333;
  font-size: 24px;
  font-weight: 700;
  padding: 18px 10px;
  border-radius: 14px;
  cursor: pointer;
  min-height: 64px;
  font-family: inherit;
}

.filter button.active {
  background: #111;
  color: white;
}

main {
  padding: 24px 20px 80px;
  max-width: 800px;
  margin: 0 auto;
}

.tag-titel {
  font-size: 30px;
  font-weight: 700;
  margin: 36px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #111;
}

.tag-titel:first-child {
  margin-top: 0;
}

.tag-titel.heute {
  color: #c00;
  border-color: #c00;
}

.event {
  padding: 22px 0;
  border-bottom: 1px solid #ddd;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 20px;
  align-items: start;
}

.event:last-child {
  border-bottom: none;
}

.event.deutsch {
  background: #FFFBEC;
  border-left: 8px solid #FFCC00;
  padding: 22px 16px;
  margin: 4px -16px;
  border-radius: 4px;
  border-bottom: 1px solid #ddd;
}

.event.deutsch .deutsch-marker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, #000 0%, #000 33%, #DD0000 33%, #DD0000 66%, #FFCE00 66%, #FFCE00 100%);
  color: white;
  font-size: 17px;
  font-weight: 800;
  padding: 6px 14px 6px 8px;
  border-radius: 8px;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  border: 1px solid rgba(0,0,0,0.2);
}

.deutsch-marker .flagge {
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
  text-shadow: none;
}

.markers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.markers .deutsch-marker {
  margin-bottom: 0;
}

.comp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  color: white;
  background: #555;
}

/* Fußball */
.comp-badge.bl       { background: #D2031C; }              /* Bundesliga rot */
.comp-badge.bl2      { background: #1F2937; }              /* 2. BL dunkelgrau */
.comp-badge.dfb      { background: #FFCC00; color: #111; } /* DFB-Pokal gold */
.comp-badge.cl       { background: #0E1E5B; }              /* Champions League navy */
.comp-badge.el       { background: #FF6B00; }              /* Europa League orange */
.comp-badge.ecl      { background: #00B14F; }              /* Conference League grün */
.comp-badge.supercup { background: #757575; }              /* UEFA Super Cup silber */
.comp-badge.em       { background: #003399; }              /* UEFA EM blau */
.comp-badge.wm       { background: #C9A227; }              /* FIFA WM gold */
.comp-badge.klubwm   { background: #C9A227; }
.comp-badge.fussball { background: #1a8a1a; }              /* Fußball generisch grün */

/* Tennis */
.comp-badge.ao       { background: #0085CA; }              /* Australian Open hellblau */
.comp-badge.rg       { background: #B05B36; }              /* French Open Sand */
.comp-badge.wb       { background: #006633; }              /* Wimbledon grün */
.comp-badge.uso      { background: #00337F; }              /* US Open dunkelblau */
.comp-badge.masters  { background: #6A1B9A; }              /* Masters / 1000 lila */
.comp-badge.finals   { background: #111; }                 /* ATP/WTA Finals schwarz */
.comp-badge.davis    { background: #003366; }              /* Davis Cup navy */
.comp-badge.bjk      { background: #E91E63; }              /* Billie Jean King Cup pink */
.comp-badge.laver    { background: #14A076; }              /* Laver Cup */
.comp-badge.tennis   { background: #d97706; }              /* Tennis generisch orange */

.uhrzeit {
  font-size: 40px;
  font-weight: 700;
  color: #111;
  line-height: 1;
}

.info {
  min-width: 0;
}

.begegnung {
  font-size: 28px;
  font-weight: 600;
  color: #111;
  margin-bottom: 6px;
  word-wrap: break-word;
}

.wettbewerb {
  font-size: 20px;
  color: #666;
  margin-bottom: 14px;
}

.sender-zeile {
  font-size: 24px;
  color: #111;
  font-weight: 600;
}

.sender-zeile .frei {
  color: #1a8a1a;
}

.sender-zeile .frei::before {
  content: "● ";
}

.leer {
  text-align: center;
  padding: 80px 20px;
  color: #888;
  font-size: 26px;
}

/* "LÄUFT"-Marker für angefangene Spiele */
.laeuft-marker {
  display: inline-block;
  background: #d50000;
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.event.laeuft {
  border-left: 4px solid #d50000;
  background: #fff8f8;
}

/* Refresh-Button im Header (Senioren-tauglich: gross, klares Label, Icon) */
header {
  gap: 16px;
}

.refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e41e1e;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 14px 22px;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.15s, transform 0.05s;
}

.refresh-btn:active:not(:disabled) {
  transform: scale(0.96);
  background: #b51717;
}

.refresh-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.refresh-icon {
  font-size: 28px;
  display: inline-block;
  line-height: 1;
}

.refresh-icon.spin {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
  .refresh-btn {
    padding: 12px 16px;
    font-size: 18px;
  }
  .refresh-icon {
    font-size: 22px;
  }
}
