/* Negative Zahlen anschaulich (08.11.2026): Stile der Animation im Design der Seite. Grundstile in /seite.css.
   Rot = positiv, Blau = negativ wie bisher, jetzt mit ausreichendem Kontrast; das Vorzeichen steht zusätzlich im Kreis. */

:root {
	--positiv: #b3261e;
	--negativ: #185FA5;
}

.steuerung {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.8rem 1rem;
}

.steuerung .feld { display: flex; flex-direction: column; gap: 0.25rem; }
.steuerung label { font-size: 0.92rem; color: var(--ink-light); }

.steuerung input, .steuerung select {
	font-family: 'PT Serif', Georgia, serif;
	font-size: 1.3rem;
	width: 7rem;
	min-height: 3rem;
	padding: 0.35rem 0.6rem;
	border: 1.5px solid var(--ink-light);
	border-radius: 10px;
	background: var(--white);
	color: var(--ink);
}

.steuerung select { width: 5rem; }

.steuerung input:focus-visible, .steuerung select:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }

.steuerung .knoepfe { margin-top: 0; }
.knopf:disabled { opacity: 0.55; cursor: not-allowed; }

.animation-area {
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: clamp(1.2rem, 4vw, 2.5rem);
	min-height: 400px;
	position: relative;
	overflow: hidden;
	margin-top: 1.4rem;
}

.equation {
	text-align: center;
	font-family: 'Libre Baskerville', Georgia, serif;
	font-size: clamp(1.6rem, 6vw, 2.4rem);
	color: var(--akzent-dark);
	margin-bottom: 3rem;
	min-height: 1.4em;
	font-variant-numeric: lining-nums;
}

.circles-container {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	gap: clamp(3rem, 14vw, 6.25rem);
	min-height: 150px;
	margin-bottom: 2.5rem;
}

.circle-group {
	display: flex;
	flex-direction: column;
	gap: 15px;
	justify-content: center;
	align-items: center;
	position: relative;
}

.circle {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 26px;
	color: #ffffff;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
	transition: all 0.5s;
	position: relative;
}

.circle.positive { background: var(--positiv); }
.circle.negative { background: var(--negativ); }

.label {
	font-size: 1.5em;
	color: var(--ink-light);
	font-weight: 700;
	position: absolute;
	top: -44px;
	left: 50%;
	transform: translateX(-50%);
	transition: opacity 0.3s;
	white-space: nowrap;
}

.result {
	text-align: center;
	font-family: 'Libre Baskerville', Georgia, serif;
	font-size: clamp(1.4rem, 5vw, 2rem);
	color: var(--ink);
	margin-top: 1.5rem;
	opacity: 0;
	transition: opacity 0.5s;
}

.result.show { opacity: 1; }
.result.positiv { color: var(--positiv); }
.result.negativ { color: var(--negativ); }

@keyframes slideIn {
	from { transform: translateX(var(--start-x)); opacity: 0; }
	to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
	to { opacity: 0; transform: scale(0); }
}

@keyframes bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-10px); }
}

.info {
	margin-top: 1.4rem;
	padding: 1rem 1.2rem;
	border-left: 4px solid var(--akzent);
	background: var(--akzent-light);
	border-radius: 0 10px 10px 0;
}

.info h2 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.info p + p { margin-top: 0.6rem; }

.legende { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.legende > span { display: inline-flex; align-items: center; gap: 0.45rem; }

.punkt {
	width: 1.4rem;
	height: 1.4rem;
	border-radius: 50%;
	color: #ffffff;
	display: inline-grid;
	place-items: center;
	font-weight: 700;
	font-size: 0.95rem;
}

.punkt.positive { background: var(--positiv); }
.punkt.negative { background: var(--negativ); }
