
/*Das ist die Box, in der die EINGABE über Tastatur oder Buttons beim Mathespielchen angezeigt wird.*/
.loesung-box {
    height: 60px;
    min-width: 150px;
    padding: 1px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 24px;
    text-align: center;
    background-color: white;
    user-select: none;
    display: inline-block;
}

/* Der Container, in den die Seiten alle eingebettet werden */

.main-container {
	margin-top: 100px;
	width: 90%;
	margin-left: auto;
	margin-right: auto;
	overflow: hidden;
}

.qr-popup {
	display: none;
	position: fixed;
	background: rgba(255, 255, 255, 0.95);
	padding: 15px;
	border-radius: 8px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
	text-align: center;
	width: 250px;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 1000;
}

.qr-popup img {
	width: 100%;
	height: auto;
}

.qr-popup button {
	margin-top: 10px;
	padding: 5px 10px;
	border: none;
	background-color: #5a8bb5;
	color: white;
	cursor: pointer;
}

.qr-popup button:hover {
	background-color: #4a7ba5;
}

.links {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 30px;
	margin-bottom: 20px;
}

.links img {
	height: 100px;
	width: auto;
}


.links a {
    display: inline-block;
    margin: 10px;
    padding: 10px 20px;
    background: #004080;
    color: white;
    text-decoration: none;
    font-size: 18px;
    border-radius: 5px;
    transition: 0.3s;
}

.links a:hover {
		background: #336699;
	}

.youtube-btn {
	display: inline-block;
	background: #ff0000;
	color: white;
	padding: 10px 20px;
	border-radius: 5px;
	text-decoration: none;
	font-size: 18px;
	font-weight: bold;
	transition: 0.3s;
}

.youtube-btn:hover {
    background: #cc0000;
}
		


/*calc fürs Handy*/
@media (max-width: 400px) {
.game-box {
		width: 95%;
	}
.div {
  font-size: 34px;
}
.links {
		flex-direction: column;
		gap: 10px;
	}
.button {
    font-size: 1.4rem;
    padding: 12px 18px;
    min-width: 50px;
  }

 #loesung {
    font-size: 2rem;
    width: 90%;
    padding: 12px;
    margin: 10px auto;
    display: block;
    text-align: center;
	margin-bottom: 3px;
  }

.game-container {
    width: 95%;
    margin: 0 auto;
}

button {
    font-size: 1.1rem;
    padding: 10px 14px;
  }
}

.filter-button {
	padding: 10px 20px;
	margin: 5px;
	border: none;
	border-radius: 20px;
	background-color: #cccccc;
	color: white;
	font-weight: bold;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.filter-button:hover {
	background-color: #999999;
}

.filter-button.active {
	background-color: #5a8bb5;
}

.tastenfeld {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    justify-content: center;
	max-width: 320px;
    margin: 0 auto 10px auto;
}

.tastenfeld .button {
    padding: 10px;
    font-size: 18px;
    min-width: 0;
}

.tastenfeld .losgehts {
    grid-column: span 3;
    background-color: #4CAF50;
    font-weight: bold;
}

.tastenfeld .losgehts:hover {
    background-color: #45a049;
}

/* Speed und andere Buttons*/
.schnell-reset {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: -5px;
    margin-bottom: 10px;
}

.speed-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
}

.button.klein {
    font-size: 0.9rem;
    padding: 6px 10px;
    min-width: 80px;
}

/* Die Rückmeldungen ob etwas richtig oder falsch ist ...*/

.log-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 5px;
    font-size: 24px;
}

#log {
    color: red;
}
#log2 {
    color: green;
}


/* Die Überschrift, die man ausklappen kann als akkordeon*/

.category {
	background-color: #d0e0ff;
	font-weight: bold;
	text-align: center;
	padding: 15px;
	margin-top: 20px;
	cursor: pointer;
	user-select: none;
	border-radius: 6px;
	position: relative;
	margin-bottom: 10px;

}

.category::after {
	content: "▼";
	position: absolute;
	right: 20px;
	font-size: 16px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
}

.category.open::after {
	content: "▲";
}

/* Ein eÜberschrift, die nur eine Überschrift ist, wie das akkordeon Element aber ohne Ausklappen*/

.sortierung {
	background-color: #d0e0ff;
	font-weight: bold;
	text-align: center;
	padding: 15px;
	margin-top: 20px;
	margin-bottom: 10px;
	user-select: none;
	border-radius: 6px;
	position: relative;
	font-size: 18px;
	/* kein Pfeil, kein Klick */
}

/* Und wenn es etwas mehr Aufmerksamkein haben soll ....*/

.sortierung_new {
	position: relative;
	background-color: #d0e0ff;
	font-weight: bold;
	text-align: left;
	padding: 15px;
	margin-top: 20px;
	border-radius: 6px;
	margin-bottom: 10px;
	overflow: hidden;
	z-index: 1;
}

.sortierung_new h3 {
	margin: 0 0 10px;
	font-size: 20px;
}

.sortierung_new p {
	margin: 0;
	font-size: 14px;
	font-weight: normal;
}

/* Animierter Rahmen mit Gradient */
.sortierung_new::before {
	content: "";
	position: absolute;
	top: -2px;
	left: -2px;
	right: -2px;
	bottom: -2px;
	background: linear-gradient(45deg, #5a8bb5, #336699, #5a8bb5);
	z-index: -1;
	border-radius: 8px;
	background-size: 400% 400%;
	animation: borderGradientMove 4s ease infinite;
}

@keyframes borderGradientMove {
	0% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0% 50%;
	}
}








/* main */
html, body {
	touch-action: manipulation;
}

body {
	font-family: 'Montserrat', sans-serif;
	text-align: center;
	background-color: #ececec;
}

h1 {
	background: #004080;
	color: white;
	padding: 20px;
	border-radius: 10px;
	font-size: 24pt;
	font-weight: bold;
}

h2 {
	font-size: 18pt;
	font-weight: normal;
}


/* game-container für calc.php */
.game-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: inline-block;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;
}

/*Bei Übersichten genutzter Container, automatischer Zeilenumbruch*/
.link-container {
	background: white;
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
	display: inline-block;
	margin-top: 20px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 20px;
}

.container {
	width: 90%;
	margin: auto;
	overflow: hidden;
}

.game-box {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	padding: 10px;
	border: 1px solid #ccc;
	border-radius: 6px;
	margin: 5px;
	border-radius: 6px;
	background-color: #f9f9f9;
}
		
.game-box a {
	display: inline-block;
	flex-grow: 1;
	text-align: center;
	padding: 8px;
	text-decoration: none;
	background: transparent;
	border-radius: 4px;
	transition: background 0.2s;
}
		
.game-box.ungespielt {
	background-color: #f0f0f0; /* Hellgrau für ungespielt */
	opacity: 0.9;
}


.button {
	font-size: 20px;
	padding: 10px;
	margin: 5px;
	border: none;
	border-radius: 5px;
	background-color: #004080;
	color: white;
	cursor: pointer;
}

.button:hover {
	background-color: #4a7ba5;
}

.output {
	font-size: 48px;
	margin: 20px 0;
	font-weight: bold;
	color: #444;
}

input {
	font-size: 24px;
	padding: 10px;
	text-align: center;
	border: 2px solid #5a8bb5;
	border-radius: 5px;
	width: 240px;
}


/* Felder bei calc.php*/
p1 {
	font-size: 24pt;
	color: red;
	padding: 0;
}

p2 {
	font-size: 24pt;
	color: green;
	padding: 0;
}

p3, table {
	font-size: 16pt;
	color: black;
}

.div {
	border-radius: 12px;
	visibility: visible;
	font-family: serif;
	font-style: bold;
	font-size: 42px;
	color: #000000;
	background-color: #dddddd;
}

.div2 {
	visibility: visible;
	font-family: serif;
	font-style: bold;
	font-size: 64px;
	color: #000000;
	background-color: #FFFFFF;
}

#infoDialog, #idfehler {
	width: 350px;
	padding: 25px;
	border: none;
	border-radius: 12px;
	background: rgba(255, 200, 200, 0.95);
	color: #333;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
	text-align: center;
	font-size: 18px;
	animation: fadeIn 0.3s ease-in-out;
}

#loesung {
	min-height: 40px;
	display: inline-block;
	line-height: 1.5;
	font-size: 24px;
	background-color: white;
	border: 1px solid #ccc;
	padding: 10px;
}

#infoDialog::backdrop, #idfehler::backdrop {
background: rgba(0, 0, 0, 0.6);
}

#closeDialog {
background-color: #5a8bb5;
color: white;
border: none;
padding: 10px 15px;
border-radius: 8px;
cursor: pointer;
font-size: 16px;
transition: background 0.2s ease-in-out;
}

#closeDialog:hover {
background-color: #4a7ba5;
}

@keyframes fadeIn {
from {
opacity: 0;
transform: scale(0.9);
}
to {
opacity: 1;
transform: scale(1);
}
}

/* Text Feld, in dem die Aufgaben kommen */
#text mjx-container {
  display: inline-block;
  white-space: normal !important;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

#text {
    min-width: 240px;     /* minimale Breite */
    max-width: 90vw;      /* nicht breiter als der Bildschirm */
    width: fit-content;   /* passt sich dem Inhalt an */
    height: 80px;        /* feste Höhe */
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px solid #aaa;
    margin: 10px auto;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}



/* Menü-Styling */
.navbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 20px;
	background: #004080;
	color: white;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 1000;
}

.navbar-left {
	display: flex;
	align-items: center;
}

.menu-btn {
	font-size: 28px; /* Größer für bessere Sichtbarkeit */
	background: #ffffff; /* Weißer Hintergrund für Kontrast */
	border: 2px solid #004080; /* Dunkelblauer Rand */
	color: #004080; /* Dunkelblau für Text */
	padding: 8px 12px; /* Größere Klickfläche */
	border-radius: 5px; /* Leicht abgerundete Ecken */
	cursor: pointer;
	transition: 0.3s;
}
.navbar-right {
	display: flex;
	align-items: center;
}

.username {
	margin-right: 15px;
	font-weight: bold;
}

.navbar-right a {
	color: white;
	text-decoration: none;
	margin-left: 10px;
}
 
/* Das Menü oben links, in dem alle Menüpunkte sind */

#menu {
	display: none;
	background: #f0f0f0;
	padding: 10px;
	position: fixed;
	left: 10px;
	top: 60px;
	width: 220px;
	box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
	border-radius: 8px;
	z-index: 9999;
/* Damit es auf Mobilgeräten scrollbar ist: */
	max-height: 90vh;
	overflow-y: auto;
}

/* Menü-Punkte */
#menu ul {
	list-style-type: none;
	margin: 0;
	padding: 0;
}

#menu ul li {
	padding: 12px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

/* Letzter Menüpunkt ohne Rand */
#menu ul li:last-child {
	border-bottom: none;
}

/* Menü-Links */
#menu ul li a {
	color: #333; /* Dunkelgrau für besseren Kontrast */
	text-decoration: none;
	font-size: 16px;
	display: block;
}

/* Hover-Effekt */
#menu ul li:hover {
	background-color: #d0e0ff;
}

.header {
    background: #004080;
    color: white;
    padding: 20px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
}


        .news-item {
            background: #336699;
            color: white;
            padding: 15px;
            margin-bottom: 10px;
            border-radius: 5px;
        }

        .news-item h3 {
            margin: 0;
            font-size: 20px;
        }

        .news-item p {
            margin: 5px 0 0;
            font-size: 14px;
        }


/*Diagramme darstellen*/

.diagramm-box {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    margin: 10px auto;
    max-width: 800px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: none; /* wird erst bei Klick eingeblendet */
    transition: all 0.3s ease;
    display: none;
    background: white;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.diagramm-toggle {
    background-color: #d0e0ff;
    font-weight: bold;
    text-align: center;
    padding: 15px;
    margin-top: 20px;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.diagramm-toggle::after {
    content: "▼";
    position: absolute;
    right: 20px;
    font-size: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.diagramm-toggle.open::after {
    content: "▲";
}
