@font-face {
    font-family: 'Tajawal';
    src: url('Tajawal-Bold.ttf') format('truetype');
    font-weight: 700;
}
@font-face {
    font-family: 'Tajawal';
    src: url('Tajawal-ExtraBold.ttf') format('truetype');
    font-weight: 800;
}
:root {
	--red: #ff5252;
	--green: #4caf50;
	--yellow: #ffd54f;
	--white: #ffffff;
	--blue: #e3f2fd;
	--ink: #1e3a5f;
	--bg: linear-gradient(135deg, #fff8e1 0%, #e3f2fd 100%);
}

* { box-sizing: border-box; }
body {
	margin: 0;
	font-family: 'Tajawal', sans-serif;
	background: var(--bg);
	color: var(--ink);
}
button { font: inherit; cursor: pointer; border: none; }
.app-shell { min-height: 100vh; padding: 20px; display: flex; align-items: center; justify-content: center; }
.screen { display: none; width: 100%; max-width: 940px; }
.screen.active { display: block; animation: popIn 0.35s ease; }
.card {
	background: var(--white);
	border-radius: 28px;
	padding: 24px;
	box-shadow: 0 18px 45px rgba(0,0,0,0.12);
}
.top-stats { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.stat-pill {
	background: var(--white);
	padding: 10px 14px;
	border-radius: 999px;
	display: flex;
	align-items: center;
	gap: 8px;
	box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}
.hero-card { text-align: center; }
.logo-badge {
	width: 72px; height: 72px; margin: 0 auto 12px;
	
}
.hero-card h1 { font-size: 2.2rem; margin: 6px 0; color: var(--red); }
.hero-card p { font-size: 1.05rem; margin: 0 0 12px; }
.hero-letters { font-size: 1rem; font-weight: 800; color: var(--green); letter-spacing: 0.3rem; margin-bottom: 12px; }
.progress-block { margin: 16px 0 20px; }
.progress-track { height: 14px; background: #fff3e0; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--green), #8bc34a); transition: width 0.3s ease; }
.progress-label { margin-top: 8px; font-weight: 700; }
.button-stack { display: grid; gap: 10px; margin-top: 8px; }
.btn {
	width: 100%; padding: 14px 18px; border-radius: 18px; font-weight: 800; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--red); color: white; }
.btn.secondary { background: var(--green); color: white; }
.btn.settings { background: var(--blue); color: var(--ink); }
.btn.wide { max-width: 300px; margin-inline: auto; display: block; }
.stage-list { display: grid; gap: 10px; margin-top: 12px; }
.guide-card { position: relative; }
.guide-list { display: grid; gap: 14px; margin-top: 16px; }
.guide-item { background: #f8fbff; border-radius: 18px; padding: 14px 16px; box-shadow: inset 0 1px 3px rgba(0,0,0,0.05); line-height: 1.6; }
.guide-item ul { margin: 10px 0 0; padding-inline-start: 18px; }
.guide-item li { margin-bottom: 6px; }
.stage-chip {
	background: white; border-radius: 16px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 10px 24px rgba(0,0,0,0.08); border: 2px solid transparent;
}
.stage-chip.locked { opacity: 0.7; }
.stage-chip.unlocked { border-color: var(--green); }
.helper-text { text-align: center; margin-top: 12px; color: var(--ink); }
.learn-card { position: relative; }
.back-btn {
	position: absolute; left: 16px; top: 16px; width: 42px; height: 42px; border-radius: 50%; background: var(--blue); font-size: 1.2rem;
}
.chip-label { display: inline-block; padding: 8px 12px; border-radius: 999px; background: #fff3e0; color: var(--red); font-weight: 700; margin-bottom: 8px; }
.big-letter { font-size: 5rem; color: var(--red); font-weight: 800; text-align: center; margin: 12px 0; }
.shape-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.shape-pill { padding: 10px 14px; background: #fff3e0; border-radius: 16px; font-size: 1.4rem; color: var(--red); }
.icon-btn {
	display: block; margin: 10px auto 16px; width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: white; font-size: 1.6rem;
}
.hint { text-align: center; color: var(--ink); margin-bottom: 10px; }
.image-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 16px; }
.image-item {
	min-height: 150px; border-radius: 24px; background: var(--blue); display: grid; place-items: center; font-size: 3rem; box-shadow: inset 0 2px 6px rgba(255,255,255,0.9); transition: transform 0.2s ease, box-shadow 0.2s ease;
	padding: 12px;
}
.image-item.success { transform: scale(1.03); background: #e8f5e9; }
.challenge-header { text-align: center; margin-bottom: 10px; }
.score-row { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.score-pill { background: var(--white); border-radius: 999px; padding: 10px 14px; font-weight: 700; }
.score-pill.gold { color: var(--red); }
.challenge-arena { min-height: 420px; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; border-radius: 16px; }
.balloons { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }
.balloon {
	position: absolute; bottom: -100px; width: 74px; height: 90px; border-radius: 999px 999px 50% 50%; background: linear-gradient(180deg, #fff, #ffe082); border: 3px solid rgba(255,255,255,0.7); color: var(--red); font-size: 1.6rem; font-weight: 800; box-shadow: 0 12px 20px rgba(0,0,0,0.14); animation: floatUp linear infinite; cursor: pointer; pointer-events: auto;
}
.balloon::after { content: ''; position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%); width: 2px; height: 22px; background: rgba(0,0,0,0.16); }
.balloon.correct { background: linear-gradient(180deg, #fff, #a5d6a7); color: var(--green); }
.balloon.wrong { animation: shake 0.25s ease; }
.balloon.burst { animation: burst 0.4s ease forwards; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; width: 100%; align-items: stretch; }
.option-btn {
	min-height: 140px; border-radius: 24px; background: white; font-size: 2.2rem; box-shadow: 0 14px 24px rgba(0,0,0,0.1); transition: transform 0.2s ease, box-shadow 0.2s ease;
	padding: 18px;
	display: grid;
	place-items: center;
	text-align: center;
}
.option-btn.success { background: #e8f5e9; color: var(--green); transform: scale(1.04); }
.option-btn.wrong { background: #ffebee; color: var(--red); animation: shake 0.25s ease; }
.stage-activity-list { display: grid; gap: 12px; }
.activity-card { background: #f8fbff; border-radius: 18px; padding: 14px; box-shadow: inset 0 1px 2px rgba(0,0,0,0.06); }
.activity-card .activity-btn { margin-top: 10px; width: 100%; border-radius: 14px; background: var(--red); color: white; padding: 10px 12px; }
.finish-card { text-align: center; }
.celebration { font-size: 3rem; margin-bottom: 10px; }
.medal { margin: 14px 0 18px; font-size: 1.35rem; font-weight: 800; color: var(--red); }
.sparkle { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--yellow); animation: sparkle 0.8s ease forwards; }
@keyframes popIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes floatUp { 0% { transform: translateY(0) scale(0.95); } 50% { transform: translateY(-300px) scale(1.03); } 100% { transform: translateY(-600px) scale(1.05); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-4px); } }
@keyframes burst { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.3); opacity: 0; } }
@keyframes sparkle { 0% { transform: scale(0.2); opacity: 1; } 100% { transform: translateY(-40px) scale(1.2); opacity: 0; } }
@media (max-width: 700px) {
	.app-shell { padding: 12px; }
	.card { padding: 18px; border-radius: 22px; }
	.image-grid, .option-grid { grid-template-columns: repeat(2, 1fr); }
	.big-letter { font-size: 4rem; }
}
