/* Grundlayout */
body {
	margin: 0;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
		Roboto, Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	background: radial-gradient(circle at top, #e0f2fe 0, #f8fafc 45%, #eef2ff 100%);
	color: #0f172a;
}

.app-body {
	min-height: 100vh;
}

#root {
	min-height: 100vh;
}

/* App-Shell */

.app-shell {
	max-width: 1100px;
	margin: 0 auto;
	padding: 1.5rem 1rem 3rem;
}

/* Header */

.app-header {
	position: sticky;
	top: 0;
	z-index: 10;
	margin-bottom: 1.5rem;
}

.app-header-inner {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.9);
	color: #e5e7eb;
	box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35);
	backdrop-filter: blur(12px);
}

.app-logo {
	width: 42px;
	height: 42px;
	border-radius: 999px;
	background: linear-gradient(135deg, #6366f1, #22c55e);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 1.1rem;
	color: white;
	box-shadow: 0 0 0 2px rgba(248, 250, 252, 0.25);
}

.app-header-text {
	display: flex;
	flex-direction: column;
}

.app-title {
	font-size: 1.3rem;
	margin: 0;
}

.app-subtitle {
	font-size: 0.85rem;
	margin: 0;
	opacity: 0.8;
}

/* Layout */

.app-main {
	margin-top: 1.5rem;
}

.app-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	gap: 1.5rem;
}

.app-column {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.app-column--results {
	max-height: calc(100vh - 7rem);
	overflow-y: auto;
	padding-right: 0.25rem;
}

/* Karten */

.card {
	background-color: #ffffff;
	border-radius: 1rem;
	border: 1px solid #e2e8f0;
	box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.card-header {
	padding: 1rem 1.25rem 0.5rem;
	border-bottom: 1px solid #e5e7eb;
}

.card-body {
	padding: 0.75rem 1.25rem 1.25rem;
}

.card-title {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 0 0 0.25rem;
	color: #0f172a;
}

.card-desc {
	margin: 0;
	font-size: 0.9rem;
	color: #6b7280;
}

/* Form-Elemente */

.input {
	width: 100%;
	border-radius: 0.7rem;
	border: 1px solid #e2e8f0;
	padding: 0.6rem 0.7rem;
	font-size: 0.95rem;
	font-family: inherit;
	color: #0f172a;
	background-color: #ffffff;
	box-sizing: border-box;
}

.input:focus {
	outline: none;
	border-color: #4f46e5;
	box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.textarea {
	resize: vertical;
	min-height: 160px;
}

.select {
	cursor: pointer;
}

.field-label {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	color: #4b5563;
	margin-bottom: 0.25rem;
}

.form-field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.settings-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(0, min(220px, 100%)));
	gap: 1rem;
}

/* Datei-Upload */

.file-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.5rem;
	flex-wrap: wrap;
}

.file-name {
	font-size: 0.85rem;
	color: #4b5563;
}

/* Quiztype Tiles */

.quiztype-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 0.75rem;
}

.quiztype-tile {
	position: relative;
	padding: 0.75rem 0.9rem;
	border-radius: 0.9rem;
	border: 1px solid #e5e7eb;
	background: #f9fafb;
	font-size: 0.9rem;
	color: #111827;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	transition: border-color 0.15s ease-out, box-shadow 0.15s ease-out,
		background 0.15s ease-out, transform 0.1s ease-out;
}

.quiztype-tile:hover {
	border-color: #6366f1;
	box-shadow: 0 6px 16px rgba(79, 70, 229, 0.18);
	transform: translateY(-1px);
	background: #eef2ff;
}

.quiztype-tile--active {
	border-color: #4f46e5;
	background: linear-gradient(135deg, #eef2ff, #ecfdf3);
	box-shadow: 0 10px 22px rgba(99, 102, 241, 0.3);
}

.quiztype-checkbox {
	position: relative;
	width: 1rem;
	height: 1rem;
}

.quiztype-label {
	flex: 1;
}

/* Generate-Bar */

.generate-bar {
	margin-top: 1rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

.btn-primary {
	background-color: #4f46e5;
	color: #ffffff;
	border: none;
	border-radius: 999px;
	padding: 0.7rem 1.4rem;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	box-shadow: 0 14px 30px rgba(79, 70, 229, 0.4);
	transition: background-color 0.15s ease-out, transform 0.08s ease-out,
		box-shadow 0.15s ease-out;
}

.btn-primary:hover {
	background-color: #4338ca;
	transform: translateY(-1px);
	box-shadow: 0 16px 36px rgba(79, 70, 229, 0.55);
}

.btn-primary:active {
	transform: translateY(0);
	box-shadow: 0 8px 18px rgba(79, 70, 229, 0.35);
}

.status-badge {
	font-size: 0.85rem;
	padding: 0.4rem 0.7rem;
	border-radius: 999px;
	background-color: #e0e7ff;
	color: #312e81;
}

/* Ergebnisse */

.results-section {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.results-title {
	margin: 0 0 0.25rem;
	font-size: 1.1rem;
	font-weight: 700;
	color: #111827;
}

.quiz-card {
	font-size: 0.9rem;
}

.quiz-tag {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	background-color: #eef2ff;
	color: #3730a3;
}

.quiz-details {
	font-size: 0.85rem;
}

.quiz-details > summary {
	cursor: pointer;
	color: #4f46e5;
	margin-bottom: 0.5rem;
}

.quiz-json {
	background: #0f172a;
	color: #e5e7eb;
	padding: 0.75rem;
	border-radius: 0.75rem;
	overflow-x: auto;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
		"Liberation Mono", "Courier New", monospace;
	font-size: 0.8rem;
}

/* Fokus-Stile */

button:focus,
input:focus,
textarea:focus,
select:focus {
	outline: none;
}

/* Scrollbar (Ergebnisse) */

.app-column--results::-webkit-scrollbar {
	width: 6px;
}

.app-column--results::-webkit-scrollbar-thumb {
	background-color: rgba(148, 163, 184, 0.8);
	border-radius: 999px;
}

/* Responsive */

@media (max-width: 900px) {
	.app-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.app-column--results {
		max-height: none;
		padding-right: 0;
	}

	.app-header-inner {
		border-radius: 1rem;
	}
}

@media (max-width: 600px) {
	.app-shell {
		padding-inline: 0.75rem;
	}

	.card-body {
		padding-inline: 1rem;
	}
}
