@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Inter:wght@400;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-station: #28282d;
  --bg-info: #ffffff;
  /* --bg-info: #4070c5; */
  --txt: #ffffff;
  --txt-info: #28282d;
  --txt-dim: rgba(255,255,255,0.45);
  --error: #d22222;
  --notime: #d22222;
  --separator: rgba(255,255,255,0.1);
  --font-mono: 'DM Mono', 'Courier New', monospace;
  --font-ui: 'Inter', system-ui, sans-serif;
  --footer-height: 92px;
  --tl-green: #6cb33f;
  --tl-yellow: #e0a328;
  --tl-red: #d2484a;
}

html, body {
  height: 100%;
  background: var(--bg-station);
  color: var(--txt);
  font-family: var(--font-ui);
  overflow: hidden;
}

#app {
  display: grid;
  grid-template-columns: 65% 35%;
  height: 100vh;   /* statt 100vh */
}

/* ── LEFT PANEL ── */
#left-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

#station-panel {
  background: var(--bg-station);
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 28px 0;
  overflow: hidden;
}

.station-group {
  display: flex;
  flex: 5;
  min-height: 0;
  border-bottom: 1px solid var(--separator);
}
.station-group:first-child { flex: 8; }
.station-group:last-child { border-bottom: none; }

.station-col {
  flex: 1;
  padding: 18px 48px 18px 48px;
  border-right: 1px solid var(--separator);
  overflow: hidden;
}
.station-col:last-child { border-right: none; }

.station-title {
  font-family: var(--font-ui);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  color: var(--txt);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 1.4em;
}
.station-title:empty::after {
  content: '';
  display: block;
}

.departures {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.departure {
  display: grid;
  grid-template-columns: 44px 1fr 60px;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 500;
  min-height: 26px;
}

.departure.cancelled {
  opacity: 0.45;
  text-decoration: line-through;
}

/* --- Departure icons --- */
[class*="dep-icon-"] {
    color: white;
    width: fit-content;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1.15em;
    padding: 0 0.2em;
    justify-self: center;
}
.dep-icon-suburban,
.dep-icon-subway {
    width: 2.4em;
    border-radius: 0.65em;
}
.dep-icon-bus {
    border-radius: 0.325em;
}
.dep-icon-suburban { background: #008d4f; }
.dep-icon-subway { background: #004F8D; }
.dep-icon-tram { background: #E30613; }
.dep-icon-bus { background: #800080; }
.dep-icon-regional { background: #ff0000; }
.dep-icon-ferry { background: #0080BA; }
.dep-icon-express { background: #fff; color: #aaa; }


.dep-direction {
  color: var(--txt);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dep-direction.error {
  color: var(--txt-dim);
  font-size: 13px;
  font-family: var(--font-ui);
}

.dep-time {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: 'Inter', sans-serif;
  color: var(--txt);
}
.dep-time.unreachable { color: var(--notime); }
.dep-time.empty { color: transparent; }

/* ── RIGHT PANEL ── */
#info-panel {
  background: var(--bg-info);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 46px 24px 32px 40px;
  gap: 0;
  overflow: hidden;
}

#logo-clock {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  margin-bottom: 20px;
  padding-right: 40px;
}

#logo-area {
  /* width: 100%;
  display: flex;
  justify-content: center; */
  margin-bottom: 0px;
}

#logo-image {
  max-height: 90px;
  width: auto;
  object-fit: contain;
}

#clock {
  font-family: 'Inter', sans-serif;
  font-size: 55px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--txt-info);
  text-align: center;
  line-height: 1;
  margin-bottom: 8px;
}
#date-display {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--txt-info);
  text-align: center;
  margin-bottom: 28px;
}

.divider {
  width: 100%;
  height: 1px;
  background: var(--txt-info);
  margin: 16px 0;
}

#events-section {
  width: 100%;
}
#events-label {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--txt-info);
  margin-bottom: 10px;
}

#events-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 16px;
  row-gap: 4px;
  align-items: baseline;
}

.event-row {
  display: contents;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
}
.event-date {
  color: var(--txt-info);
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  padding-top: 1px;
}
.event-desc {
  color: var(--txt-info);
}

#kino-section {
  width: 100%;
  margin-top: 28px;
}

#kino-label {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--txt-info);
  margin-bottom: 10px;
}

.kino-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kino-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kino-date {
  font-size: 14px;
  color: var(--txt-info);
}

.kino-film {
  font-size: 20px;
  font-weight: 600;
  color: var(--txt-info);
}

.kino-info {
  font-size: 14px;
  color: rgba(40, 40, 45, 0.6);
}

.kino-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: none;
  border-radius: 8px;
  margin-top: 8px;
}

#status-bar {
  margin-top: auto;
  width: 100%;
  text-align: center;
  font-size: 15px;
  color: var(--txt-info);
  letter-spacing: 0.05em;
}

.pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50%       { opacity: 1;   transform: scale(1.1); }
}


.fade-update {
  animation: fadeUpdate 0.3s ease;
}
@keyframes fadeUpdate {
  0%   { opacity: 0.4; }
  100% { opacity: 1; }
}

#mensa-footer {
  width: 100%;
  height: auto;
  background: #323237;
  border-top: 2px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 12px 28px;
  font-family: var(--font-ui);
}

#mensa-footer-label {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #e0a328;
  line-height: 1.5;
}

#mensa-footer-list {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  align-items: center;
  gap: 6px 28px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.mensa-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  white-space: nowrap;
  flex-shrink: 0;
}

.mensa-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mensa-dot.green  { background: var(--tl-green); }
.mensa-dot.yellow { background: var(--tl-yellow); }
.mensa-dot.red    { background: var(--tl-red); }
.mensa-dot.none   { background: var(--txt-dim); }

.mensa-name {
  color: var(--txt);
}

.mensa-price {
  font-family: var(--font-mono);
  color: var(--txt-dim);
  font-size: 14px;
}

.mensa-empty {
  color: var(--txt-dim);
  font-size: 15px;
}

.warning-text {
  margin-top: 8px;
  padding: 4px 8px;
  font-size: 20px;
  color: #ffcc00;
  border-left: 3px solid #ffcc00;
  opacity: 0.9;
}

/* ── MOBILE ── */
@media (max-width: 768px) {

  html, body {
    overflow: auto;
  }

  #app {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
  }

  #left-panel {
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  /* Station panel: nimmt nur so viel Platz wie nötig */
  #station-panel {
    padding: 16px 0;
    overflow: visible;
  }

  /* Alle Stationsgruppen gleich hoch, nicht mehr flex-gewichtet */
  .station-group {
    flex: none;
  }
  .station-group:first-child {
    flex: none;
  }

  /* Spalten etwas enger */
  .station-col {
    padding: 12px 16px;
  }

  .station-title {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .departure {
    font-size: 15px;
    grid-template-columns: 40px 1fr 55px;
    gap: 6px;
    min-height: 22px;
  }

  .dep-icon {
    height: 17px;
    width: 40px;
  }

  .departures {
    gap: 4px;
  }

  /* Info panel: scrollbar unten */
  #info-panel {
    overflow: auto;
    padding: 24px 20px;
    align-items: flex-start;
  }

  #logo-area {
    margin-bottom: 12px;
  }

  #logo-image {
    max-height: 80px;
  }

  #clock {
    font-size: 40px;
    margin-bottom: 4px;
  }

  #date-display {
    margin-bottom: 16px;
  }

  #events-label {
    font-size: 18px;
  }

  .event-date, .event-desc {
    font-size: 15px;
  }

  #events-list {
    column-gap: 12px;
    row-gap: 3px;
  }

  #status-bar {
    margin-top: 16px;
    font-size: 12px;
  }

  #mensa-footer {
    height: auto;
    min-height: var(--footer-height);
    flex-wrap: wrap;
    gap: 12px 20px;
    padding: 12px 16px;
  }

  #mensa-footer-list {
    flex-wrap: wrap;
    gap: 8px 20px;
    overflow: visible;
    max-height: none;
  }

  .mensa-item {
    font-size: 14px;
  }
}
