:root {
	--primary-color: #6c5ce7;
	--bg-color: #f0f2f5;
	--text-color: #2d3436;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	/* Wichtig: Padding/Border vergrößern das Element nicht mehr */
}

body,
html {
	height: 100%;
	width: 100%;
	overflow-x: hidden;
	position: fixed;
}

body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	background-color: var(--bg-color);
	color: var(--text-color);
	display: flex;
	flex-direction: column;
	padding: 20px;
}

h1 {
	text-align: center;
}

.fullscreen-zoo {
	position: absolute;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	z-index: 1;
}

.sidebar-icons {
	position: fixed;
	top: 20px;
	right: 20px;
	display: flex;
	flex-direction: column;
	gap: 15px;
	z-index: 100;
}

.icon-btn {
	background: rgba(255, 255, 255, 0.2);
	backdrop-filter: blur(5px);
	border-radius: 50%;
	padding: 10px;
	cursor: pointer;
	color: white;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
	transition: all 0.2s;
}

.icon-btn:hover {
	transform: scale(1.1);
	background: rgba(255, 255, 255, 0.4);
}

.card-header {
	display: flex;
	justify-content: space-between;
}

.ui-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.4);
	/* Abdunkeln des Hintergrunds */
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 90;

	/* Diese Kombination macht es im Hintergrund "un-klickbar" */
	opacity: 0;
	visibility: hidden;
	pointer-events: none;

	transition: opacity 0.3s ease, visibility 0.3s;
}

/* Wenn das Overlay aktiv ist */
.ui-overlay.active {
	opacity: 1;
	pointer-events: auto;
	visibility: visible;
}

/* Animation für die Karte selbst */
.app-card {
	transform: translateY(20px);
	transition: transform 0.3s ease;
}

.ui-overlay.active .app-card {
	transform: translateY(0);
}

.app-card {
	pointer-events: auto;
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	width: 100%;
	max-width: 450px;
	margin-bottom: 40px;
	/* Platz am unteren Ende */
	border-radius: 20px;
	padding: 25px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#todo-input-area {
	display: none;

	& .welcome-area {
		display: flex;
		justify-content: space-between;
		margin-bottom: 10px;

		& #display-username {
			text-transform: capitalize;
		}
	}
}

/* Auth & Input Areas */
.input-area {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
}

input,
select {
	flex-grow: 1;
	padding: 12px;
	border: 2px solid #eee;
	border-radius: 10px;
	outline: none;
	transition: border-color 0.3s;
}

input:focus {
	border-color: var(--primary-color);
}

button {
	padding: 12px 20px;
	background-color: var(--primary-color);
	color: white;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	font-weight: bold;
}

button:hover {
	opacity: 0.9;
}

/* Todo Items */
.todo-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #fdfdfd;
	padding: 12px;
	margin-bottom: 10px;
	border-radius: 12px;
	border-left: 5px solid var(--primary-color);
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.todo-content {
	display: flex;
	align-items: center;
	flex-grow: 1;
	cursor: pointer;
}

.animal-icon {
	font-size: 1.5rem;
	margin-right: 12px;
}

/* Status: Erledigt */
.todo-content.completed .task-text {
	text-decoration: line-through;
	color: #b2bec3;
}

.todo-content.completed .animal-icon {
	filter: grayscale(1);
	opacity: 0.5;
}

.delete-btn-small {
	background: none;
	font-size: 1.1rem;
	padding: 5px;
	color: #ff7675;
}

#todo_list {
	display: none;
	position: relative;
	width: 100%;
	height: 70vh;
	/* Spielfeld-Höhe */
	background: #e1f5fe;
	/* Heller Himmel-Look */
	border-radius: 20px;
	overflow: hidden;
	/* Verhindert, dass Tiere ausbrechen */
	border: 3px solid #b3e5fc;
}

.todo-sprite {
	position: absolute;
	display: flex;
	flex-direction: column;
	align-items: center;
	transition: left 2s linear, top 2s linear;
	/* Sorgt für flüssiges Laufen */
	cursor: pointer;
	z-index: 10;
}

/* Die Sprechblase */
.bubble {
	background: white;
	padding: 8px 12px;
	border-radius: 15px;
	font-size: 0.9rem;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	margin-bottom: 10px;

	/* Standard: Gekürzt */
	max-width: 120px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;

	transition: all 0.2s ease-in-out;
	cursor: help;
	/* Zeigt an, dass man hier mehr Infos bekommt */
}

/* DESKTOP: Hover-Effekt */
@media (binary-features: hover) {
	.todo-sprite:hover .bubble {
		max-width: 300px;
		white-space: normal;
		overflow: visible;
		z-index: 100;
	}
}

/* MOBILE & KLICK: Die Expanded-Klasse */
.bubble.expanded {
	max-width: 300px !important;
	white-space: normal !important;
	overflow: visible !important;
	z-index: 100;
	box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* Kleiner Pfeil unter der Sprechblase */
.bubble::after {
	content: '';
	position: absolute;
	bottom: 67px;
	left: 50%;
	border-width: 8px 8px 0;
	border-style: solid;
	border-color: white transparent;
	transform: translateX(-50%);
}

.animal-sprite {
	font-size: 3rem;
	filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.1));
}

/* Erledigte Tiere werden blasser und "schlafen" (grayscale) */
.todo-sprite.completed {
	filter: grayscale(1);
	opacity: 0.6;
	z-index: 5;
}

/* Erledigt Secttion */
.completed-list-container {
	margin-top: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.completed-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #f8f9fa;
	padding: 10px 15px;
	border-radius: 10px;
	border-left: 4px solid #b2bec3;
	cursor: pointer;
	transition: background 0.2s;
}

.completed-item:hover {
	background: #dfe6e9;
}

.completed-content {
	display: flex;
	align-items: center;
	gap: 15px;
	flex-grow: 1;
}

.completed-text {
	text-decoration: line-through;
	color: #636e72;
}

/* Der Lösch-Button in der Liste */
.delete-btn-list {
	background-color: #ff7675;
	color: white;
	border: none;
	border-radius: 6px;
	padding: 5px 10px;
	cursor: pointer;
	font-size: 0.8rem;
}

.delete-btn-list:hover {
	background-color: #d63031;
}
