/* Pro des verbes – Start-, Lehrer- und Adminbereich. Das Spiel hat game.css. */
:root {
	--blue: #002654;
	--blue-2: #0b3a75;
	--red: #ED2939;
	--paper: #F4F5F0;
	--ink: #1d2433;
	--muted: #6b7280;
	--line: #e5e7eb;
	--ok: #16a34a;
	--warn: #b45309;
	--radius: 14px;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
	background: var(--paper);
	color: var(--ink);
	line-height: 1.45;
}

a { color: var(--blue-2); }
h1 { color: var(--blue); margin: 0.2em 0 0.6em; }
h2 { color: var(--blue); font-size: 1.15rem; margin: 0 0 0.8em; }
code { background: #eef1f6; padding: 1px 5px; border-radius: 5px; }
code.big { font-size: 1.3rem; display: inline-block; margin: 6px 0; letter-spacing: 1px; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* --- Kopfzeile --- */
.topbar {
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 10px 24px;
	background: linear-gradient(135deg, var(--blue), #001a3a);
	color: white;
	flex-wrap: wrap;
}
.topbar .brand { color: white; font-weight: 800; text-decoration: none; font-size: 1.1rem; }
.mainnav { display: flex; gap: 4px; flex-wrap: wrap; }
.mainnav a { color: #dbe4f3; text-decoration: none; padding: 6px 12px; border-radius: 999px; font-weight: 600; }
.mainnav a:hover { background: rgba(255, 255, 255, 0.1); }
.mainnav a.on { background: white; color: var(--blue); }
.who { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.who select { border-radius: 999px; padding: 4px 10px; border: none; font-weight: 600; }
.pill { background: rgba(255, 255, 255, 0.15); padding: 3px 10px; border-radius: 999px; }
button.link { background: none; border: none; color: #dbe4f3; text-decoration: underline; cursor: pointer; font: inherit; }

.page { max-width: 1200px; margin: 0 auto; padding: 24px; }
form.inline { display: inline; margin: 0; }

/* --- Karten, Formulare --- */
.card {
	background: white;
	border-radius: var(--radius);
	padding: 20px 22px;
	margin-bottom: 20px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}
.form label { display: block; font-weight: 600; margin-bottom: 14px; }
.form input:not([type=checkbox]), .form select {
	display: block;
	width: 100%;
	margin-top: 4px;
	padding: 9px 12px;
	border: 2px solid var(--line);
	border-radius: 10px;
	font: inherit;
}
.form input:focus { outline: none; border-color: var(--blue-2); }
.form label.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.form fieldset { border: 2px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 0 0 14px; }
.form legend { font-weight: 700; padding: 0 6px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.form-grid .person { display: inline-block; min-width: 6em; color: var(--blue); }
.form .actions { display: flex; gap: 10px; margin-top: 8px; }
.narrow { max-width: 480px; }
.stack { display: flex; flex-direction: column; gap: 10px; }

.btn {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 999px;
	border: 2px solid var(--blue);
	background: white;
	color: var(--blue);
	font-weight: 700;
	font: inherit;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}
.btn:hover { background: #eef3fb; }
.btn-primary { background: var(--blue); color: white; }
.btn-primary:hover { background: var(--blue-2); }
.btn-danger { border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: #fdecee; }
.btn-small { padding: 4px 12px; font-size: 0.85rem; }
.btn-big { padding: 12px 24px; font-size: 1.05rem; width: 100%; text-align: center; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
button.icon { border: none; background: none; cursor: pointer; color: var(--muted); padding: 2px; }
button.icon:disabled { opacity: 0.25; cursor: default; }

.switch {
	min-width: 56px;
	padding: 4px 12px;
	border-radius: 999px;
	border: 2px solid var(--line);
	background: #f3f4f6;
	color: var(--muted);
	font-weight: 700;
	cursor: pointer;
}
.switch.on { background: #dcfce7; border-color: #86efac; color: #166534; }

.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; }
.flash-ok { background: #dcfce7; color: #166534; }
.flash-err { background: #fdecee; color: #9f1239; }
.notice { background: #fff8e1; border-left: 4px solid #f59e0b; padding: 10px 14px; border-radius: 8px; }
.danger-zone { border: 2px dashed #f3c2c8; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.danger-zone.form { display: block; }

.tag { display: inline-block; font-size: 0.75rem; padding: 1px 8px; border-radius: 999px; background: #eef1f6; color: var(--muted); font-weight: 700; vertical-align: middle; }
.tag-warn { background: #fef3c7; color: var(--warn); }
.tag-own { background: #e0e7ff; color: #3730a3; }

/* --- Tabellen --- */
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
table.list th, table.list td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.list th { font-size: 0.85rem; color: var(--muted); font-weight: 700; }
table.list td.actions { white-space: nowrap; text-align: right; }
table.list tr.ok td:nth-child(3) { color: var(--ok); }
table.list tr.err td:nth-child(3) { color: var(--red); }
tr.disabled, th.disabled, td.disabled { opacity: 0.45; }

table.heatmap { width: auto; }
table.heatmap th, table.heatmap td { border: 1px solid white; padding: 6px 8px; }
table.heatmap th.sticky { position: sticky; left: 0; background: white; text-align: left; white-space: nowrap; z-index: 1; }
table.heatmap th.rot { height: 110px; vertical-align: bottom; padding: 4px; }
table.heatmap th.rot span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-weight: 700; }
td.heat { text-align: center; font-weight: 700; min-width: 34px; font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 6px; font-size: 0.8rem; margin-top: 8px; }
.legend span { padding: 2px 8px; border-radius: 6px; }

table.matrix th, table.matrix td { border: 1px solid white; padding: 6px 8px; text-align: center; vertical-align: top; }
table.matrix thead th { color: var(--muted); font-size: 0.85rem; }
table.matrix tbody th { text-align: left; white-space: nowrap; }
.form-answer { font-weight: 700; }
.form-share { font-size: 0.8rem; color: #374151; }
.form-errors { margin-top: 3px; display: flex; flex-direction: column; font-size: 0.75rem; color: #9f1239; }
td.lvl { font-size: 1rem; min-width: 70px; }
td.lvl-none { background: #f6f6f6; color: #c4c4c4; }
td.lvl-0 { background: #fde2e2; }
td.lvl-1 { background: #fdf0d5; }
td.lvl-2 { background: #eef7d5; }
td.lvl-3 { background: #c9efd4; }
.stars { color: #d4a000; letter-spacing: 1px; }

.bar { display: inline-block; width: 120px; height: 10px; background: #eef1f6; border-radius: 999px; overflow: hidden; vertical-align: middle; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, #86efac, var(--ok)); }

.stats { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.stats div { background: white; border-radius: var(--radius); padding: 12px 18px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05); min-width: 130px; }
.stats strong { display: block; font-size: 1.4rem; color: var(--blue); }
.stats span { color: var(--muted); font-size: 0.85rem; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 20px; }

/* --- Startseite / Login --- */
body.center-page main { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { text-align: center; max-width: 420px; width: 100%; }
.login-card .form { text-align: left; }
.login-duck { width: 120px; }

/* --- Eigenschaften der Verben --- */
.tag-regular { background: #e0f2fe; color: #075985; }
.tag-irregular { background: #fee2e2; color: #991b1b; }
.tag-cat { --cat: #6b7280; background: color-mix(in srgb, var(--cat) 15%, white); color: color-mix(in srgb, var(--cat) 80%, black); border: 1px solid color-mix(in srgb, var(--cat) 40%, white); }
.cat-picks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0; }
.form label.cat-pick { margin-bottom: 0; }
.cat-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.cat-row input[name=name] { flex: 1 1 200px; padding: 6px 10px; border: 2px solid var(--line); border-radius: 8px; font: inherit; }
.cat-row input[type=number] { width: 90px; padding: 6px 8px; border: 2px solid var(--line); border-radius: 8px; font: inherit; }
.cat-row input[type=color], .form input[type=color] { width: 48px; height: 34px; padding: 2px; border: 2px solid var(--line); border-radius: 8px; }

/* --- Klassenlogin --- */
.login-card h2 { margin-top: 18px; }
.sep { display: flex; align-items: center; gap: 10px; color: var(--muted); margin: 16px 0; }
.sep::before, .sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.btn-homework { background: #0f766e; border-color: #0f766e; color: white; }
.btn-homework:hover { background: #115e59; }
.actions input[name=passcode] { padding: 4px 8px; border: 2px solid var(--line); border-radius: 8px; font: inherit; width: 70px; }

/* --- Rückfrage-Fenster (app.js), statt confirm() --- */
.confirm-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 20, 50, 0.45);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	padding: 20px;
}
.confirm-overlay.hidden { display: none; }
.confirm-box {
	background: white;
	border-radius: var(--radius);
	padding: 22px 24px 18px;
	width: min(440px, 100%);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.confirm-title { margin: 0 0 8px; color: var(--blue); font-size: 1.15rem; }
.confirm-text { margin: 0 0 18px; color: #374151; line-height: 1.45; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
.btn-danger-solid { background: var(--red); border-color: var(--red); color: white; }
.btn-danger-solid:hover { background: #c81e2c; }
