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

/* --- ALLGEMEINE STYLES --- */
body {
	margin: 0;
	padding: 0;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.main-footer {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	background-color: #101930;
	color: #8da4d6;
	padding: 8px 0;
	text-align: center;
	font-size: 0.9rem;
	border-top: 1px solid #444;
	z-index: 2000;
	display: flex;
	justify-content: center;
	gap: 30px;
	align-items: center;
}

.main-footer a {
	color: #fff;
	text-decoration: none;
	font-weight: bold;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.main-footer a:hover {
	color: #ff9800;
	text-decoration: underline;
}

.version-tag {
	color: #555;
	font-size: 0.8rem;
}

.debug-container {
	background: #222;
	color: #0f0;
	padding: 20px;
	font-family: monospace;
	font-size: 0.8rem;
	margin-bottom: 50px;
	border-top: 2px solid #f00;
	z-index: 900;
	position: relative;
}

.test-console {
	background: #333;
	padding: 15px;
	margin-bottom: 15px;
	border: 2px solid #ff9800;
	color: #fff;
}

.test-console select, .test-console button {
	padding: 8px;
	margin: 5px;
	cursor: pointer;
	border-radius: 4px;
}

.test-console button {
	background: #ff9800;
	color: #000;
	font-weight: bold;
	border: none;
}

.removal-entry {
	border-bottom: 1px solid #333;
	padding: 2px 0;
	color: #ff5555;
}

.legend-box {
	border: 1px solid #555;
	padding: 10px;
	margin-bottom: 10px;
	background: #111;
	color: #ccc;
}

/* --- SELECTION UI CSS (Schritt 1-3) --- */
body.mode-selection {
	background-color: #333333;
	color: #f0f0f0;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding-top: 50px;
	padding-bottom: 60px;
}

.card {
	background-color: #444444;
	padding: 30px;
	border-radius: 8px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
	width: 100%;
	max-width: 550px;
}

h2 {
	color: #ff9800;
	margin-top: 0;
	text-align: center;
	font-size: 1.8rem;
	margin-bottom: 5px;
}

.subtitle {
	text-align: center;
	color: #aaa;
	font-size: 1rem;
	margin-bottom: 25px;
}

.station-header {
	text-align: center;
	font-size: 1.4rem;
	font-weight: bold;
	color: #fff;
	margin-bottom: 20px;
}

.server-list {
	background: #222222;
	border: 1px solid #111;
	border-radius: 5px;
	max-height: 350px;
	overflow-y: auto;
	margin-bottom: 20px;
	padding: 0;
	list-style: none;
}

.server-item {
	border-bottom: 1px solid #3d3d3d;
	padding: 12px 15px;
	display: flex;
	align-items: center;
	cursor: pointer;
	transition: background 0.2s;
}

.server-item:hover {
	background: #333;
}

.server-item:last-child {
	border-bottom: none;
}

.server-item input[type="radio"] {
	margin-right: 15px;
	transform: scale(1.2);
	cursor: pointer;
}

.status-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	display: inline-block;
	margin-right: 10px;
}

.status-online {
	background-color: #4CAF50;
	box-shadow: 0 0 5px #4CAF50;
}

.status-offline {
	background-color: #F44336;
	box-shadow: 0 0 5px #F44336;
}

.server-name {
	font-size: 1.1rem;
	color: #eee;
}

label {
	display: block;
	text-align: left;
	color: #ccc;
	margin-bottom: 8px;
	font-size: 1rem;
}

select.station-select {
	width: 100%;
	padding: 10px;
	background: #222222;
	color: #fff;
	border: 1px solid #111;
	border-radius: 5px;
	font-size: 1rem;
	margin-bottom: 20px;
	overflow-y: auto;
}

select.station-select option {
	padding: 8px;
}

.btn-green {
	width: 100%;
	background-color: #4CAF50;
	color: white;
	border: none;
	padding: 15px;
	font-size: 1.1rem;
	border-radius: 5px;
	cursor: pointer;
	font-weight: bold;
	transition: background 0.3s;
	margin-bottom: 15px;
}

.btn-green:hover {
	background-color: #45a049;
}

.link-back {
	display: block;
	text-align: center;
	color: #888;
	text-decoration: none;
	font-size: 0.9rem;
}

.link-back:hover {
	color: #ccc;
	text-decoration: underline;
}

.sort-cards {
	display: flex;
	gap: 15px;
	margin-bottom: 20px;
}

.sort-card {
	flex: 1;
	background: #555;
	border: 1px solid #666;
	border-radius: 8px;
	padding: 25px 10px;
	text-align: center;
	cursor: pointer;
	text-decoration: none;
	color: white;
	transition: all 0.2s;
}

.sort-card:hover {
	background: #666;
	border-color: #888;
	transform: translateY(-2px);
}

.sort-icon {
	font-size: 2.5rem;
	margin-bottom: 10px;
	display: block;
}

.sort-title {
	font-size: 1.2rem;
	font-weight: bold;
	margin-bottom: 5px;
}

.sort-sub {
	font-size: 0.8rem;
	color: #bbb;
}

#loadingOverlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.85);
	z-index: 9999;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	color: white;
}

.spinner {
	border: 8px solid #f3f3f3;
	border-top: 8px solid #ff9800;
	border-radius: 50%;
	width: 60px;
	height: 60px;
	animation: spin 1s linear infinite;
	margin-bottom: 20px;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/* --- BOARD MODE CSS --- */
body.mode-board {
	background-color: #000;
	color: #fff;
	font-family: 'Roboto', sans-serif;
	overflow-x: hidden;
	min-height: 100vh;
}

.board-container {
	background-color: #1a2d59;
	min-height: 100vh;
	width: 100%;
	display: flex;
	flex-direction: column;
	padding-bottom: 40px;
}

.header {
	background-color: #f0f0f0;
	color: #1a2d59;
	padding: 0.5vh 2vw;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 0.4vh solid #142040;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
	flex-shrink: 0;
}

.header-title {
	font-size: 3.5vh;
	font-weight: bold;
	letter-spacing: 1px;
	color: #1a2d59;
}

.header-sub {
	font-size: 3vh;
	font-style: italic;
	margin-left: 20px;
	color: #1a2d59;
	font-weight: 300;
}

.clock {
	font-size: 4vh;
	font-weight: bold;
	font-family: 'Segoe UI', sans-serif;
	color: #1a2d59;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 0;
	table-layout: fixed;
	flex-grow: 1;
}

th {
	text-align: left;
	color: #aab5d1;
	padding: 0.5vh 1vw;
	font-size: 1.5vh;
	font-weight: normal;
	border-bottom: 0.2vh solid #101930;
}

td {
	padding: 0 1vw;
	border-bottom: 0.1vh solid #101930;
	vertical-align: middle;
	height: 6vh;
	overflow: hidden;
	white-space: nowrap;
}

tr {
	border-bottom: 0.2vh solid #101930;
	background: linear-gradient(to bottom, #203565 0%, #1a2d59 100%);
}

.col-time {
	width: 14%;
	font-size: 3.5vh;
	font-weight: bold;
	line-height: 1;
}

.col-train {
	width: 14%;
	font-size: 2.6vh;
	font-weight: bold;
	color: #fff;
}

.col-via {
	width: 20%;
	font-size: 2vh;
	color: #ddd;
	font-weight: normal;
	overflow: hidden;
	text-overflow: ellipsis;
}

.col-dest {
	width: 24%;
	font-size: 3.5vh;
	font-weight: bold;
	color: #fff;
	overflow: hidden;
	text-overflow: ellipsis;
}

.col-info {
	width: 16%;
	padding: 0 1vw;
	vertical-align: middle;
}

.col-track {
	width: 6%;
	text-align: right;
	color: #fff;
	font-size: 4vh;
	font-weight: bold;
}

.col-plat {
	width: 6%;
	text-align: center;
	color: #aaa;
	font-size: 2vh;
	font-weight: normal;
}

.delay-box-time {
	display: inline-block;
	background-color: #fff;
	color: #1a2d59;
	font-size: 2.8vh;
	font-weight: bold;
	padding: 0 0.4vw;
	margin-left: 0.5vw;
	line-height: 1.1;
	vertical-align: top;
	position: relative;
	top: 0.2vh;
}

.ticker-container {
	background-color: #fff;
	color: #1a2d59;
	width: 100%;
	height: 4vh;
	display: flex;
	align-items: center;
	overflow: hidden;
	white-space: nowrap;
	font-weight: bold;
	font-size: 2.2vh;
	border-radius: 2px;
}

.ticker-text {
	display: inline-block;
	padding-left: 100%;
	animation: marquee 12s linear infinite;
}

@keyframes marquee {
	0% {
		transform: translate(0, 0);
	}
	100% {
		transform: translate(-100%, 0);
	}
}

.passthrough-info {
	color: #ff9800;
	font-size: 2.5vh;
	font-weight: bold;
	text-transform: uppercase;
	letter-spacing: 1px;
}

/* FIX FÜR DAS MENÜ (In einer Zeile) */
.settings-overlay {
	position: fixed;
	top: 0;
	right: 0;
	background: rgba(0, 0, 0, 0.8);
	color: #fff;
	padding: 5px 15px;
	font-size: 1.5vh;
	z-index: 999;
	opacity: 0.2;
	transition: opacity 0.3s;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 15px;
	white-space: nowrap;
}

.settings-overlay:hover {
	opacity: 1;
}

.settings-overlay label {
    display: flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
}

.settings-overlay input[type="checkbox"] {
    margin-right: 5px;
}

.settings-overlay a {
	color: #fff;
	text-decoration: none;
	font-weight: bold;
}

.hidden {
	display: none;
}