body { font-family: Arial, sans-serif; text-align: center; /*margin-top: 50px;*/ font-size: 18px; }
.container { max-width: 900px; margin: auto; padding: 20px; border: 1px solid #ccc; border-radius: 8px; }
.role-box { border: 1px solid #eee; padding: 15px; margin: 10px 0; border-radius: 5px; }
.admin-login { background-color: #f9f9f9; }
.player-join { background-color: #e6f7ff; }
input[type="text"], input[type="password"], input[type="email"] { padding: 10px; margin: 5px 0; width: 80%; border: 1px solid #ddd; border-radius: 4px; }
button { padding: 10px 20px; margin-top: 10px; cursor: pointer; border: none; border-radius: 4px; font-weight: bold; font-size: 18px; }
.admin-button { background-color: #007bff; color: white; }
.error { color: red; font-weight: bold; margin-bottom: 15px; }
.success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.status-box { border: 2px solid #ccc; padding: 20px; margin-top: 20px; border-radius: 8px; }
.active { border-color: #28a745; background-color: #e6ffe6; }
.inactive { border-color: #dc3545; background-color: #fff0f0; }
.active h2 { color: #28a745; }
.inactive h2 { color: #dc3545; }
.action-button { padding: 10px 20px; margin-top: 15px; font-weight: bold; cursor: pointer; border: none; border-radius: 5px; }
.start-btn { background-color: #28a745; color: white; }
.end-btn { background-color: #dc3545; color: white; }
table { width: 100%; border-collapse: collapse; margin-top: 20px; }
th, td { border: 1px solid #ddd; padding: 8px; text-align: right; }
th { background-color: #f1f1f1; }
.shape-preview { max-width: 50px; max-height: 50px; vertical-align: middle; }
.grid-container { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
ul { display: inline-block; }
.img-preview { width: 600px; }

.game-header { padding: 15px; background: rgba(0,0,0,0.5); }
        
/* אזור המשחק */
#game-container {
	position: relative;
	/*width: 100vw;
	height: 80vh;*/
	margin-top: 20px;
	touch-action: none;
	-webkit-user-select: none;
	user-select: none;
	overflow: visible;
}

/* מסגרת המטרה - לאן שגוררים */
#target-area {
	/*position: absolute;
	left: 50%;
	top: 60%;
	transform: translate(-50%, -50%);*/
	width: 800px;
	height: 600px;
	border: 2px solid;
	background: rgba(255,255,255,0.05);
	z-index: 1;
	margin: auto;
}

/* החלקים הגרפיים */
.puzzle-piece {
	position: absolute;
	width: 800px;
	height: 600px;
	cursor: move;
	-webkit-user-select: none;
	user-select: none;
	touch-action: none;
	-webkit-touch-callout: none;
	z-index: 10;
	transition: opacity 0.2s;
	padding: 10px;
	box-sizing: border-box;
}

.puzzle-piece:active { opacity: 0.8; z-index: 100; }

.btn-finish {
	background: #27ae60;
	color: white;
	padding: 15px 40px;
	border: none;
	border-radius: 30px;
	font-size: 1.2em;
	cursor: pointer;
	box-shadow: 0 4px 15px rgba(0,0,0,0.3);
	margin-top: 10px;
}
.btn-finish:hover { background: #2ecc71; }

.locked-screen {
	pointer-events: none; /* חוסם לחיצות וגרירה */
	user-select: none;    /* מונע סימון טקסט */
	/*filter: blur(2px) grayscale(50%); /* אפקט ויזואלי של הקפאה */
}

.editor-container {
	display: flex;
	border: 1px solid #ccc;
	font-family: monospace; /* גופן ברוחב קבוע עוזר לדיוק */
	background-color: #fff;
	border-radius: 4px;
	overflow: hidden;
	max-width: 600px; /* שנה לפי הצורך */
}

.line-numbers {
	width: 40px;
	background-color: #f0f0f0;
	border-left: 1px solid #ddd;
	text-align: center;
	color: #999;
	padding: 10px 0;
	overflow: hidden; /* נסנכרן את הגלילה ב-JS */
	user-select: none;
}

.line-numbers span {
	display: block;
	line-height: 22px; /* גובה שורה קבוע */
	font-size: 18px;
}

#words {
	flex: 1;
	border: none;
	outline: none;
	padding: 10px;
	line-height: 22px; /* חייב להיות זהה ל-line-numbers span */
	font-size: 18px;
	font-family: monospace;
	resize: none; /* מומלץ כדי למנוע שיבוש בסנכרון */
	white-space: pre; /* מונע שורות ארוכות מדי שגולשות ומבלבלות את המספור */
	overflow-x: auto;
}

.toggle-btn { cursor: pointer; }
.instructions { color: blue; }
h1, h2 { margin: unset; }

/* ===== חידון - עיצוב שאלות וכפתורי תשובות ===== */

.quiz-question-box {
	background: #f0f4ff;
	border: 2px solid #c0cfff;
	border-radius: 16px;
	padding: 25px 20px;
	margin: 20px auto;
	max-width: 700px;
}

.quiz-question-text {
	font-size: 1.4em;
	font-weight: bold;
	color: #333;
	line-height: 1.6;
}

.quiz-options-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
	max-width: 700px;
	margin: 25px auto;
}

.quiz-option-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 15px;
	font-size: 1.6em;
	font-weight: bold;
	color: #333;
	background: #e0e0e0 !important;
	border: 3px solid #c0c0c0 !important;
	border-radius: 16px;
	cursor: pointer;
	transition: all 0.2s ease;
	aspect-ratio: 1 / 1;
	text-align: center;
	line-height: 1.4;
	word-break: break-word;
	box-sizing: border-box;
}

.quiz-option-btn:hover {
	border-color: #7ba3f7 !important;
	background: #f0f4ff !important;
	transform: scale(1.02);
}

.quiz-option-btn.selected,
.quiz-option-btn.selected:hover,
.quiz-option-btn.selected:active {
	background: #27ae60 !important;
	color: #fff !important;
	border-color: #1e8c4c !important;
}

.quiz-submit-btn {
	display: block;
	margin: 10px auto 0;
	padding: 14px 50px;
	font-size: 1.2em;
	font-weight: bold;
	color: #fff;
	background: #007bff;
	border: none;
	border-radius: 12px;
	cursor: pointer;
	transition: background 0.2s;
}

.quiz-submit-btn:disabled {
	background: #b0b8c4;
	cursor: not-allowed;
}

.quiz-submit-btn:not(:disabled):hover {
	background: #0056b3;
}

.quiz-answered-status {
	max-width: 700px;
	margin: 40px auto;
	padding: 30px 20px;
	background: #e6ffe6;
	border: 2px solid #27ae60;
	border-radius: 16px;
	text-align: center;
	font-size: 1.2em;
	color: #155724;
}

.quiz-wait-msg {
	font-size: 1.3em;
	margin-top: 15px;
	font-weight: bold;
	color: #333;
}