html,
body {
	margin: 0;
	padding: 0;
	overflow: hidden;
	height: 100%;
	width: 100%;
}

/* ---- Install toast dark-mode fix -------------------------------------- */
/* Default (light) theming via Bootstrap toast CSS variables */
#installToast.toast {
	--bs-toast-bg: var(--bs-body-bg);
	--bs-toast-color: var(--bs-body-color);
	--bs-toast-border-color: rgba(0, 0, 0, .1);
	--bs-toast-box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
}

/* Scoped dark theme when data-bs-theme="dark" is set on the toast */
#installToast.toast[data-bs-theme="dark"] {
	--bs-toast-bg: var(--bs-dark);
	--bs-toast-color: var(--bs-light);
	--bs-toast-border-color: rgba(255, 255, 255, .15);
	--bs-toast-box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .6);
}

/* Ensure inner text inherits correctly */
#installToast .toast-body,
#installToast .toast-header {
	color: var(--bs-toast-color);
}

/* feste Breite für Install-/Cancel-Buttons im Install-Toast */
#installToast .btn-group .btn {
	width: 100px;
	/* fixe Breite */
	white-space: nowrap;
	/* keine Zeilenumbrüche */
	overflow: hidden;
	/* nichts springt um */
	text-overflow: ellipsis;
	/* … falls Text zu lang ist */
}

.navbar-toggler {
	background-color: var(--bs-green);
	opacity: 0.75;
}

#orientation-container {
	width: 100vw;
	height: 100vh;
	display: flex;
}

button {
	padding: 0.5rem 1rem;
	margin-top: 1rem;
}

.player-select {
	margin: 1rem 0;
}

.player-select button {
	margin-right: 1rem;
	padding: 0.5rem 1.2rem;
	font-size: 1rem;
}

.start-overlay-button {
	position: absolute;
	left: 50%;
	top: 46%;
	transform: translate(-50%, -50%);
	padding: 1rem 2rem;
	font-size: 1.2rem;
	font-weight: bold;
	background-color: green;
	color: white;
	border: none;
	border-radius: 8px;
	z-index: 3;
	cursor: pointer;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.start-overlay-button:disabled {
	background-color: #999;
	cursor: not-allowed;
	box-shadow: none;
	opacity: 0.6;
}

.board-container {
	position: relative;
	max-width: 500px;
	margin: auto;
}

.board-image {
	width: 100%;
	display: block;
}

.figure {
	position: absolute;
	width: 7%;
	height: auto;
	z-index: 2;
	transition: left 0.4s linear, top 0.4s linear;
}

.color-select {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	flex-wrap: nowrap;
	overflow-x: auto;
	padding: 0.5rem 0;
	margin-top: 0.5rem;
}

.color-select button {
	flex: 0 0 auto;
	width: 110px;
	max-width: 110px;
	text-align: center;
	padding: 0.4rem 0.8rem;
	font-weight: bold;
	border: 2px solid transparent;
	border-radius: 6px;
	cursor: pointer;
	text-transform: capitalize;
	color: white;
	margin-top: 0;
}

.color-select button.selected {
	border-color: black;
	box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

/* Farbhintergründe */
.color-select .red {
	background-color: #e74c3c;
}

.color-select .blue {
	background-color: #3498db;
}

.color-select .yellow {
	background-color: #f1c40f;
	color: #333;
}

.color-select .green {
	background-color: #2ecc71;
}

/* 2x2-Layout für die Farbauswahl */
#color-selection .color-select {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .5rem .75rem;
	/* vertikal / horizontaler Abstand */
}

#color-selection .color-select>button {
	flex: 0 1 calc(50% - .75rem);
	/* zwei Spalten -> mit 4 Buttons automatisch 2 Zeilen */
}

/* Sehr kleine Screens -> Buttons volle Breite untereinander */
@media (max-width: 380px) {
	#color-selection .color-select>button {
		flex-basis: 100%;
	}
}

.centered-text {
	text-align: center;
}

.tight-spacing {
	margin-top: 0.3rem;
	margin-bottom: 0.3rem;
}

.small-heading {
	font-size: 1.5rem;
	margin-bottom: 0.5rem;
}

.centered-button {
	display: block;
	margin: 0.8rem auto;
	padding: 0.8rem 1.2rem;
	font-size: 1.1rem;
	font-weight: bold;
	background-color: #444;
	color: white;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.centered-button:disabled {
	background-color: #999;
	cursor: not-allowed;
	box-shadow: none;
	opacity: 0.8;
}

.dice-display {
	align-items: center;
	cursor: pointer;
	display: flex;
	justify-content: center;
	margin-top: 1rem;
	transition: transform 0.2s ease;
}

.dice-display:active {
	transform: scale(0.95);
}

.dice-display.disabled {
	pointer-events: none;
	opacity: 0.5;
}

.dice-image {
	width: 100%;
	height: 100%;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)) brightness(1.2) sepia(1) hue-rotate(180deg) saturate(2);
}

.dice-image.rolling {
	animation: diceBounceSpin 0.6s linear infinite;
}

#dice {
	position: absolute;
	width: 10%;
	height: 10%;
	transform: translate(-50%, -50%);
	transition: left 0.8s ease, top 0.8s ease, transform 0.5s ease;
}

#dice.moving {
	animation: diceMove 0.8s ease;
}

@keyframes diceMove {
	0%   { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
	30%  { transform: translate(-50%, -60%) scale(1.2) rotate(-10deg); }
	60%  { transform: translate(-50%, -40%) scale(0.9) rotate(10deg); }
	100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
}

@keyframes diceBounceSpin {
	0%   { transform: rotate(0deg) scale(1); }
	25%  { transform: rotate(90deg) scale(1.05); }
	50%  { transform: rotate(180deg) scale(1); }
	75%  { transform: rotate(270deg) scale(1.05); }
	100% { transform: rotate(360deg) scale(1); }
}

.selectable {
	animation: pulse 1s infinite;
	cursor: pointer;
}

@keyframes pulse {
	0% {
		transform: scale(1);
		opacity: 1;
	}

	50% {
		transform: scale(1.25);
		opacity: 0.8;
	}

	100% {
		transform: scale(1);
		opacity: 1;
	}
}

.winner-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1000;
}

.winner-box {
	background: #fff;
	padding: 2rem;
	border-radius: 10px;
	text-align: center;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.winner-box button {
	margin-top: 1rem;
	padding: 0.5rem 1.2rem;
	font-size: 1rem;
	border: none;
	background-color: #3498db;
	color: white;
	border-radius: 5px;
	cursor: pointer;
}

.winner-box button:hover {
	background-color: #2980b9;
}

#confetti-canvas {
	position: fixed;
	top: 0;
	left: 0;
	pointer-events: none;
	width: 100vw;
	height: 92vh;
	z-index: 1100;
}

.whatsapp { background-color: #25D366; }
.facebook { background-color: #1877F2; }
.telegram { background-color: #0088cc; }
.linkedin { background-color: #0e76a8; }
.email { background-color: #7a7a7a; }