:root { --glass: rgba(0,0,0,0.42); --fg: #f5f5f5; --dim: rgba(255,255,255,0.62); --accent: #ffd27a; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: #000; color: var(--fg);
  font-family: -apple-system, "Segoe UI", Roboto, "Noto Naskh Arabic", "Cairo", Tahoma, sans-serif; touch-action: none; overscroll-behavior: none; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

#hud-top { position: fixed; top: env(safe-area-inset-top, 0); right: 0; left: 0; text-align: center; padding: 10px 12px 6px; pointer-events: none;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9); }
.clock { font-size: 34px; font-weight: 700; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.date { font-size: 14px; opacity: 0.92; }
.hijri { font-size: 12px; opacity: 0.7; }

#hud-actions { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); left: 10px; display: flex; flex-direction: column; gap: 10px; }
.icon-btn { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25); background: var(--glass); color: #fff;
  font-size: 20px; display: grid; place-items: center; backdrop-filter: blur(8px); cursor: pointer; }
.icon-btn.active { background: rgba(255,210,122,0.85); color: #000; border-color: var(--accent); }

.look { position: fixed; top: 50%; left: 50%; transform: translate(-50%, 28px); background: var(--glass); backdrop-filter: blur(8px);
  padding: 6px 14px; border-radius: 20px; font-size: 14px; pointer-events: none; white-space: nowrap; max-width: 90vw; overflow: hidden; text-overflow: ellipsis; }
.look:empty { display: none; }
/* crosshair */
body::after { content: ""; position: fixed; top: 50%; left: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border: 1.5px solid rgba(255,255,255,0.7);
  border-radius: 50%; pointer-events: none; box-shadow: 0 0 4px rgba(0,0,0,0.8); }

#hud-bottom { position: fixed; bottom: env(safe-area-inset-bottom, 0); left: 0; right: 0; display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px; pointer-events: none; text-shadow: 0 1px 6px rgba(0,0,0,0.9); font-size: 14px; }
.fps { font-size: 11px; opacity: 0.55; font-variant-numeric: tabular-nums; }

#hud-panel { position: fixed; bottom: 0; left: 0; right: 0; max-height: 70vh; overflow-y: auto; background: rgba(10,10,14,0.88); backdrop-filter: blur(14px);
  border-radius: 18px 18px 0 0; padding: 16px 18px calc(18px + env(safe-area-inset-bottom, 0)); transform: translateY(105%); transition: transform 0.3s ease;
  font-size: 14px; line-height: 1.65; box-shadow: 0 -8px 30px rgba(0,0,0,0.6); }
#hud-panel.open { transform: translateY(0); }
#hud-panel h2 { margin: 0 0 8px; font-size: 18px; color: var(--accent); }
.row { padding: 8px 0; border-top: 1px solid rgba(255,255,255,0.08); }
.dim { color: var(--dim); }
.small { font-size: 12px; }
.warn { color: #ffb4a2; }

#loading { position: fixed; inset: 0; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  z-index: 10; transition: opacity 0.6s ease; font-size: 15px; text-align: center; padding: 20px; }
#loading.hidden { opacity: 0; pointer-events: none; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.15); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#debug-banner { position: fixed; top: 0; left: 0; right: 0; background: #b3261e; color: #fff; font-size: 12px; text-align: center; padding: 4px; z-index: 5; }
