/* ============================================================
   قدها — تنسيقات اللعبة (مطابقة للتصميم المرجعي)
   شاشة القوانين: خلفية بنفسجي صافي + Stepper + 4 كروت + نقاط زخرفية
   ============================================================ */

.qadha-outer {
	--qa-purple: #492F9B;
	--qa-purple-light: #8C52FF;
	--qa-gold: #EBBA17;
	--qa-coral: #FA826E;
	--qa-green: #19D8B4;
	--qa-card: #643DC3;
	--qa-icon: #482E9B;

	background: var(--qa-purple);
	color: #fff;
	font-family: 'Cairo', 'Tahoma', sans-serif;
	position: relative;
	box-sizing: border-box;
	overflow-x: hidden;
	direction: rtl;
}

.qadha-outer,
.qadha-outer *,
.qadha-outer input,
.qadha-outer button,
.qadha-outer select {
	font-family: 'Cairo', 'Tahoma', Arial, sans-serif !important;
}

.qadha-outer * { box-sizing: border-box; }
/* كانفس اللعبة: يغطي الشاشة كاملة تحت الهيدر، وينمو لو المحتوى أطول */
#qadha-app {
	position: relative;
	z-index: 1;
	min-height: calc(100dvh - 60px);
	min-height: 620px;
	overflow: hidden;
}

/* زخرفة الخلفية الأصلية — طبقة ناعمة فوق الموف ومن خلف المحتوى */
#qadha-app::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 0;
	background-image: url('../img/background-clean.png');
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center;
	opacity: .34;
	pointer-events: none;
	-moz-osx-font-smoothing: grayscale;
}

.qadha-screen { position: relative; z-index: 1; }
.qadha-center { text-align: center; }

.qadha-logo { font-size: 48px; font-weight: 900; margin: 0 0 8px; }
.qadha-subtitle { font-size: 18px; opacity: .85; margin: 0 0 24px; }
.qadha-title { font-size: 26px; font-weight: 800; margin: 0 0 20px; }

/* ===== الأزرار ===== */
/* زر ذهبي زي التصميم: نص أبيض + ظل مزدوج */
.qadha-btn-primary {
	background: var(--qa-gold);
	color: #fff;
	border: none;
	border-radius: 999px;
	min-height: 54px;
	padding: 0 42px;
	font-size: 16px;
	font-weight: 800;
	cursor: pointer;
	margin-top: 16px;
	box-shadow: 0 11px 25px rgba(22, 8, 65, .35), inset 0 -3px 0 rgba(116, 74, 0, .16);
	transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}
.qadha-btn-primary:hover {
	transform: translateY(-3px);
	background: #F1C52B;
	box-shadow: 0 15px 30px rgba(22, 8, 65, .38);
}

.qadha-btn-secondary {
	background: rgba(255, 255, 255, .07);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, .32);
	border-radius: 999px;
	padding: 10px 25px;
	font-weight: 700;
	cursor: pointer;
	margin-top: 16px;
	transition: background .2s ease;
}
.qadha-btn-secondary:hover { background: rgba(255, 255, 255, .15); }

/* زر الرجوع — مطابق للمرجع: مربع صغير شفاف على الشمال */
.qadha-back,
.qadha-hub-back {
	position: absolute;
	z-index: 4;
	left: 7.7%;
	top: 9.2%;
	width: clamp(30px, 2.55vw, 44px);
	height: clamp(28px, 4.25vh, 46px);
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .38);
	border-radius: .55vw;
	background: rgba(255, 255, 255, .04);
	color: #fff;
	display: grid;
	place-items: center;
	cursor: pointer;
	text-decoration: none;
}
.qadha-back svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.qadha-back:hover { background: rgba(255, 255, 255, .14); }
.qadha-hub-back {
	position: static;
	width: auto;
	height: auto;
	border: none;
	background: none;
	gap: 4px;
	color: rgba(255, 255, 255, .75);
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 8px;
}
.qadha-hub-back svg { display: none; }
.qadha-hub-back:hover { color: #fff; background: none; }

/* ===== الـStepper — مطابق للمرجع: دوائر كبيرة وخطوط بينها، RTL ===== */
.qa-stepper {
	width: min(80vw, 720px);
	margin: 0 auto;
	padding-top: clamp(14px, 2vh, 26px);
	position: relative;
	display: flex;
	align-items: flex-start;
	direction: rtl;
}
/* الخط المستمر الخلفي — خلف كل الدوائر */
.qa-stepper::before {
	content: '';
	position: absolute;
	top: calc(clamp(34px, 3.4vw, 46px) / 2);
	left: clamp(6%, 8%, 9%);
	right: clamp(6%, 8%, 9%);
	height: 2px;
	background: rgba(255, 255, 255, .32);
	z-index: 0;
}
.qa-step {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	z-index: 1;
}
.qa-step-circle {
	width: clamp(34px, 3.4vw, 46px);
	height: clamp(34px, 3.4vw, 46px);
	border: 2px solid rgba(255, 255, 255, .5);
	border-radius: 50%;
	background: #4c2a96;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: clamp(13px, 1.25vw, 17px);
	line-height: 1;
	position: relative;
	z-index: 1;
	flex-shrink: 0;
	transition: background .2s, box-shadow .2s, border-color .2s;
}
.qa-step.is-active .qa-step-circle {
	background: #FFFFFF;
	border-color: #FFFFFF;
	color: #4c2a96;
	box-shadow: 0 0 12px rgba(255, 255, 255, .55);
}
.qa-step.is-done .qa-step-circle {
	background: var(--qa-gold);
	border-color: var(--qa-gold);
	color: #fff;
}
.qa-step-label {
	margin-top: 12px;
	color: #fff;
	font-size: clamp(12px, 1.25vw, 16px);
	font-weight: 600;
	line-height: 1.35;
	white-space: nowrap;
	text-align: center;
}
.qa-step.is-active .qa-step-label { font-weight: 900; }
.qa-step.is-done .qa-step-label { opacity: 1; color: #fff; }
.qa-step-line {
	flex: 1 1 auto;
	min-width: 30px;
	height: 0;
	visibility: hidden;
	flex-shrink: 1;
}

/* ===== النقاط الزخرفية التركواز ===== */
.qa-dots-rowset {
	position: absolute;
	z-index: 0;
	top: 17.36%;
	left: 3.36%;
	display: flex;
	flex-direction: column;
	row-gap: 2.41vh;
	pointer-events: none;
	align-items: flex-start;
	direction: ltr;
}
.qa-dots-rowset[data-align="end"] {
	top: 69.19%;
	left: auto;
	right: 1.46%;
	row-gap: 4.17vh;
	align-items: flex-end;
}
.qa-dots-row { display: flex; column-gap: 1.42vw; }
.qa-dot {
	width: clamp(12px, 1.28vw, 37px);
	height: clamp(12px, 1.28vw, 37px);
	border-radius: 50%;
	background: #3083A7;
	display: block;
	flex-shrink: 0;
}

/* ===== ترويسة شاشة القوانين — مواضع مطلقة زي المرجع ===== */
.qa-heading {
	position: absolute;
	inset: 0;
	z-index: 1;
	text-align: center;
	pointer-events: none;
	direction: rtl;
}
.qa-kicker {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	top: 21.8%;
	margin: 0;
	color: #FA826E;
	font-weight: 800;
	font-size: clamp(18px, 3.6vw, 52px);
	line-height: 1.1;
	white-space: nowrap;
}
.qa-title {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	top: 28.8%;
	margin: 0;
	color: #fff;
	font-weight: 900;
	font-size: clamp(26px, 3.15vw, 46px);
	line-height: 1.15;
	white-space: nowrap;
}
.qa-subtitle {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	top: 38%;
	margin: 0 0 18px;
	color: #fff;
	font-weight: 400;
	font-size: clamp(12px, 1.5vw, 22px);
	line-height: 1.437;
	white-space: nowrap;
}

/* ===== الكروت الأربعة — نفس مواضع وأبعاد المرجع بالحرف ===== */
.qa-cards {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
}
.qa-card {
	position: absolute;
	top: 55%;
	width: 14.83%;
	height: 31.48%;
	box-sizing: border-box;
	padding: 0;
	border-radius: 1.05vw;
	background: #643DC3;
	color: #fff;
	text-align: center;
	direction: rtl;
	pointer-events: auto;
}
/* ترتيب المرجع LTR: الاستثناءات أقصى الشمال ثم الفوز ثم النقاط ثم طريقة اللعب */
.qa-card-exceptions { left: 11.25%; top: 54.7%; }
.qa-card-win        { left: 31.81%; }
.qa-card-score      { left: 52.99%; }
.qa-card-play       { left: 73.96%; }

/* أيقونة الكارت — صورة PNG محلّقة فوق الحافة */
.qa-card-icon {
	position: absolute;
	z-index: 1;
	left: 50%;
	top: -8.4vh;
	width: 7.64vw;
	height: 13.58vh;
	transform: translateX(-50%);
	object-fit: contain;
	pointer-events: none;
}
.qa-card h2 {
	position: absolute;
	top: 20%;
	right: 0;
	width: 100%;
	margin: 0;
	color: #fff;
	font-size: clamp(14px, 1.68vw, 25px);
	font-weight: 800;
	line-height: 1.2;
}
.qa-card-copy {
	position: absolute;
	top: 36%;
	right: 0;
	width: 100%;
	padding: 0 1.2vw;
	box-sizing: border-box;
	color: rgba(255, 255, 255, .95);
	font-size: clamp(10px, 1.02vw, 15px);
	font-weight: 400;
	line-height: 2.3;
}
.qa-card-copy p { margin: 0; white-space: nowrap; }
.qa-card-copy strong { color: #FA826E; font-weight: 800; }

/* ===== زر التالي الأبيض — نفس موضع وحجم المرجع ===== */
.qa-next-btn {
	position: absolute;
	z-index: 4;
	left: 44.55%;
	top: 89.75%;
	width: 13.58%;
	height: 5.2%;
	min-width: 120px;
	min-height: 40px;
	padding: 0 1.8vw;
	border: 0;
	border-radius: 999px;
	background: #fff;
	color: #492F9B;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.3vw;
	font-family: 'Cairo', sans-serif;
	font-size: clamp(13px, 1.9vw, 27px);
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
	transition: transform .2s ease, box-shadow .2s ease;
}
.qa-next-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .28); }
.qa-next-btn:active { transform: translateY(0); }
.qa-next-btn svg {
	width: 1.8vw;
	min-width: 18px;
	height: auto;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ===== باقي الشاشات ===== */
#qadha-app > .qadha-screen,
.qadha-screen { padding: 6px 16px 40px; }

.qadha-rules-box {
	background: rgba(255, 255, 255, .08);
	border-radius: 16px;
	padding: 20px 24px;
	max-width: 480px;
	margin: 0 auto 12px;
	text-align: right;
}
.qadha-rules-box ul { margin: 0; padding-right: 20px; }
.qadha-rules-box li { margin-bottom: 10px; line-height: 1.6; }

/* ===== شاشة تقسيم الفريقين — مطابقة للمرجع ===== */
.qa-teams-decor {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	user-select: none;
}
.qa-teams-heading {
	position: absolute;
	z-index: 2;
	top: 22.2%;
	left: 50%;
	transform: translateX(-50%);
	width: max-content;
	max-width: 94vw;
	margin: 0;
	color: #fff;
	font-size: clamp(20px, 3vw, 40px);
	font-weight: 900;
	line-height: 1.18;
	text-align: center;
	white-space: nowrap;
}
.qa-teams-cards { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.qa-team-card {
	position: absolute;
	top: 35.9%;
	width: 16.67%;
	height: 43.7%;
	box-sizing: border-box;
	border-radius: 1.05vw;
	background: #633CC1;
	color: #fff;
	direction: rtl;
	text-align: center;
}
/* الأول يمين والثاني شمال — زي المرجع بالحرف */
.qa-team-card.is-first { left: 50.6%; top: 35.35%; }
.qa-team-card.is-second { left: 33%; }

.qa-team-icon {
	position: absolute;
	z-index: 1;
	top: 4.5%;
	left: 50%;
	width: clamp(64px, 9.5vw, 140px);
	height: clamp(80px, 13.2vh, 130px);
	transform: translateX(-50%);
	object-fit: contain;
	pointer-events: none;
}
.qa-team-card h2 {
	position: absolute;
	top: 35%;
	right: 0;
	width: 100%;
	margin: 0;
	color: #fff;
	font-size: clamp(12px, 1.5vw, 22px);
	font-weight: 800;
	line-height: 1.2;
}
.qa-team-input {
	position: absolute;
	pointer-events: auto;
	top: 57%;
	left: 50%;
	width: clamp(120px, 9.2vw, 180px);
	height: 12.5%;
	box-sizing: border-box;
	padding: 0 1vw;
	transform: translateX(-50%);
	border: 0;
	border-radius: 1vw;
	outline: none;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
	color: #492F9B;
	direction: rtl;
	font-family: 'Cairo', sans-serif !important;
	font-size: clamp(12px, 1.3vw, 19px);
	font-weight: 400;
	line-height: 1;
	text-align: center;
}
.qa-team-input::placeholder { color: #492F9B; opacity: 1; }
/* نقاط الألوان الأربعة — كل فريق يختار بالضغط */
.qa-team-swatches {
	position: absolute;
	pointer-events: auto;
	top: 83%;
	left: 50%;
	transform: translateX(-50%);
	display: inline-flex;
	align-items: center;
	gap: clamp(8px, 0.9vw, 14px);
	z-index: 4;
}
.qa-team-swatch {
	width: clamp(18px, 1.6vw, 26px);
	height: clamp(18px, 1.6vw, 26px);
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, .35);
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
	transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.qa-team-swatch.is-selected {
	border-color: #fff;
	transform: scale(1.12);
	box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
}
.qa-teams-vs {
	position: absolute;
	z-index: 3;
	left: 50%;
	top: 55.1%;
	width: clamp(42px, 3.8vw, 56px);
	height: clamp(42px, 3.8vw, 56px);
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: #fff;
	color: #492F9B;
	display: grid;
	place-items: center;
	direction: ltr;
	font-size: clamp(15px, 1.55vw, 23px);
	font-weight: 900;
	line-height: 1;
}
.qa-teams-next {
	position: absolute;
	z-index: 4;
	left: 44.05%;
	top: 88.5%;
	width: 13.6%;
	height: 5.3%;
	min-width: 120px;
	min-height: 40px;
	padding: 0 1.8vw;
	border: 0;
	border-radius: 999px;
	background: #fff;
	color: #492F9B;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.35vw;
	direction: ltr;
	font-family: 'Cairo', sans-serif;
	font-size: clamp(13px, 1.9vw, 27px);
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
	transition: transform .2s ease, box-shadow .2s ease;
}
.qa-teams-next:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .28); }
.qa-teams-next svg {
	width: 1.8vw;
	min-width: 18px;
	height: auto;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* شريط الأزرار أسفل شاشة الفريقين: الأهداف + التالي */
.qa-teams-actions {
	position: absolute;
	z-index: 4;
	left: 50%;
	top: 88.5%;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 12px;
	direction: rtl;
}
.qa-teams-actions .qa-teams-next {
	position: static;
	width: auto;
	transform: none;
}
.qa-teams-goals {
	width: auto;
	min-width: 140px;
	min-height: 40px;
	padding: 0 1.7vw;
	border: 1px solid rgba(255, 255, 255, .4);
	border-radius: 999px;
	background: rgba(255, 255, 255, .1);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: 'Cairo', sans-serif;
	font-size: clamp(13px, 1.6vw, 22px);
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.qa-teams-goals:hover {
	transform: translateY(-2px);
	background: rgba(255, 255, 255, .2);
	box-shadow: 0 8px 22px rgba(0, 0, 0, .28);
}

/* رسالة الخطأ على كرت الفريق (الاسم/اللون ناقص) */
.qa-team-error {
	position: absolute;
	z-index: 25;
	left: 50%;
	top: 8px;
	transform: translateX(-50%);
	width: max-content;
	max-width: 92%;
	background: rgba(255, 255, 255, .97);
	color: #c0392b;
	border-radius: 999px;
	padding: 6px 16px;
	font-family: 'Cairo', sans-serif;
	font-size: 13px;
	font-weight: 800;
	box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
	animation: qadhaErrorIn .22s ease-out;
	pointer-events: none;
}
@keyframes qadhaErrorIn {
	from { opacity: 0; transform: translateX(-50%) translateY(6px); }
	to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Popup الأهداف (النقاط) */
.qadha-goals-lightbox { display: flex; align-items: center; justify-content: center; }
.qadha-goals-box {
	width: min(480px, 92vw);
	background: linear-gradient(145deg, #3b2483, #2a165e);
	border: 1px solid rgba(255, 255, 255, .22);
	border-radius: 20px;
	padding: 30px 28px;
	color: #fff;
	text-align: center;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
	font-family: 'Cairo', sans-serif;
	animation: qadhaGoalsIn .24s ease-out;
}
@keyframes qadhaGoalsIn {
	from { opacity: 0; transform: translateY(14px) scale(.97); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}
.qadha-goals-box h2 {
	margin: 0 0 6px;
	font-size: clamp(22px, 3vw, 30px);
	font-weight: 900;
}
.qadha-goals-sub {
	margin: 0 0 14px;
	color: rgba(255, 255, 255, .75);
	font-size: 15px;
	font-weight: 600;
}
.qadha-goals-opts,
.qa-goals-opts {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-bottom: 22px;
}
.qa-goal-opt {
	flex: 1 1 0;
	min-width: 96px;
	max-width: 130px;
	background: rgba(255, 255, 255, .1);
	border: 2px solid rgba(255, 255, 255, .3);
	border-radius: 16px;
	padding: 16px 10px;
	color: #fff;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	font-family: 'Cairo', sans-serif;
	transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.qa-goal-opt:hover {
	transform: translateY(-3px);
	background: rgba(255, 255, 255, .16);
	box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
}
.qa-goal-opt.is-selected {
	border-color: #F1C52B;
	background: rgba(241, 197, 43, .16);
	box-shadow: 0 10px 28px rgba(241, 197, 43, .25);
}
.qa-goal-trophy { font-size: 26px; line-height: 1; }
.qa-goal-num { font-size: 26px; font-weight: 900; line-height: 1; }
.qa-goal-label { font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .8); }
.qa-goals-error {
	background: rgba(255, 255, 255, .95);
	color: #c0392b;
	border-radius: 999px;
	padding: 8px 18px;
	font-weight: 800;
	font-size: 14px;
	margin-top: 14px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
	animation: qadhaErrorIn .22s ease-out;
}

/* التصنيفات */
.qadha-cats-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	max-width: 640px;
	margin: 0 auto 18px;
}
.qadha-cat-card {
	background: var(--qa-card);
	border: 1px solid rgba(255, 255, 255, .06);
	border-radius: 20px;
	padding: 20px 10px;
	cursor: pointer;
	position: relative;
	text-align: center;
	box-shadow: 0 10px 0 rgba(26, 13, 80, .56), 0 14px 18px rgba(26, 13, 80, .4), inset 0 1px 0 rgba(255, 255, 255, .035);
	transition: transform .18s ease, background .18s ease;
}
.qadha-cat-card:hover { transform: translateY(-4px); }
.qadha-cat-card.selected { background: var(--qa-purple-light); }
.qadha-cat-icon { font-size: 40px; margin-bottom: 8px; }
.qadha-cat-name { font-size: 14px; font-weight: 600; }
.qadha-check {
	position: absolute;
	top: 8px;
	left: 8px;
	background: #fff;
	color: var(--qa-purple);
	border-radius: 50%;
	width: 20px;
	height: 20px;
	font-size: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.qadha-empty { opacity: .7; padding: 40px 0; }
.qadha-brand-logo { max-height: 40px; max-width: 80%; margin-bottom: 8px; border-radius: 8px; }

/* اللعب */
.qadha-turn-banner {
	display: inline-block;
	padding: 8px 24px;
	border-radius: 999px;
	font-weight: 800;
	color: #fff;
	margin-bottom: 12px;
	box-shadow: 0 4px 12px rgba(18, 6, 60, .3);
}
.qadha-progress { opacity: .7; margin-bottom: 16px; font-size: 14px; }

/* حاوية شاشة السؤال — تصميم المرجع */
.qadha-q-wrap {
	position: relative;
	max-width: 640px;
	margin: 0 auto;
	padding: 18px 0 0;
}
.qadha-cat-badge-line {
	display: inline-block;
	position: relative;
	z-index: 2;
	background: #3B1D7A;
	padding: 10px 40px;
	border-radius: 12px;
	font-size: 20px;
	font-weight: 700;
	color: #fff;
	box-shadow: 0 4px 15px rgba(0, 0, 0, .3);
	margin-top: 20px;
	margin-bottom: 10px;
}
.qadha-question-box {
	background: #5B35B5;
	border-radius: 24px;
	padding: 46px 34px 32px;
	max-width: 640px;
	margin: 0 auto 20px;
	text-align: center;
	position: relative;
	box-shadow: 0 10px 25px rgba(0, 0, 0, .2);
	display: flex;
	flex-direction: column;
	align-items: center;
}
.qadha-timer-icon {
	position: absolute;
	top: 25px;
	left: 25px;
	width: 26px;
	height: 26px;
	color: #fff;
}

/* صف أعلى صندوق السؤال: رقم السؤال يمين، التايمر يسار (ناحية اليمين)
   بملاحظة نظام الـ RTL: "left/end" المعروض كأول في القراءة */
.qadha-question-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin-bottom: 22px;
	gap: 10px;
}
.qadha-timer-display {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(20, 8, 60, .45);
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 999px;
	padding: 6px 16px;
}
.qadha-timer-display .qadha-timer-icon { position: static; width: 20px; height: 20px; }
.qadha-timer-count {
	font-size: 22px;
	font-weight: 800;
	color: #fff;
	min-width: 26px;
	text-align: center;
	line-height: 1;
}
.qadha-timer-count.is-zero { color: var(--qa-coral); }
.qadha-timer-count[style*="coral"], .qadha-timer-count.is-low { color: var(--qa-coral); }
.qadha-question-num {
	background: #3B1D7A;
	padding: 4px 20px;
	border-radius: 8px;
	font-size: 14px;
	margin: 0;
}
.qadha-question-text {
	font-size: 22px;
	font-weight: 800;
	color: #FFFFFF;
	line-height: 1.6;
	margin: 0 0 25px;
	max-width: 680px;
}
.qadha-question-image { max-width: 100%; max-height: 220px; border-radius: 12px; margin: 0 0 12px; }
.qadha-reveal-btn {
	background: #F7C92B;
	color: #2A105C;
	border: none;
	padding: 10px 26px;
	border-radius: 12px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba(0, 0, 0, .2);
	transition: transform .2s, background .2s;
	margin-top: 10px;
}
.qadha-reveal-btn:hover { background: #FFE066; transform: translateY(-2px); }

/* ====== صفحة أرقام الأسئلة (مربعات 1-6) ====== */
.qadha-num-panel {
	background: #5B35B5;
	border-radius: 24px;
	padding: 30px 26px 26px;
	max-width: 520px;
	margin: 0 auto;
	text-align: center;
	box-shadow: 0 10px 25px rgba(0, 0, 0, .2);
}
.qadha-num-title {
	font-size: 18px;
	font-weight: 700;
	color: #fff;
	margin: 0 0 20px;
}
.qadha-num-home-btn { margin-top: 24px; display: inline-flex; }
.qadha-num-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}
.qadha-num-square {
	aspect-ratio: 1 / 1;
	background: #3B1D7A;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
	border-radius: 16px;
	color: #fff;
	font-size: 26px;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	user-select: none;
	transition: transform .15s, background .2s, box-shadow .2s;
}
.qadha-num-square:hover {
	background: #4a2a96;
	transform: translateY(-2px);
	box-shadow: 0 8px 18px rgba(0, 0, 0, .35);
}
.qadha-num-square.is-locked {
	background: var(--qa-gold);
	color: #2A105C;
	cursor: default;
	transform: none;
	box-shadow: 0 4px 10px rgba(0, 0, 0, .2);
}
.qadha-num-square.is-out {
	opacity: .28;
	cursor: not-allowed;
	transform: none;
}
.qadha-continue-row { margin-top: 16px; }
.qadha-answer-reveal {
	background: transparent;
	color: #fff;
	padding: 0;
	margin: 0 0 6px;
	text-align: center;
	max-width: none;
	width: 100%;
}
.qadha-card-wrapper.qadha-wrong .qadha-answer-label,
.qadha-card-wrapper.qadha-wrong .qadha-answer-text {
	color: #fff !important;
	display: block;
	visibility: visible;
}
.qadha-answer-label { font-size: 16px; opacity: .75; margin: 0 0 6px; font-weight: 700; }
.qadha-answer-text {
	font-size: 16px;
	font-weight: 600;
	margin: 0;
	word-break: break-word;
	background-color: #311568;
	padding: 8px 14px;
	border-radius: 5px;
}
.qadha-answer-img-wrap {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
}
.qadha-answer-img {
	display: block;
	max-width: 100%;
	max-height: 200px;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 8px;
	margin: 0 auto;
	cursor: zoom-in;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
	transition: transform .15s ease;
}
.qadha-answer-img:hover { transform: scale(1.02); }

/* ===== تصميم بطاقات الصح / الخطأ (شاشة عرض الإجابة) ===== */
.qadha-cards-container {
	display: flex;
	justify-content: center;
	align-items: stretch;
	gap: 28px;
	flex-wrap: wrap;
	margin-top: 14px;
}

.qadha-card-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 250px;
}

.qadha-card-header {
	background: #311568;
	color: #fff;
	padding: 8px 30px;
	border-radius: 10px;
	font-size: 17px;
	font-weight: 700;
	margin-bottom: -15px;
	z-index: 2;
	box-shadow: 0 4px 10px rgba(0, 0, 0, .3);
}

.qadha-card-body {
	background: #6b3cc9;
	color: #fff;
	border-radius: 20px;
	width: 100%;
	padding: 20px 20px 25px;
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	box-shadow: 0 10px 25px rgba(0, 0, 0, .2);
}

.qadha-icon-circle {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 20px 0 18px;
	position: relative;
	font-size: 52px;
	line-height: 1;
}
.qadha-card-wrapper.qadha-correct .qadha-icon-circle {
	background: #fff;
	color: #6b3cc9;
}
.qadha-card-wrapper.qadha-wrong .qadha-icon-circle {
	background: var(--qa-coral);
	color: #fff;
}

.qadha-confetti {
	position: absolute;
	width: 100%;
	height: 100%;
	pointer-events: none;
}
.qadha-confetti::before,
.qadha-confetti::after {
	content: '✦';
	position: absolute;
	font-size: 16px;
}
.qadha-confetti::before { color: #f1c40f; top: -8px; right: 6px; }
.qadha-confetti::after { color: #3498db; bottom: -2px; left: 6px; }

.qadha-points {
	font-size: 17px;
	font-weight: 700;
	margin-bottom: 14px;
}

.qadha-card-wrapper[data-verdict] {
	cursor: pointer;
	transition: transform .2s, box-shadow .2s, border-color .2s;
}
.qadha-card-wrapper[data-verdict]:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 26px rgba(0, 0, 0, .35);
}
.qadha-card-tap {
	display: block;
	margin-top: 12px;
	font-size: 13px;
	font-weight: 700;
	opacity: .75;
}
.qadha-btn-secondary {
	margin-top: 6px;
	background: transparent;
	color: #ffe066;
	border: 1px solid rgba(255, 224, 102, .55);
	padding: 9px 30px;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: transform .2s, background .2s;
}
.qadha-btn-secondary:hover { background: rgba(255, 224, 102, .15); transform: translateY(-2px); }

.qadha-answer-master .qadha-question-box { display: none; }

.qadha-brand-strip {
	margin-top: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
}
.qadha-brand-strip img { max-height: 32px; border-radius: 6px; }
.qadha-discount {
	background: var(--qa-gold);
	color: #fff;
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 13px;
	font-weight: 700;
}

.qadha-scoreboard {
	display: flex;
	justify-content: center;
	gap: 30px;
	font-weight: 700;
	margin-top: 45px;
	margin-bottom: 30px;
}

/* النتيجة النهائية */
.qadha-final-scores {
	display: flex;
	justify-content: center;
	gap: 30px;
	margin-bottom: 20px;
}
.qadha-final-scores > div {
	background: var(--qa-card);
	border: 1px solid rgba(255, 255, 255, .13);
	border-radius: 17px;
	padding: 16px 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	font-size: 22px;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
	#qadha-app {
		height: auto;
		min-height: calc(100dvh - 60px);
		overflow: visible;
		display: flex;
		flex-direction: column;
		align-items: center;
		padding-bottom: 26px;
	}
	.qa-stepper { width: min(100%, 760px); }

	/* شاشة القوانين: من التخطيط المطلق لعمود مرن */
	.qa-heading {
		position: static;
		pointer-events: auto;
		width: 100%;
		padding: 8px 16px 2px;
	}
	.qa-kicker,
	.qa-title,
	.qa-subtitle { position: static; transform: none; white-space: normal; }
	.qa-cards {
		position: static;
		display: grid;
		grid-template-columns: repeat(4, 1fr);
		gap: 44px 14px;
		padding: 40px 20px 4px;
		pointer-events: auto;
	}
	.qa-card {
		position: relative;
		left: auto !important;
		top: auto !important;
		width: auto;
		height: auto;
		min-height: 210px;
		border-radius: 16px;
		padding: 42px 12px 18px;
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 8px;
	}
	.qa-card h2,
	.qa-card-copy { position: static; width: 100%; padding: 0; }
	.qa-card-copy p { white-space: normal; line-height: 1.9; font-size: clamp(11px, 1.3vw, 14px); }
	.qa-card-icon {
		width: clamp(50px, 5.6vw, 66px);
		height: clamp(62px, 7vw, 84px);
		top: -34px;
	}
	.qa-next-btn {
		position: static;
		margin-top: 24px;
		display: inline-flex;
		width: auto;
		height: auto;
		min-width: 150px;
		min-height: 48px;
		padding: 12px 40px;
		gap: 10px;
		font-size: 17px;
	}

	/* شاشة الفريقين: عمود واحد */
	.qa-teams-heading {
		position: static;
		transform: none;
		width: auto;
		margin: 16px auto 0;
		white-space: normal;
		padding: 0 16px;
		font-size: clamp(24px, 6vw, 34px);
	}
	.qa-teams-cards {
		position: static;
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 18px;
		padding-top: 22px;
		pointer-events: auto;
	}
	.qa-team-card {
		position: relative !important;
		left: auto !important;
		top: auto !important;
		width: min(320px, 88vw);
		height: auto;
		min-height: 235px;
		padding: 22px 14px 20px;
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 13px;
	}
	.qa-team-icon { position: static; transform: none; width: 76px; height: 88px; }
	.qa-team-card h2,
	.qa-team-input,
	.qa-team-swatches { position: static; transform: none; }
	.qa-team-input { width: min(230px, 82%); height: 44px; border-radius: 11px; font-size: 15px; }
	.qa-teams-vs { position: static; transform: none; margin: -4px 0; }
	.qa-teams-actions {
		position: static;
		transform: none;
		flex-direction: column;
		gap: 10px;
		margin-top: 20px;
		width: 100%;
		align-items: stretch;
	}
	.qa-teams-actions .qa-teams-next {
		position: static;
		width: auto;
		height: auto;
		min-height: 48px;
		padding: 12px 40px;
		gap: 10px;
		font-size: 17px;
	}
	.qa-teams-goals {
		min-height: 48px;
		min-width: 0;
		padding: 12px 40px;
		font-size: 16px;
	}
}

@media (max-width: 600px) {
	#qadha-app { min-height: calc(100dvh - 58px); }
	.qa-stepper { width: 100%; }
	.qadha-back { top: 8px; left: 10px; width: 38px; height: 38px; }
	.qadha-screen, #qadha-app > .qadha-screen { padding-top: 44px; }
	.qa-stepper:not(.qadha-hub-stepper) { padding-top: 46px; }
	.qa-step-circle { width: clamp(38px, 10vw, 46px); height: clamp(38px, 10vw, 46px); font-size: clamp(13px, 3.5vw, 17px); }
	.qa-step-label { font-size: clamp(9px, 2.6vw, 12px); max-width: 68px; white-space: normal; }
	.qa-stepper::before { left: 9%; right: 9%; }
	.qa-kicker { font-size: clamp(20px, 6.5vw, 30px); }
	.qa-title { font-size: clamp(26px, 8vw, 38px); }
	.qa-subtitle { font-size: clamp(11px, 3.2vw, 15px); }
	.qa-cards { grid-template-columns: repeat(2, 1fr); gap: 40px 10px; padding-inline: 14px; }
	.qa-card-copy p { font-size: 10.5px; line-height: 1.75; }
	.qa-card h2 { font-size: 14px; }
	.qa-dots-rowset { left: 1.5%; }
	.qa-dots-rowset[data-align="end"] { right: 1.5%; }

	.qadha-cats-grid { grid-template-columns: repeat(2, 1fr); }
	.qadha-scoreboard { gap: 16px; flex-wrap: wrap; }
	.qadha-final-scores { gap: 14px; }
	.qadha-cards-container { gap: 18px; }
	.qadha-card-wrapper { width: 100%; max-width: 300px; }
	.qadha-btn-primary { min-height: 50px; padding: 0 32px; }
	.qadha-cat-badge-line { font-size: 16px; padding: 8px 24px; }
	.qadha-question-box { padding: 42px 20px 24px; }
	.qadha-question-text { font-size: 19px; }
	.qadha-num-grid { gap: 10px; }
	.qadha-num-square { font-size: 22px; border-radius: 12px; }
	.qadha-num-panel { padding: 22px 16px 18px; }
}

/* ====== هدف النقاط + إنهاء اللعبة (التحديث الجديد) ====== */
.qadha-score-opt .qadha-cat-icon { font-size: 28px; }
.qadha-score-opt .qadha-cat-name { font-size: 17px; font-weight: 800; }
.qadha-cat-card.is-selected,
.qadha-score-opt.is-selected {
	border-color: #fff;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 10px 0 rgba(26, 13, 80, .56), 0 14px 18px rgba(26, 13, 80, .4);
	transform: translateY(-2px);
}
.qadha-btn-end {
	background: transparent;
	border: 1.5px solid rgba(255, 255, 255, .35);
	color: rgba(255, 255, 255, .7);
	border-radius: 24px;
	padding: 10px 28px;
	font-family: 'Cairo', sans-serif;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	margin-top: 16px;
	display: block;
	margin-left: auto;
	margin-right: auto;
}
.qadha-btn-end:hover { border-color: rgba(255, 255, 255, .7); color: #fff; }

/* ====== تطوير المظهر — أيقونات التصنيفات الأصلية ====== */
.qadha-cat-badge {
	width: clamp(64px, 9vw, 86px);
	height: clamp(64px, 9vw, 86px);
	margin: 0 auto 10px;
	border-radius: 14px;
	background: rgba(255, 255, 255, .12);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: visible;
}
.qadha-cat-badge .qadha-cat-img {
	width: clamp(52px, 7vw, 70px);
	height: clamp(52px, 7vw, 70px);
	object-fit: contain;
	display: block;
}
.qadha-cat-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 130px;
}
.qadha-cat-card .qadha-cat-img {
	width: clamp(72px, 10vw, 96px);
	height: clamp(72px, 10vw, 96px);
	object-fit: contain;
	display: block;
	margin-bottom: 8px;
}
.qadha-cat-card:hover {
	transform: translateY(-4px);
	border-color: rgba(255, 255, 255, .35);
	box-shadow: 0 14px 0 rgba(26, 13, 80, .56), 0 18px 24px rgba(26, 13, 80, .42), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.qadha-cat-name {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

/* رأس شاشة التصنيف الفرعي: أيقونة التصنيف الرئيسي فوق العنوان */
.qadha-main-header {
	margin: 4px auto 18px;
}
.qadha-main-badge {
	width: clamp(64px, 8vw, 86px);
	height: clamp(64px, 8vw, 86px);
	border-radius: 18px;
	margin-bottom: 10px;
	background: rgba(255, 255, 255, .14);
	box-shadow: 0 10px 0 rgba(26, 13, 80, .5), inset 0 1px 0 rgba(255, 255, 255, .1);
}
.qadha-main-badge .qadha-cat-img {
	width: clamp(54px, 6vw, 72px);
	height: clamp(54px, 6vw, 72px);
}
.qadha-main-badge .qadha-cat-icon {
	font-size: 40px;
}
.qadha-main-header .qadha-title {
	margin: 0;
}

/* شاشة التصنيف الفرعي تعرض أيقونة التصنيف الرئيسي */
.qadha-sub-cat .qadha-cat-badge {
	background: rgba(255, 255, 255, .10);
}

/* ====== شاشة النتيجة — أقرب للمرجع ====== */
.qadha-scoreboard {
	gap: clamp(20px, 4vw, 30px);
}
.qadha-scoreboard span {
	background: rgba(255, 255, 255, .10);
	border: 1px solid rgba(255, 255, 255, .18);
	border-radius: 999px;
	padding: 8px 18px;
	font-weight: 800;
}
.qadha-final-scores {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin: 4px auto 20px;
}
.qadha-final-scores > div {
	background: rgba(255, 255, 255, .10);
	border: 1px solid rgba(255, 255, 255, .16);
	border-radius: 20px;
	padding: 20px;
	min-width: 160px;
}
.qadha-final-scores span {
	display: block;
	font-weight: 800;
	font-size: 16px;
	margin-bottom: 8px;
}
.qadha-final-scores strong {
	font-size: 40px;
	line-height: 1;
}

/* ====== رسالة التصنيف غير المتاح (العلامات التجارية) ====== */
.qadha-cat-card { position: relative; }
.qadha-locked-notice {
	position: absolute;
	z-index: 20;
	left: 50%;
	bottom: -8px;
	transform: translateX(-50%);
	width: max-content;
	max-width: 90%;
	background: rgba(20, 8, 60, .97);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, .4);
	border-radius: 12px;
	padding: 8px 14px;
	font-size: 13px;
	font-weight: 700;
	text-align: center;
	box-shadow: 0 10px 22px rgba(0, 0, 0, .35);
	animation: qadhaNoticeIn .22s ease-out;
}
@keyframes qadhaNoticeIn {
	from { opacity: 0; transform: translateX(-50%) translateY(6px); }
	to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.qadha-cat-card.is-locked { opacity: .45; }

/* التنسيق المقفول: تظليل خفيف على الكارت نفسه */
.qadha-cat-card.qadha-locked-card {
	cursor: default;
	box-shadow: 0 10px 0 rgba(26, 13, 80, .56), 0 14px 18px rgba(26, 13, 80, .4), inset 0 1px 0 rgba(255, 255, 255, .035);
}

/* ====== Popup عرض صورة الإجابة بالحجم الكامل ====== */
.qadha-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100;
	background: rgba(10, 4, 40, .92);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	animation: qadhaLightboxIn .2s ease-out;
}
.qadha-lightbox img {
	max-width: 92vw;
	max-height: 88vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 10px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
}
.qadha-lightbox-close {
	position: absolute;
	top: 18px;
	right: 18px;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, .16);
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s ease, transform .15s ease;
}
.qadha-lightbox-close:hover { background: rgba(255, 255, 255, .32); transform: scale(1.08); }
@keyframes qadhaLightboxIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}
