
/* ── Site logo sizes ── */
.site-logo { height: 120px; width: auto; }          /* موبايل: 120px */
@media (min-width: 640px) {
  .site-logo { height: 20px !important; }           /* ديسكتوب: 30px */
}
/* =============================================================
 * GRIFA GAMES — main.css
 * Design Tokens (CSS Custom Properties)
 * -------------------------------------------------------------
 * EDIT-ME FILE for Hostinger AI / non-developers.
 *
 * Every brand color, spacing value, and font setting lives here.
 * Change a variable once → it cascades to every page that links
 * this file.
 *
 * Pages that use Tailwind CDN read these through the `var(--color-brand-300)`
 * syntax in their inline <style> blocks. The Tailwind config in
 * each page's <script> block should stay in sync with the values here.
 * ============================================================= */

/* === BRAND COLORS ===
   Primary green gradient: brand-300 (bright) → brand-500 (deep)
   Dark backgrounds: ink-900 (darkest) → ink-100 (lightest)
   ------------------------------------------------------------------ */
:root {
  /* -- Brand (GRIFA Green) -- */
  --color-brand-50:  #f7ffe6;
  --color-brand-100: #ecffc3;
  --color-brand-200: #d9ff86;
  --color-brand-300: #c5ff4a;   /* ← PRIMARY ACTION COLOR (buttons, highlights) */
  --color-brand-400: #b6ff3d;
  --color-brand-500: #9fe600;   /* ← DEFAULT brand color */
  --color-brand-600: #7ab800;
  --color-brand-700: #5b8a00;
  --color-brand-800: #3d5c00;
  --color-brand-900: #1f2e00;

  /* -- Ink (Dark Neutrals) -- */
  --color-ink-950: #000000;     /* ← Page background */
  --color-ink-900: #070707;
  --color-ink-800: #0e0e0e;     /* ← Card / input backgrounds */
  --color-ink-700: #161616;     /* ← Hover states */
  --color-ink-600: #1f1f1f;
  --color-ink-500: #262626;     /* ← Borders */
  --color-ink-400: #404040;
  --color-ink-300: #737373;     /* ← Muted text */
  --color-ink-200: #a3a3a3;     /* ← Secondary text */
  --color-ink-100: #d4d4d4;

  /* -- Semantic aliases -- */
  --color-primary:      var(--color-brand-300);
  --color-background:   var(--color-ink-950);
  --color-surface:      var(--color-ink-900);
  --color-border:       var(--color-ink-500);
  --color-text:         #ffffff;
  --color-text-muted:   var(--color-ink-200);
  --color-text-faint:   var(--color-ink-300);

  /* -- Special effects -- */
  --glow-brand: 0 0 30px rgba(197, 255, 74, 0.35), 0 0 60px rgba(197, 255, 74, 0.18);
  --glow-brand-sm: 0 0 14px rgba(197, 255, 74, 0.35);
  --gradient-brand: linear-gradient(180deg, #d9ff86, #c5ff4a 50%, #9fe600);
  --gradient-brand-btn: linear-gradient(180deg, #d9ff86, #c5ff4a 55%, #9fe600);

  /* -- Grid background (used across pages) -- */
  --grid-bg: linear-gradient(rgba(197,255,74,.045) 1px, transparent 1px),
             linear-gradient(90deg, rgba(197,255,74,.045) 1px, transparent 1px);
  --grid-bg-size: 56px 56px;
}

/* === TYPOGRAPHY ===
   Fonts are loaded in each page's <head> via Google Fonts CDN.
   ------------------------------------------------------------------ */
:root {
  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;
  --font-cairo: 'Cairo', sans-serif;   /* Arabic / RTL pages */
  --font-mono:  'Fira Code', 'Cascadia Code', monospace;

  /* Font weights */
  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semibold: 600;
  --fw-bold:    700;
  --fw-extrabold: 800;
  --fw-black:   900;
}

/* === SPACING & LAYOUT ===
   ------------------------------------------------------------------ */
:root {
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   20px;
  --radius-2xl:  24px;
  --radius-full: 9999px;

  --max-w-content: 1200px;
  --max-w-wide:    1400px;
  --header-h:      64px;   /* 4rem — must match h-16 in Tailwind */
}

/* === TRANSITIONS ===
   ------------------------------------------------------------------ */
:root {
  --transition-fast:   all .15s ease;
  --transition-normal: all .2s ease;
  --transition-slow:   all .35s ease;
}

/* === BRAND BUTTON (reusable class) ===
   Apply class="btn-brand" to <button> or <a> elements.
   ------------------------------------------------------------------ */
.btn-brand {
  background: var(--gradient-brand-btn);
  color: #000;
  font-weight: var(--fw-extrabold);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .15s, box-shadow .25s, filter .2s;
  box-shadow: 0 6px 20px rgba(197,255,74,.4), inset 0 1px 0 rgba(255,255,255,.5);
}
.btn-brand:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(197,255,74,.55);
  filter: brightness(1.05);
}
.btn-brand:active  { transform: translateY(0); }
.btn-brand:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* === GRIFA WORDMARK ===
   Apply class="grifa-word" to <span> inside logo.
   ------------------------------------------------------------------ */
.grifa-word {
  font-family: var(--font-sans);
  font-weight: var(--fw-black);
  letter-spacing: -0.04em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 28px rgba(197,255,74,.35);
}

/* === GRID BACKGROUND ===
   Apply class="grifa-grid-bg" to sections.
   ------------------------------------------------------------------ */
.grifa-grid-bg {
  background-image: var(--grid-bg);
  background-size:  var(--grid-bg-size);
}

/* === EMOJI FIX ===
   Prevents Arabic font from rendering emojis as squares on iOS.
   ALWAYS use !important to beat body.lang-ar specificity (0,1,1).
   ------------------------------------------------------------------ */
.ios-emoji,
body.lang-ar  .ios-emoji,
body.lang-fr  .ios-emoji,
body.lang-en  .ios-emoji {
  font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji","Twemoji Mozilla", sans-serif !important;
  font-style:  normal !important;
  font-weight: 400   !important;
}

/* === FOCUS VISIBLE ===
   Keyboard navigation ring using brand color.
   ------------------------------------------------------------------ */
:focus-visible {
  outline: 2px solid var(--color-brand-300);
  outline-offset: 2px;
}

/* === GLOBAL OVERFLOW FIX ===
   Prevents fixed/absolute drawers from creating horizontal scroll on mobile.
   ------------------------------------------------------------------ */
html {
  overflow-x: hidden;
  max-width: 100%;
}
body {
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
}

/* === SCROLLBAR ===
   Thin brand-colored scrollbar in modern browsers.
   ------------------------------------------------------------------ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-ink-900); }
::-webkit-scrollbar-thumb { background: var(--color-ink-500); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-brand-500); }

/* === SELECTION ===
   Text selection color.
   ------------------------------------------------------------------ */
::selection {
  background: rgba(197,255,74,.3);
  color: #fff;
}

/* === TOAST NOTIFICATIONS ===
   Shared across all pages that include this file.
   ------------------------------------------------------------------ */
#grifa-toast {
  position: fixed;
  bottom: 24px;
  inset-inline-end: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast-msg {
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  font-size: .85rem;
  font-weight: var(--fw-bold);
  max-width: 320px;
  box-shadow: 0 4px 20px rgba(0,0,0,.6);
  animation: fadeUp .3s ease-out both;
  pointer-events: auto;
}
.toast-msg.success { background: #0e2a0a; border: 1px solid #3a7a20; color: #a8e88a; }
.toast-msg.error   { background: #2a0a0a; border: 1px solid #7a2020; color: #e88a8a; }
.toast-msg.info    { background: #0a1a2a; border: 1px solid #205a7a; color: #8ab4e8; }

/* === KEYFRAMES ===
   ------------------------------------------------------------------ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0);    }
}
@keyframes pulse-ring {
  0%   { transform: scale(1);    opacity: .8; }
  100% { transform: scale(1.6);  opacity: 0;  }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
