/* الدهّان — a cool workshop look: deep teal walls, warm tiles on the canvas, paint-splash accents */
:root { --ink: #fff; --muted: #cfe0ef; --card: rgba(14, 30, 44, .9); --line: rgba(255, 255, 255, .14); --gold: #ffd166; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: #0d1826; }
body { min-height: 100vh; color: var(--ink); font-family: "Baloo Bhaijaan 2", system-ui, sans-serif; overflow-x: hidden;
  background: radial-gradient(circle at 15% 8%, #1d9bf033, transparent 42%), radial-gradient(circle at 88% 88%, #e5383b2b, transparent 45%), linear-gradient(165deg, #16304a, #0f1f31 60%, #0b1522); }
.page { max-width: 560px; margin: 0 auto; padding: max(10px, env(safe-area-inset-top)) 14px calc(20px + env(safe-area-inset-bottom)); }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
[hidden] { display: none !important; }
.topline { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.icon { width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); font-size: 20px; }
.card { margin-top: 12px; padding: 16px; border-radius: 26px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 14px 34px rgba(0, 0, 0, .45); }
.home { text-align: center; }
.home-art { width: min(240px, 66%); aspect-ratio: 1; border-radius: 26px; object-fit: cover; box-shadow: 0 10px 26px rgba(0, 0, 0, .5); }
.home h1 { margin: 8px 0 0; font-size: 42px; background: linear-gradient(90deg, #e5383b, #ffb703, #2fb344, #1d9bf0, #9b5de5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home p { margin: 2px 0 8px; color: var(--muted); font-weight: 600; }
.stars-line b { color: var(--gold); }
.how { text-align: right; margin: 10px 0 0; padding: 10px 14px; list-style: none; border-radius: 16px; background: rgba(0, 0, 0, .26); line-height: 1.9; font-weight: 600; font-size: 14.5px; }
.btn { display: block; width: 100%; margin-top: 10px; border: 0; border-radius: 18px; padding: 13px; font-weight: 800; font-size: 19px; }
.btn-main { background: linear-gradient(135deg, #1d9bf0, #2fb344); color: #fff; box-shadow: 0 5px 0 #11557f; text-shadow: 0 1px 2px #0005; }
.btn-main:active { transform: translateY(3px); box-shadow: 0 2px 0 #11557f; }
.btn-ghost { background: rgba(255, 255, 255, .1); border: 1px solid var(--line); }
.map-head { display: flex; align-items: center; gap: 10px; }
.map-head h2 { flex: 1; margin: 0; font-size: 26px; color: var(--gold); }
.total { font-weight: 800; background: rgba(0, 0, 0, .3); padding: 4px 12px; border-radius: 999px; }
.levels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 12px; }
.lv { aspect-ratio: 1; border: 0; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: linear-gradient(140deg, #2a7fb8, #175683); box-shadow: inset 0 -4px 0 #0004, inset 0 3px 0 #ffffff2e, 0 3px 0 #0005; font-weight: 800; }
.lv b { font-size: 21px; line-height: 1; text-shadow: 0 2px 2px #0005; }
.lv small { font-size: 10px; letter-spacing: -1px; min-height: 13px; color: var(--gold); }
.lv.lock { background: rgba(255, 255, 255, .1); box-shadow: none; color: #fff9; }
body.playing .page { display: none; }
.play { position: fixed; inset: 0; z-index: 5; display: flex; flex-direction: column; padding: env(safe-area-inset-top) 0 calc(6px + env(safe-area-inset-bottom));
  background: linear-gradient(170deg, #17334d, #0d1826 72%); }
.hud { display: flex; align-items: center; gap: 8px; padding: 8px 10px 4px; }
.hbtn { flex: none; width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); font-size: 20px; font-weight: 800; }
.hmid { flex: 1; text-align: center; line-height: 1.25; min-width: 0; }
.hmid > b { display: block; font-size: 17px; color: var(--gold); }
.hmid small { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.hmid small b { color: #fff; }
.cur { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .75); box-shadow: 0 0 14px rgba(255, 255, 255, .35), inset 0 -4px 6px rgba(0, 0, 0, .35); }
.stage { flex: 1; min-height: 0; position: relative; touch-action: none; user-select: none; -webkit-user-select: none; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; direction: ltr; }
.pad { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 0 2px; }
.pad-row { display: flex; gap: 58px; direction: ltr; }
.dir { width: 54px; height: 44px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .09); font-size: 18px; color: var(--muted); }
.dir:active { background: rgba(255, 255, 255, .22); color: #fff; }
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(6, 12, 20, .8); }
.modal { width: min(380px, 100%); padding: 18px 16px; border-radius: 24px; background: #15304a; border: 1px solid var(--line); text-align: center; box-shadow: 0 20px 50px rgba(0, 0, 0, .55); }
.modal h2 { margin: 0 0 6px; color: var(--gold); }
.modal p { margin: 4px 0; font-weight: 700; }
.res-stars { font-size: 44px; letter-spacing: 6px; }
.res-stars i { font-style: normal; display: inline-block; animation: starIn .5s cubic-bezier(.3, 1.8, .5, 1) backwards; }
.res-stars i:nth-child(2) { animation-delay: .25s; } .res-stars i:nth-child(3) { animation-delay: .5s; }
@keyframes starIn { from { transform: scale(0) rotate(-90deg); } }
.sinan-credit { text-align: center; margin-top: 18px; color: var(--muted); font-size: 12px; letter-spacing: 1px; }
.sinan-credit b { color: var(--gold); }
