@font-face { font-family: 'Heebo'; src: url('../assets/fonts/heebo-variablefont_wght.ttf') format('truetype'); font-weight: 100 900; }
@font-face { font-family: 'SquadaOne'; src: url('../assets/fonts/squadaone-regular.ttf') format('truetype'); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; touch-action: manipulation; }
body { font-family: 'Heebo', Arial, sans-serif; user-select: none; -webkit-user-select: none; }
button { font-family: inherit; border: 0; padding: 0; background: none; cursor: pointer; }

#wrap { position: fixed; inset: 0; background: #000; }
/* 1280x720 stage, letter-boxed and scaled by JS */
#stage { position: absolute; left: 50%; top: 50%; width: 1280px; height: 720px; transform-origin: 0 0; overflow: hidden; background: #000; }
#scene, #fx { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; }
#fx { pointer-events: none; z-index: 30; }

.screen { position: absolute; inset: 0; }
.hidden { display: none !important; }

/* ---------- Splash ---------- */
#splash { z-index: 100; background: #000; display: flex; align-items: center; justify-content: center; cursor: pointer; }
#splashText { color: #fff; font-size: 52px; font-weight: 500; opacity: 0; transition: opacity 1s; }
#splashText.show { opacity: 1; }

/* ---------- Image buttons ---------- */
.img-btn { position: absolute; transition: transform .08s; }
.img-btn img { width: 100%; height: 100%; display: block; pointer-events: none; }
.img-btn:active { transform: scale(.92); }
.btn-default { position: absolute; left: 454px; width: 372px; height: 70px; background: url(../assets/img/btn_default-default-000.png) center/100% 100% no-repeat; transition: transform .08s; }
.btn-default span { display: block; color: #1e1501; font-size: 34px; font-weight: 500; line-height: 66px; }
.btn-default:active { transform: scale(.94); }

/* ---------- Menu ---------- */
#menu { z-index: 10; }
#menuTitle { position: absolute; left: 390px; top: 6px; width: 404px; height: 404px; transform: scale(0); }
#menuTitle.in { animation: popIn .9s cubic-bezier(.34,1.56,.64,1) forwards; }
#btnStart { top: 625px; transform: scale(0); }
#btnStart.in { animation: popIn .6s cubic-bezier(.34,1.56,.64,1) forwards; }
@keyframes popIn { from { transform: scale(0); } to { transform: scale(1); } }

/* ---------- Top-right controls ---------- */
#topbar { position: absolute; inset: 0; pointer-events: none; z-index: 40; }
#topbar > * { pointer-events: auto; }
#btnSound { left: 1108.5px; top: 16.5px; width: 73px; height: 73px; }
#btnFull  { left: 1194.5px; top: 16.5px; width: 73px; height: 73px; }
/* current eazy logo on a white badge, in place of the old white "EZ WAY" logo */
#logo { position: absolute; left: 948px; top: 18px; width: 128px; height: 70px; background: #fff; border-radius: 16px; box-shadow: 0 4px 0 rgba(0,0,0,.15); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .08s; }
#logo:active { transform: scale(.94); }
#logo img { height: 74px; }

/* ---------- HUD ---------- */
#hud { z-index: 20; pointer-events: none; }
#hud button { pointer-events: auto; }
.hud-bg { position: absolute; background: center/100% 100% no-repeat; }
.hud-text { position: absolute; top: 28px; height: 42px; line-height: 42px; color: #ffae00; font-size: 25px; font-weight: 500; text-align: right; white-space: nowrap; }

/* ---------- Question ---------- */
#question { z-index: 15; }
#qBox { position: absolute; left: 251.5px; top: 118.5px; width: 775px; height: 195px; background: url(../assets/img/bg_question-default-000.png) center/100% 100% no-repeat; display: flex; align-items: center; justify-content: center; padding: 0 30px 10px; transform: scale(0); }
#qText { color: rgb(128,51,51); font-size: 38px; font-weight: 400; text-align: center; line-height: 1.25; opacity: 0; transition: opacity .5s; }
.answer { position: absolute; width: 377px; height: 87px; background: url(../assets/img/bg_answer-default-000.png) center/100% 100% no-repeat; display: flex; align-items: center; justify-content: center; padding: 0 12px 6px; transform: scale(0); }
.answer span { color: rgb(102,102,102); font-size: 30px; font-weight: 400; line-height: 1.15; opacity: 0; transition: opacity .5s; }
.answer.correct { background-image: url(../assets/img/bg_answer-default-001.png); }
.answer.wrong   { background-image: url(../assets/img/bg_answer-default-002.png); }
.answer.correct span, .answer.wrong span { color: #fff; }
#question.show #qBox { transform: scale(1); transition: transform 1s cubic-bezier(.34,1.56,.64,1); }
#question.show .answer { transform: scale(1); transition: transform .5s cubic-bezier(.34,1.56,.64,1) .5s; }
#question.text #qText, #question.text .answer span { opacity: 1; }
.answer.bounce { animation: bounce .5s ease-out; }
@keyframes bounce { 0% { transform: scale(.94); } 50% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* ---------- End game ---------- */
#endgame { z-index: 50; }
#endDim { position: absolute; inset: 0; background: url(../assets/img/tiledbackground5.png); opacity: .4; }
#endPanel { position: absolute; left: 321px; top: 111px; width: 638px; height: 398px; background: url(../assets/img/end_game-default-000.png) center/100% 100% no-repeat; }
#endTitle { position: absolute; left: 174px; top: 0; width: 290px; height: 56px; line-height: 50px; text-align: center; color: #ffae00; font-size: 32px; font-weight: 500; }
.info { position: absolute; top: 211.5px; width: 189px; height: 199px; background: url(../assets/img/bg_info-default-000.png) center/100% 100% no-repeat; text-align: center; }
.info > img { display: block; margin: 0 auto; }
.info-label { position: absolute; left: 6px; right: 6px; top: 142px; height: 31px; line-height: 31px; color: #745001; font-size: 21px; font-weight: 500; white-space: nowrap; overflow: hidden; }
#endRays { position: absolute; left: -15.5px; top: -37.5px; width: 220px; height: 220px; opacity: .65; animation: spin 2s linear infinite, pulse 4s ease-in-out infinite; }
@keyframes spin { to { rotate: 360deg; } }
@keyframes pulse { 0%,100% { scale: .91; } 50% { scale: 1.09; } }
#endgame.in #endPanel, #endgame.in .info, #endgame.in .img-btn, #endgame.in #btnSubmit, #endgame.in #btnReview { animation: dropIn .6s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes dropIn { from { transform: translateY(-720px); } to { transform: translateY(0); } }
#feedback { position: absolute; left: 0; right: 0; top: 653.5px; height: 71px; line-height: 71px; background: rgba(0,0,0,.8); color: #fff; font-size: 28px; text-align: center; }

/* ---------- Name modal ---------- */
.modal { position: absolute; inset: 0; z-index: 90; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; }
.modal-card { width: 560px; background: #fff; border-radius: 22px; padding: 28px 36px 24px; text-align: center; box-shadow: 0 8px 0 #472a15; }
.modal-title { font-size: 34px; font-weight: 700; color: #472a15; margin-bottom: 18px; }
#nameInput { width: 100%; font: inherit; font-size: 30px; padding: 10px 16px; border: 3px solid #ffae00; border-radius: 12px; text-align: center; outline: none; }
#nameError { color: #e74c3c; font-size: 22px; min-height: 34px; line-height: 34px; }
.modal-actions { display: flex; align-items: center; justify-content: center; gap: 24px; }
.btn-default.small { position: relative; left: auto; width: 240px; height: 60px; }
.btn-default.small span { line-height: 56px; font-size: 30px; }
.link-btn { font-size: 26px; color: #777; text-decoration: underline; }

/* ---------- Leaderboard + mistakes review: overlays in the eazy look (18.11.2026) ----------
   lavender page, a white rounded card, Avigul titles (the site's font, /students/ezq), Heebo text and numbers,
   quiet buttons (never an orange frame), the chosen tab filled blue */
@font-face { font-family: 'Avigul FM'; src: url('/students/ezq/assets/fonts/AvigulFM-Regular.woff2') format('woff2'), url('/students/ezq/assets/fonts/AvigulFM-Regular.woff') format('woff'); font-weight: 400; font-display: swap; }
.ovl { position: absolute; inset: 0; z-index: 200; background: rgba(217, 223, 242, .97); direction: rtl; display: flex;
  align-items: center; justify-content: center; padding: 14px; font-family: 'Heebo', Arial, sans-serif; color: rgb(10, 38, 46); user-select: text; -webkit-user-select: text; }
.ovl-card { width: 100%; max-width: 640px; max-height: 100%; display: flex; flex-direction: column; background: #fff; border-radius: 16px;
  box-shadow: 0 -4px 40px rgba(76, 156, 178, .20); padding: 16px 18px; box-sizing: border-box; }
.ovl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ovl-title { font-family: 'Avigul FM', 'Heebo', sans-serif !important; font-weight: 400; font-size: 26px; color: rgb(35, 31, 32); }
.ovl-close { background: #F1EFFC; color: #2C2A6B; border-radius: 999px; padding: 8px 18px; font: 600 15px 'Heebo', Arial, sans-serif; }
.ovl-close:hover { background: #E2DDFA; }
.ovl-tabs { display: flex; gap: 8px; margin-bottom: 8px; }
.chip { border: 1px solid rgb(120, 135, 226); background: #fff; color: rgb(10, 38, 46); border-radius: 999px; padding: 6px 16px; font: 500 15px 'Heebo', Arial, sans-serif; }
.chip.on { background: rgb(120, 135, 226); color: #fff; }
.rank-mine { min-height: 22px; font-size: 15px; font-weight: 600; color: rgb(91, 111, 219); margin: 2px 2px 6px; }
.rank-mine:empty { display: none; }
.ovl-list { overflow-y: auto; flex: 1 1 auto; min-height: 120px; padding: 2px; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-bottom: 1px solid rgb(187, 217, 226); font-size: 16px; }
.rank-row:last-child { border-bottom: 0; }
.rank-n { flex: 0 0 30px; height: 30px; line-height: 30px; border-radius: 50%; text-align: center; background: #F1EFFC; color: #2C2A6B; font-weight: 700; font-size: 14px; }
.rank-row.top1 .rank-n { background: #F5B301; color: #fff; }
.rank-row.top2 .rank-n { background: #A7B3C2; color: #fff; }
.rank-row.top3 .rank-n { background: #C98A4B; color: #fff; }
.rank-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-score { flex: 0 0 auto; font-weight: 700; color: #fff; background: linear-gradient(90deg, #00BFBF, #29B1CC); border-radius: 999px; padding: 2px 12px; min-width: 44px; text-align: center; }
.rank-row.me { background: #F1EFFC; border-radius: 12px; }
.rank-msg { text-align: center; padding: 28px 10px; color: rgb(84, 116, 125); font-size: 16px; }
.rv-card { border: 1px solid rgb(187, 217, 226); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; }
.rv-q { display: flex; gap: 10px; align-items: flex-start; font-size: 17px; font-weight: 500; margin-bottom: 8px; line-height: 1.4; }
.rv-n { flex: 0 0 28px; height: 28px; line-height: 28px; border-radius: 50%; background: rgb(120, 135, 226); color: #fff; text-align: center; font: 14px arial, sans-serif; }
.rv-a { border-radius: 12px; padding: 6px 12px; margin-top: 6px; font-size: 15px; }
.rv-a.wrong { border: 1px solid rgb(217, 38, 38); background: rgba(255, 238, 239, 1); }
.rv-a.right { border: 1px solid #30850F; background: rgba(234, 255, 219, 1); }
@media (max-width: 520px) { .ovl-title { font-size: 21px; } .ovl { padding: 8px; } .ovl-card { padding: 12px; } }
.rot-card { max-width: 420px; align-items: center; text-align: center; gap: 10px; padding: 22px 20px; }
.rot-ico { width: 72px; height: 72px; animation: rotHint 2.4s ease-in-out infinite; }
@keyframes rotHint { 0%, 30% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
.rot-txt { margin: 0; font-size: 16px; color: rgb(84, 116, 125); line-height: 1.5; }
#btnReview span { font-size: 27px; white-space: nowrap; }
