:root {
    --sbb-red:    #eb0000;
    --sbb-blue:   #2d327d;
	--sbb-orange: #E84E10;
    --sob-green:  #7BA55B;
    --sob-blue:   #1A527F;
    --board-bg:   #0a1a4a;
    --board-row:  #0d2060;
    --board-alt:  #0a1a4a;
    --board-head: #0d2060;
    --text-main:  #ffffff;
    --text-via:   #a0b8d8;
    --text-dim:   #6080a0;
    --night-gold: #d4af37;
    --border:     rgba(200,200,200,0.09);
    --header-bg:  #061030;
    --pifas-bg:   #ED702D;
    --pifas-searchbar: #d7d7d7;
    --pifas-timenav: #eef;
    --live-red:   #ff3b30;
	--plat-change:#fcbb00;
}

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

html {
	scroll-behavior: smooth;
	scrollbar-gutter: stable;
	line-height: 1.5rem;
}

body {
    font-family: "SBB Web", "Helvetica Neue", Arial, sans-serif;
    background: var(--board-bg);
    color: var(--text-main);
    min-height: 100vh;
}


.content { 
	background: var(--board-row); 
	border: 0.5px solid rgba(255,255,255,0.1); 
	border-radius: 8px; 
	padding: 1.5rem; 
	margin-bottom: 1.5rem; 
}

.summary, .card { 
	background: var(--board-alt); 
	border: 0.5px solid rgba(255,255,255,0.1); 
	border-radius: 8px; 
	padding: 1.5rem; 
	margin-bottom: 1.5rem;
	position: inside;
}

.summary a {
	text-decoration: none;
	color: var(--sbb-red);
}

a {
	text-decoration: none;
}

a.int{
	color: var(--night-gold);
}
a.oeva{
	color: var(--sbb-red);
}
a.ext{
	color: var(--sob-green);
}

.summary-title {
	font-size: 18px;
}
.summary-subtitle {
	font-size: 16px;
	margin-left: 10px;
}

.summary-hide details summary::-webkit-details-marker {
	display: none;
}

.summary, .card li, ol {
	list-style-position: inside;
}

table, th, td {
  border: 2px solid var(--border);
  background: --var(--board-row);
  border-collapse: collapse;
  text-align: left;
}

.container { max-width: 680px; margin: 0 auto; padding: 2rem 1rem; }
		
#app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: var(--header-bg);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    top: 0;
    z-index: 20;
    gap: 10px;
    flex-wrap: wrap;
}

#header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

#btn-home {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 5px 10px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 1.1em;
    line-height: 1;
    transition: background 0.15s;
}
#btn-home:hover { background: rgba(255,255,255,0.22); }

#app-title {
    color: white;
    font-size: 1.05em;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

#header-center {
    flex: 1;
    text-align: center;
}
#live-clock {
    font-family: monospace;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 1px;
    color: var(--text-main);
}

#header-right {
    display: flex;
    gap: 7px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Textfärbung (Leuchtstift) */
.important {
	background-color: var(--plat-change);
	color: white;
	font-weight: bold;
	letter-spacing: 3px;
}

.box {
	border-radius: 10px;
	border: 2px solid var(--plat-change);
	background: var(--board-alt);
	padding: 10px;
}

/* Das Bild im Normalzustand (kleine Vorschau) */
.clickable-preview {
  width: 250px;
  height: auto;
  cursor: pointer;
  transition: transform 0.5s ease;
  border-radius: 4px;
}

/* Zustand, wenn das Bild angeklickt wird (groÃŸe Ansicht) */
.clickable-preview:focus {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.5); /* VergrÃ¶ÃŸerungsfaktor */
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  z-index: 9999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  outline: none;
}

/* Der unscharfe Hintergrund, wenn das Bild aktiv ist */
.clickable-preview:focus::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.2); /* Leicht helle Abdunklung, alternativ (0,0,0,0.4) fÃ¼r dunkel */
  backdrop-filter: blur(80px); /* Erzeugt den UnschÃ¤rfe-Effekt */
  -webkit-backdrop-filter: blur(8px); /* Safari-UnterstÃ¼tzung */
  z-index: -1; /* Schiebt den Hintergrund hinter das vergrÃ¶ÃŸerte Bild */
  
  /* Setzt den Ursprung zurÃ¼ck, damit das Overlay die ganze Seite fÃ¼llt */
  transform: translate(calc(-50vw - 50%), calc(-50vh - 50%)) scale(1);
}

.page-footer {
	text-decoration: none;
	padding: 8px 14px;
	margin-top: auto;
	border-top: 1px solid var(--border);
	background: var(--header-bg);
}

.page-footer a, a:hover, a:visited, a:active {
	text-decoration: none;
 }
 
#topButton {
  position: fixed;
  bottom: 10px;
  right: 10px;
  z-index: 99;
  font-size: 15px;
  border: none;
  outline: none;
  background-color: var(--plat-change);
  color: black;
  cursor: pointer;
  padding: 15px;
  border-radius: 4px;
}



/* Für die Gemini-Slideshow */

/* Behälter für die Handy-Screenshots */
.slideshow-container {
  max-width: 400px; /* Perfekte Breite für hochkantige iPhone-Screenshots auf Desktop */
  width: 100%;      /* Nutzt auf dem Smartphone die volle Breite */
  position: relative;
  margin: 20px auto; 
  background-color: #1a1a1a; /* Dunkler Hintergrund lässt Screenshots gut wirken */
  border-radius: 12px;       /* Abgerundete Ecken im Smartphone-Stil */
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  overflow: hidden;
}

/* Versteckt die Slides standardmäßig */
.slide {
  display: none;
  width: 100%;
}

/* Das eigentliche Screenshot-Bild */
.slide img {
  width: 100%;
  max-height: 70vh;    /* Verhindert, dass das Bild zu hoch wird und man scrollen muss */
  object-fit: contain; /* Behält die Proportionen des iPhones absolut unverzerrt bei */
  display: block;
  margin: 0 auto;
}

/* Bildunterschrift */
.caption {
  background-color: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 15px;
  line-height: 1.4;
  padding: 15px;
  text-align: center;
  width: 100%;
  border-top: 1px solid #333;
}

/* Pfeile zum Klicken */
.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  background-color: rgba(0,0,0,0.3);
  user-select: none;
  transition: 0.3s ease;
  z-index: 10;
}

.next { right: 0; border-radius: 3px 0 0 3px; }
.prev { left: 0; border-radius: 0 3px 3px 0; }

.prev:hover, .next:hover {
  background-color: rgba(0,0,0,0.8);
}

/* Animation beim Wechseln */
.fade {
  animation: fadeEffect 0.8s;
}

@keyframes fadeEffect {
  from { opacity: 0.4; } 
  to { opacity: 1; }
}

.map-tooltip {
  position: fixed;
  z-index: 9999;
  background-color: #1e1e2e;
  color: #f0f0f5;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-family: system-ui, sans-serif;
  line-height: 1.4;
  max-width: 220px;
  pointer-events: none;
  white-space: normal;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.map-tooltip.visible {
  opacity: 1;
}