/* ════════════════════════════════════════════════
   موعد — عالم العيادات 3D (style.css)
   RTL · أرقام لاتينية
   ════════════════════════════════════════════════ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #0b7961;
  --primary-dark: #096650;
  --ink: #22303a;
  --muted: #6b7885;
  --card: #fffdf9;
  --err: #e05a5a;
  --line: #e6e0d4;
}

html, body {
  width: 100%; height: 100%; overflow: hidden;
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  background: #cfe0ea;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#game-canvas { display: block; width: 100vw; height: 100vh; }

#hud-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; pointer-events: none;
}
#hud-title { background: rgba(34,48,58,0.62); color: #fff; padding: 9px 18px; border-radius: 999px; font-size: 15px; font-weight: 700; backdrop-filter: blur(8px); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
#status-chip { background: rgba(255,255,255,0.9); color: var(--ink); padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 800; backdrop-filter: blur(8px); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }

#look-hint { position: fixed; top: 58px; left: 50%; transform: translateX(-50%); background: rgba(34,48,58,0.5); color: #fff; padding: 6px 14px; border-radius: 999px; font-size: 12.5px; z-index: 10; pointer-events: none; backdrop-filter: blur(8px); }
#controls-help { position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); background: rgba(34,48,58,0.5); color: #fff; padding: 7px 16px; border-radius: 999px; font-size: 12.5px; z-index: 10; pointer-events: none; text-align: center; backdrop-filter: blur(8px); white-space: nowrap; }

#interact-hint {
  position: fixed; top: 40%; left: 50%; transform: translateX(-50%);
  display: none; align-items: center; gap: 10px; z-index: 12; pointer-events: none;
  background: var(--primary); color: #fff; padding: 11px 20px 11px 14px; border-radius: 14px;
  font-size: 17px; font-weight: 800; box-shadow: 0 10px 30px rgba(11,121,97,0.45);
  animation: bob 1.3s ease-in-out infinite;
}
.hint-key { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 8px; background: rgba(255,255,255,0.25); border: 1.5px solid rgba(255,255,255,0.6); border-radius: 8px; font-size: 16px; font-weight: 900; }
@keyframes bob { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-7px); } }

/* toast (تحميل الدخول) */
#toast {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  display: none; z-index: 25;
  background: rgba(20,26,32,0.9); color: #fff;
  padding: 14px 26px; border-radius: 14px; font-size: 16px; font-weight: 700;
  backdrop-filter: blur(6px); box-shadow: 0 12px 34px rgba(0,0,0,0.4);
}

#joystick { position: fixed; bottom: 42px; right: 40px; width: 138px; height: 138px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,0.22), rgba(255,255,255,0.1)); border: 2px solid rgba(255,255,255,0.45); z-index: 15; touch-action: none; box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
#joystick-knob { position: absolute; top: 50%; left: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%; background: rgba(11,121,97,0.92); border: 2px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,0.25); }
#action-btn { position: fixed; bottom: 62px; left: 40px; width: 92px; height: 92px; border-radius: 50%; background: var(--primary); color: #fff; border: 3px solid #fff; font-size: 16px; font-weight: 800; z-index: 15; cursor: pointer; touch-action: none; box-shadow: 0 6px 20px rgba(11,121,97,0.42); }
#action-btn.pulse { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.09); box-shadow: 0 10px 30px rgba(11,121,97,0.6); } }
#jump-btn { position: fixed; bottom: 165px; left: 52px; width: 68px; height: 68px; border-radius: 50%; background: rgba(122,92,176,0.92); color: #fff; border: 3px solid #fff; font-size: 14px; font-weight: 800; z-index: 15; cursor: pointer; touch-action: none; box-shadow: 0 6px 18px rgba(0,0,0,0.22); }
#jump-btn:active { transform: scale(0.94); }

.mobile-only { display: none; }
@media (hover: none) and (pointer: coarse) {
  .mobile-only { display: flex; align-items: center; justify-content: center; }
  .pc-only { display: none; }
  #controls-help { font-size: 11.5px; }
}

/* نموذج الحجز */
#booking-layer { position: fixed; inset: 0; z-index: 20; display: none; align-items: center; justify-content: center; background: rgba(28,38,46,0.55); backdrop-filter: blur(5px); padding: 16px; }
#booking-layer.open { display: flex; }
#booking-panel { position: relative; width: 100%; max-width: 460px; max-height: 88vh; overflow-y: auto; background: var(--card); border-radius: 22px; box-shadow: 0 26px 64px rgba(0,0,0,0.38); animation: pop 0.24s ease; direction: rtl; padding: 28px 24px 24px; }
@keyframes pop { from { transform: scale(0.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
#close-menu { position: absolute; top: 14px; left: 16px; width: 36px; height: 36px; border: none; border-radius: 50%; background: #f0ece2; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
#close-menu:hover { background: #e6e0d0; }
#booking-panel h2 { color: var(--ink); font-size: 22px; margin-bottom: 4px; }
.subtitle { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.subtitle b { color: var(--primary); }
.field-group { margin-bottom: 14px; }
.field-label { display: block; color: var(--ink); font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field-input { width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 15px; font-family: inherit; color: var(--ink); background: #fff; transition: border-color 0.15s; }
.field-input:focus { outline: none; border-color: var(--primary); }
select.field-input { cursor: pointer; }
textarea.field-input { resize: vertical; min-height: 52px; }
.radio-group { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-opt { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; color: var(--ink); }
.radio-opt:has(input:checked) { border-color: var(--primary); background: #f0f8f5; }
.field-error { color: var(--err); font-size: 13px; margin-top: 5px; min-height: 1px; }
.primary-btn { width: 100%; padding: 14px; margin-top: 6px; background: var(--primary); color: #fff; border: none; border-radius: 14px; font-size: 16px; font-weight: 700; font-family: inherit; cursor: pointer; transition: background 0.15s, transform 0.1s; }
.primary-btn:hover { background: var(--primary-dark); }
.primary-btn:active { transform: scale(0.98); }
.primary-btn:disabled { opacity: 0.7; cursor: default; }
#turnstile-container { min-height: 65px; display: flex; }
#booking-success { display: none; text-align: center; padding: 6px 0; }
.success-icon { width: 72px; height: 72px; margin: 0 auto 16px; background: var(--primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 900; }
#booking-success h2 { margin-bottom: 8px; color: var(--ink); }
#booking-success p { color: var(--muted); font-size: 15px; margin-bottom: 6px; }
.patient-number { font-size: 44px; font-weight: 900; color: var(--primary); margin: 10px 0 6px; letter-spacing: 1px; }
.success-note { font-size: 13px !important; margin: 8px 0 20px !important; }
@media (max-width: 480px) { .field-input { font-size: 16px; } }
