/* بطل التمر — warm Baghdad sunset frame around the game canvas; own look */
:root { --ink: #fff; --muted: #ffe7c2; --card: rgba(40, 22, 8, .78); --line: rgba(255, 255, 255, .16); --gold: #ffcf4a; --gold2: #f2961c; --green: #2f9e44; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { background: #1d3b6b; }
body { margin: 0; min-height: 100vh; color: var(--ink); font-family: "Baloo Bhaijaan 2", system-ui, sans-serif; overflow-x: hidden; }
.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(#1d3b6b, #c75b2a 70%, #f2a64b); }
.page { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; padding: max(10px, env(safe-area-inset-top)) 12px calc(18px + 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; }
.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(#ffd75e, #f29a12); color: #4a2400; box-shadow: 0 5px 0 #9a5200; }
.btn-main:active { transform: translateY(3px); box-shadow: 0 2px 0 #9a5200; }
.btn-ghost { background: rgba(255, 255, 255, .12); border: 1px solid var(--line); }

.home { text-align: center; max-width: 520px; margin: 10px auto 0; padding: 14px; border-radius: 26px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 14px 34px rgba(0, 0, 0, .35); }
.home-art { width: min(260px, 70%); aspect-ratio: 1; border-radius: 26px; object-fit: cover; box-shadow: 0 10px 26px rgba(0, 0, 0, .45); }
.home h1 { margin: 8px 0 0; font-size: 40px; color: var(--gold); text-shadow: 0 3px 0 #6b2f00; }
.home p { margin: 4px 0 6px; color: var(--muted); font-weight: 600; }
.how { text-align: right; margin: 12px 0 0; padding: 10px 14px; list-style: none; border-radius: 16px; background: rgba(0, 0, 0, .25); line-height: 1.9; font-weight: 600; font-size: 15px; }
.how b { color: var(--gold); }

.map { max-width: 560px; margin: 8px auto 0; }
.map-head { display: flex; align-items: center; gap: 10px; }
.map-head h2 { flex: 1; margin: 0; font-size: 26px; color: var(--gold); }
.map-head b { background: rgba(0, 0, 0, .3); border-radius: 99px; padding: 3px 12px; }
.world { margin-top: 12px; padding: 12px; border-radius: 22px; border: 1px solid var(--line); background: var(--card) center / cover; position: relative; overflow: hidden; }
.world::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .15)); }
.world.w0 { background-image: url(/assets/datehero/bg_alley.webp?v=1); }
.world.w1 { background-image: url(/assets/datehero/bg_palms.webp?v=1); }
.world.w2 { background-image: url(/assets/datehero/bg_marsh.webp?v=1); }
.world.w3 { background-image: url(/assets/datehero/bg_souq.webp?v=1); }
.world.w4 { background-image: url(/assets/datehero/bg_samarra.webp?v=1); }
.world.w5 { background-image: url(/assets/datehero/bg_basra.webp?v=1); }
.world > * { position: relative; }
.world h3 { margin: 0 0 8px; font-size: 20px; text-shadow: 0 2px 4px #000; }
.lv-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lv { border: 0; border-radius: 18px; padding: 10px 4px; background: linear-gradient(#ffd75e, #f29a12); color: #4a2400; box-shadow: 0 5px 0 #9a5200; display: flex; flex-direction: column; align-items: center; }
.lv b { font-size: 28px; line-height: 1.1; }
.lv small { font-size: 13px; min-height: 18px; }
.lv.lock { background: rgba(255, 255, 255, .25); color: #fff; box-shadow: none; }

body.playing .sinan-credit, body.playing .topline { display: none; }
.play { position: fixed; inset: 0; z-index: 5; display: flex; flex-direction: column; background: #000; padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }
.hud { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: rgba(20, 10, 2, .92); font-weight: 800; }
.hud #hearts { font-size: 18px; letter-spacing: 1px; }
.hud-mid { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; font-size: 15px; }
.hud-mid b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.golds i, .res-stars i { font-style: normal; filter: grayscale(1) brightness(.5); }
.golds i.on, .res-stars i.on { filter: none; }
.dates { display: flex; align-items: center; gap: 3px; color: var(--gold); font-size: 18px; }
.dates img { width: 18px; height: 24px; }
#pauseBtn { width: 36px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .12); }
.stage { position: relative; flex: 1; min-height: 0; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: auto; }
.ctls { direction: ltr; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(20, 10, 2, .92); }
.lr { display: flex; gap: 10px; direction: ltr; }
.ctl { width: 76px; height: 64px; border-radius: 20px; border: 2px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .14); font-size: 26px; font-weight: 800; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; }
.ctl.jump { width: 120px; background: linear-gradient(#ffd75e, #f29a12); color: #4a2400; border-color: transparent; box-shadow: 0 4px 0 #9a5200; font-size: 22px; }
.ctl.on { transform: scale(.94); background: rgba(255, 255, 255, .3); }
.ctl.jump.on { background: linear-gradient(#ffe27a, #ffb347); }
@media (orientation: landscape) and (max-height: 520px) { .ctls { position: absolute; left: 0; right: 0; bottom: 0; background: none; pointer-events: none; } .ctl { pointer-events: auto; opacity: .85; } }

.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(10, 5, 0, .8); }
.modal { width: min(400px, 100%); padding: 18px 16px; border-radius: 24px; background: #3a1f08; border: 1px solid var(--line); text-align: center; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.modal h2 { margin: 0 0 6px; color: var(--gold); }
.res-stars { font-size: 40px; letter-spacing: 6px; }
.sinan-credit { text-align: center; margin-top: 18px; color: var(--muted); font-size: 12px; letter-spacing: 1px; }
.sinan-credit b { color: var(--gold); }
