:root {
	--primary: #2c3e50;
	--accent: #3498db;
	--success: #27ae60;
	--error: #e74c3c;
	--bg: #f4f7f6;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	margin: 0; padding: 0; background: var(--bg); color: var(--primary);
	line-height: 1.6; touch-action: manipulation;
	background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	/* Zcela zakáže gesto stažení stránky dolů pro obnovení na mobilu */
	overscroll-behavior-y: contain;
}

#app { width: 100%; }

.hero-card {
	background: white;
	padding: 30px;
	border-radius: 16px;
	box-shadow: 0 10px 25px rgba(0,0,0,0.1);
	text-align: center;
	max-width: 500px;
	margin: 20px auto;
}

.app-description {
	color: #666;
	font-size: 0.95rem;
	margin-bottom: 25px;
	line-height: 1.5;
}

.login-box label {
	display: block;
	margin-bottom: 10px;
	font-weight: 600;
	color: var(--primary);
}

#password-input {
	width: 100%;
	padding: 12px;
	margin-bottom: 15px;
	border: 2px solid #ddd;
	border-radius: 8px;
	font-size: 1.1rem;
	text-align: center;
	box-sizing: border-box;
}

.error {
	background-color: #fdecea;	/* Jemné červené pozadí */
	color: #d32f2f;	/* Výrazná červená pro text */
	padding: 12px;
	border-radius: 8px;
	border: 1px solid #ef9a9a;
	margin-top: 15px;
	font-weight: bold;
	font-size: 0.9rem;
	display: block;		/* Zajistí, že zabere celou šířku boxu */
	animation: shake 0.4s ease-in-out;	/* Volitelný efekt zatřesení */
}

/* Bonus: Animace zatřesení při chybě */
@keyframes shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-5px); }
	75% { transform: translateX(5px); }
}

@keyframes fadeInScale {
	from { opacity: 0; transform: scale(0.95); }
	to { opacity: 1; transform: scale(1); }
}

.hidden {
	display: none !important;
}

/* Jazyková tlačítka */
.lang-switcher {
	display: flex;
	justify-content: center;
	background: #f0f2f5;
	padding: 5px;
	border-radius: 50px;
	width: fit-content;
	margin: 0 auto 25px auto;
	border: 1px solid #ddd;
}

.lang-pill {
	background: transparent;
	border: none;
	padding: 8px 20px;
	border-radius: 50px;
	cursor: pointer;
	font-weight: bold;
	color: #666;
	transition: all 0.3s ease;
	min-width: 60px;
}

/* Aktivní jazyk */
.lang-pill.active {
	background: white;
	color: var(--primary);
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Patička */
.app-footer {
	text-align: center;
	margin-top: 40px;
	font-size: 0.85rem;
	color: #777;
}

.version-tag {
	margin-top: 10px;
	opacity: 0.6;
}

.screen { 
	padding: 20px; max-width: 800px; margin: 0 auto;
	animation: fadeInScale 0.4s ease-out;
}
.hidden { display: none !important; }

/* HUD Header */
#test-hud {
	background: var(--primary); color: white;
	padding: 10px 20px; display: flex; justify-content: space-between;
	position: sticky; top: 0; z-index: 100;
}

/* Question Styling */
.rozehra { font-style: italic; color: #666; margin-bottom: 15px; border-left: 4px solid var(--accent); padding-left: 10px; }
.udalost img { max-width: 100%; height: auto; border-radius: 8px; margin: 10px 0; }
.ukol h3 { margin-top: 0; }

/* Options */
.option-item {
	background: white; border: 2px solid #ddd; border-radius: 8px;
	padding: 15px; margin-bottom: 10px; cursor: pointer; transition: 0.2s;
}
.option-item.selected { border-color: var(--accent); background: #ebf5fb; }

button {
	width: 100%; padding: 15px; border: none; border-radius: 8px;
	background: var(--accent); color: white; font-weight: bold; font-size: 1rem;
}

/* Results Detail (Explanation) */
.detail-item { background: white; margin-bottom: 20px; padding: 15px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.explanation-text { 
	margin-top: 15px; padding-top: 15px; border-top: 1px dashed #ccc;
	font-size: 0.9rem; color: #444; text-align: justify;
}

.feedback-box {
	padding: 15px;
	margin: 15px 0;
	border-radius: 8px;
	font-weight: bold;
	text-align: center;
}
.feedback-box.correct { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.feedback-box.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

.final-timer-display {
	background: #fff3e0;
	color: #e65100;
	padding: 10px;
	border-radius: 8px;
	display: inline-block;
	margin-top: 15px;
	font-weight: bold;
	border: 1px solid #ffe0b2;
}

.time-summary ul {
	list-style: none;
	padding: 0;
}

.time-summary li {
	background: white;
	margin: 5px auto;
	padding: 10px;
	max-width: 400px;
	border-radius: 6px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.score-circle {
	width: 100px; height: 100px; border-radius: 50%;
	background: var(--accent); color: white;
	display: flex; align-items: center; justify-content: center;
	font-size: 2rem; margin: 20px auto; font-weight: bold;
}

.score-container {
	position: relative;
	width: 150px;
	height: 150px;
	margin: 20px auto;
}

.score-ring {
	transform: rotate(-90deg);
}

.score-ring-circle {
	transition: stroke-dashoffset 1.5s ease-out;
	stroke-dasharray: 440; /* Obvod kruhu */
	stroke-dashoffset: 440; /* Startovní pozice (prázdný) */
}

.score-text {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 1.8rem;
	font-weight: bold;
	color: var(--primary);
}

.res-ok { border-left: 5px solid var(--success); }
.res-err { border-left: 5px solid var(--error); }

.show-exp-btn {
	background: #eee; color: #333; font-size: 0.8rem; padding: 5px 10px;
	width: auto; margin-top: 10px; border: 1px solid #ccc;
}

.audio-player-wrapper {
	background: #eee;
	padding: 15px;
	border-radius: 10px;
	margin: 10px 0;
	border: 1px solid #ccc;
}

audio {
	width: 100%; /* Aby přehrávač na mobilu nepřetékal */
	height: 40px;
}

/* Zarovnání obrázků na střed */
.udalost {
	text-align: center;
	margin: 20px 0;
}

.udalost img {
	display: block;
	margin-left: auto;
	margin-right: auto;
	max-width: 90%;
	border: 3px solid #eee;
}

/* Indikace počtu správných odpovědí */
.correct-answers-hint {
	background: #e1f5fe;
	border-left: 5px solid #0288d1;
	padding: 10px 15px;
	margin: 15px 0;
	font-size: 0.9rem;
	color: #01579b;
	border-radius: 4px;
}

.correct-answers-hint span {
	display: inline-block;
	width: 18px;
	height: 18px;
	background: #0288d1;
	color: white;
	border-radius: 50%;
	text-align: center;
	line-height: 18px;
	font-weight: bold;
	margin-right: 8px;
	font-size: 0.75rem;
}

/* Styl pro správné řešení v rozboru */
.correct-solution {
	color: #27ae60;
	background: #f0fff4;
	padding: 8px;
	border-radius: 4px;
	font-size: 0.9rem;
	margin-top: 5px;
}

/* Vizuální zpětná vazba pro zakázané tlačítko */
button:disabled {
	background-color: #ccc !important;
	cursor: not-allowed;
	opacity: 0.6;
}

/* Accordion styl */
.module-fold {
	background: #fff;
	border-radius: 8px;
	margin-bottom: 12px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.05);
	overflow: hidden;
	border: 1px solid #eee;
}

.module-fold summary {
	padding: 15px;
	cursor: pointer;
	list-style: none;
	font-weight: bold;
	display: flex;
	align-items: center;
}

.module-fold summary::-webkit-details-marker {
	display: none; /* Skryje defaultní šipku v Chrome */
}

.summary-content {
	display: flex;
	justify-content: space-between;
	width: 100%;
	align-items: center;
}

.module-meta {
	font-size: 0.9em;
	color: #666;
	background: #f0f0f0;
	padding: 4px 8px;
	border-radius: 4px;
}

.module-details {
	padding: 10px 15px;
	border-top: 1px solid #eee;
	background: #fafafa;
}

/* Animace rozbalení */
.module-fold[open] summary {
	background: #f8f9fa;
	border-bottom: 1px solid #eee;
}

/* Prstenec v hlavičce */
#final-ring-container {
	width: 150px;
	height: 150px;
	margin: 20px auto;
}

.progress-bar-bg {
	width: 100%;
	height: 8px;
	background-color: #eee;
	border-radius: 4px;
	overflow: hidden;
	margin-top: 10px;
}

#progress-bar-fill {
	width: 0%;
	height: 100%;
	background-color: #28a745; /* Zelená barva úspěchu */
	transition: width 0.3s ease; /* Plynulý pohyb lišty */
}

#loading-text {
	font-size: 14px;
	color: #666;
	margin-bottom: 5px;
}
