/* ============================================================
   صفحات الموقع (/mafia، /games…): نفس هوية اللعبة (الأصفر، Lalezar، الأزرار اللي بتنكبس)
   بس كصفحات قراءة طويلة. زر "ابدأ اللعب الآن" ثابت تحت من أول الصفحة لآخرها.
   ممنوع إيموجي قبل عناوين الأقسام (h2) — الإيموجي للمحتوى بس.
   ============================================================ */

.site { --sticky-h: 78px; padding-bottom: calc(var(--sticky-h) + env(safe-area-inset-bottom)); overflow-x: hidden; }
.site main { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.block p a, .block li a, .faq a { color: var(--accent); }
.site p { margin: 0 0 1em; }
.site.home { padding-bottom: env(safe-area-inset-bottom); }
.num { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---------- الشريط العلوي ---------- */
.site-top {
  max-width: 1080px; margin: 0 auto; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text) !important; text-decoration: none; }
.brand span { font-family: var(--font-display); font-size: 1.45rem; line-height: 1; }
.logo { width: 38px; height: 38px; flex: none; filter: drop-shadow(0 3px 0 var(--edge)); }
.top-links a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 16px; border-radius: 999px;
  background: var(--panel); color: var(--text); font-weight: 800; text-decoration: none;
  box-shadow: 0 3px 0 var(--edge);
}
.top-links a:hover { background: var(--panel-2); }

.crumbs ol { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: .9rem; color: var(--faint); }
.crumbs li + li::before { content: '/'; margin-inline-end: 6px; color: var(--line); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

/* ---------- البطل ---------- */
.hero { display: grid; gap: 28px; align-items: center; padding: 22px 0 18px; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px !important;
  padding: 6px 14px; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent); font-weight: 800; font-size: .92rem; box-shadow: inset 0 0 0 2px var(--accent-line);
}
.kicker-emoji { font-size: 1.15rem; display: inline-block; transform: rotate(-10deg); }
.hero h1 {
  font-size: clamp(2.5rem, 9vw, 4.4rem); line-height: 1.08; margin: 0 0 14px;
  text-shadow: 0 5px 0 var(--accent-edge), 0 18px 40px #000a;
}
.hero .lead { font-size: clamp(1.08rem, 2.6vw, 1.3rem); color: var(--muted); max-width: 34em; line-height: 1.7; }
.facts { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 14px;
  background: var(--panel); font-weight: 800; font-size: .95rem; box-shadow: 0 3px 0 var(--edge);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hero-cta .btn.big { font-size: 1.3rem; min-height: 64px; padding-inline: 30px; }
.cta-note { margin: 12px 0 0 !important; color: var(--faint); font-weight: 600; font-size: .95rem; }

/* رسمة الأجهزة: تلفزيون + جوال */
.hero-art { position: relative; min-height: 300px; display: grid; place-items: center; }
.tv {
  position: relative; width: min(100%, 420px); aspect-ratio: 16 / 10;
  background: #0d0c12; border-radius: 22px; padding: 12px;
  box-shadow: 0 8px 0 var(--edge), 0 30px 60px -20px #000, inset 0 0 0 2px var(--line);
  transform: rotate(2deg);
}
.tv-screen {
  height: 100%; border-radius: 12px; display: grid; place-content: center; gap: 6px; text-align: center; padding: 16px; padding-inline-end: 34%;
  background:
    radial-gradient(ellipse 80% 70% at 50% 0%, #ffc53d2e, transparent 70%),
    linear-gradient(160deg, #2a2438, #17141f);
}
.tv-screen b { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.3rem, 4vw, 1.9rem); color: var(--accent); line-height: 1.2; }
.tv-screen small { color: var(--muted); font-weight: 700; font-size: .95rem; }
.tv-stand { position: absolute; left: 50%; bottom: -22px; width: 90px; height: 14px; transform: translateX(-50%); background: #0d0c12; border-radius: 0 0 10px 10px; box-shadow: 0 4px 0 var(--edge); }
.phone {
  position: absolute; inset-inline-end: 4%; bottom: -6px; width: 128px; aspect-ratio: 9 / 18;
  background: #0d0c12; border-radius: 26px; padding: 8px;
  box-shadow: 0 8px 0 var(--edge), 0 24px 40px -10px #000, inset 0 0 0 2px var(--line);
  transform: rotate(-8deg); animation: phoneFloat 5s ease-in-out infinite;
}
.phone-screen {
  height: 100%; border-radius: 19px; display: grid; place-content: center; justify-items: center; gap: 4px; text-align: center; padding: 10px;
  background: linear-gradient(170deg, #2e2939, #1d1a25);
}
.phone-emoji { font-size: 2.9rem; line-height: 1.1; filter: drop-shadow(0 4px 0 #0007); transform: rotate(-6deg); }
.phone-screen b { font-family: var(--font-display); font-weight: 400; font-size: 1.1rem; line-height: 1.2; }
.phone-screen small { color: var(--muted); font-size: .72rem; line-height: 1.4; }
.spark { position: absolute; color: var(--accent); font-size: 1.4rem; animation: twinkle 3s ease-in-out infinite; }
.spark.s1 { top: 4%; inset-inline-start: 6%; }
.spark.s2 { top: 18%; inset-inline-end: 2%; font-size: 1rem; animation-delay: .8s; }
.spark.s3 { bottom: 10%; inset-inline-start: 14%; font-size: .9rem; animation-delay: 1.6s; }
@keyframes phoneFloat { 0%, 100% { transform: rotate(-8deg) translateY(0); } 50% { transform: rotate(-6deg) translateY(-8px); } }
@keyframes twinkle { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }

.emoji-cloud { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 360px; margin: 0 auto; }
.emoji-cloud span {
  display: grid; place-items: center; aspect-ratio: 1; font-size: clamp(2.4rem, 9vw, 3.4rem);
  background: var(--panel); border-radius: 24px; box-shadow: 0 5px 0 var(--edge);
}
.emoji-cloud span:nth-child(odd) { transform: rotate(-6deg); }
.emoji-cloud span:nth-child(even) { transform: rotate(5deg) translateY(10px); }

/* ---------- فهرس الصفحة ---------- */
.toc { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px 12px; margin: 8px 0 4px; scrollbar-width: none; }
.toc::-webkit-scrollbar { display: none; }
.toc a {
  flex: none; padding: 7px 14px; border-radius: 999px; background: var(--bg-2); color: var(--muted);
  text-decoration: none; font-weight: 800; font-size: .9rem; box-shadow: inset 0 0 0 2px var(--line);
}
.toc a:hover { color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent-line); }

/* ---------- الأقسام ---------- */
.content { max-width: 860px; margin: 0 auto; }
.block { padding: 34px 0 6px; scroll-margin-top: 16px; }
.block > h2 { font-size: clamp(1.7rem, 5vw, 2.3rem); margin-bottom: 14px; }
.block > h2::after { content: ''; display: block; width: 56px; height: 5px; margin-top: 8px; border-radius: 4px; background: var(--accent); box-shadow: 0 3px 0 var(--accent-edge); }
.block p, .block li { font-size: 1.06rem; line-height: 1.95; }
.block .intro { color: var(--muted); }
.block b { color: var(--text); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: none; }
.steps li { display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: var(--panel); border-radius: 18px; box-shadow: 0 4px 0 var(--edge); }
.steps h3 { margin: 2px 0 4px; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.75; }
.step-n {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px;
  background: var(--accent); color: var(--accent-ink); font-family: var(--font-display); font-size: 1.4rem;
  box-shadow: 0 3px 0 var(--accent-edge); transform: rotate(-6deg);
}

.info-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.info-card { position: relative; padding: 18px 16px 14px; background: var(--panel); border-radius: 20px; box-shadow: 0 4px 0 var(--edge); }
.info-card h3, .info-card h4 { margin: 8px 0 4px; font-size: 1.15rem; font-weight: 800; }
.info-card p { margin: 0; color: var(--muted); font-size: .98rem; line-height: 1.75; }
.info-emoji { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--panel-2); font-size: 1.9rem; transform: rotate(-8deg); box-shadow: 0 3px 0 var(--edge); }
.info-cards.tone-mafia .info-card { box-shadow: 0 4px 0 var(--edge), inset 0 3px 0 var(--mafia); }
.info-cards.tone-town .info-card { box-shadow: 0 4px 0 var(--edge), inset 0 3px 0 var(--town); }
.info-cards.tone-jester .info-card { box-shadow: 0 4px 0 var(--edge), inset 0 3px 0 var(--jester); }
.group-title { margin: 22px 0 10px; font-size: 1.15rem; }
.group-title.tone-mafia { color: var(--mafia); }
.group-title.tone-town { color: var(--town); }
.group-title.tone-jester { color: var(--jester); }

.table-wrap { overflow-x: auto; border-radius: 18px; box-shadow: 0 4px 0 var(--edge); }
.table-wrap table { width: 100%; border-collapse: collapse; background: var(--panel); font-size: 1rem; }
.table-wrap th, .table-wrap td { padding: 12px 16px; text-align: start; border-bottom: 1px solid var(--line); line-height: 1.6; }
.table-wrap thead th { background: var(--panel-2); color: var(--accent); font-weight: 800; white-space: nowrap; }
.table-wrap tbody th { font-weight: 800; }
.table-wrap tbody tr:last-child > * { border-bottom: 0; }
.table-wrap tbody tr:nth-child(even) { background: #ffffff05; }
.table-wrap a { text-decoration: none; font-weight: 800; }
.note { margin-top: 12px !important; color: var(--muted); font-size: .98rem !important; }

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-inline-start: 30px; }
.ticks li::before {
  content: ''; position: absolute; inset-inline-start: 2px; top: .62em; width: 16px; height: 16px; border-radius: 6px;
  background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent-line);
}
.ticks li::after { content: ''; position: absolute; inset-inline-start: 7px; top: calc(.62em + 4px); width: 7px; height: 4px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 14px; border-radius: 999px; background: var(--panel); font-weight: 700; font-size: .98rem !important; line-height: 1.6 !important; box-shadow: 0 3px 0 var(--edge); }
.chip-groups { display: grid; gap: 18px; }
.chip-group h3 { font-size: 1.05rem; margin-bottom: 8px; }

.chat { display: grid; gap: 10px; max-width: 640px; }
.bubble { justify-self: start; max-width: 88%; padding: 10px 16px; border-radius: 20px 20px 20px 6px; background: var(--panel); box-shadow: 0 3px 0 var(--edge); }
.bubble.alt { justify-self: end; border-radius: 20px 20px 6px 20px; background: var(--panel-2); }
.bubble b { display: block; color: var(--accent); font-size: .85rem; }
.bubble span { line-height: 1.75; }

.tips { display: grid; gap: 12px; }
.tip-col { padding: 18px; background: var(--panel); border-radius: 20px; box-shadow: 0 4px 0 var(--edge); }
.tip-col h3 { color: var(--accent); margin-bottom: 10px; }
.tip-col li { font-size: 1rem !important; line-height: 1.8 !important; }

.perks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; }
@media (min-width: 700px) { .perks { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
.perk { padding: 16px; border-radius: 20px; background: var(--bg-2); box-shadow: inset 0 0 0 2px var(--line); }
.perk-emoji { font-size: 1.8rem; display: inline-block; transform: rotate(-8deg); }
.perk h3 { margin: 6px 0 2px; }
.perk p { margin: 0; color: var(--muted); font-size: .98rem !important; line-height: 1.7 !important; }

.faq { display: grid; gap: 10px; }
.faq details { background: var(--panel); border-radius: 18px; box-shadow: 0 4px 0 var(--edge); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { margin: 0; font-size: 1.08rem; flex: 1; }
.faq summary::after { content: '+'; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--panel-2); color: var(--accent); font-weight: 800; font-size: 1.3rem; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 18px 16px; color: var(--muted); }

/* ---------- الألعاب الثانية ---------- */
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.g-card {
  display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 20px;
  background: var(--panel); color: var(--text) !important; text-decoration: none;
  box-shadow: 0 4px 0 var(--edge); border: 2px solid transparent;
  transition: transform .12s, box-shadow .12s, border-color .15s;
}
.g-card:hover, .g-card:focus-visible { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 7px 0 var(--edge); }
.g-card:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge); }
.g-emoji { flex: none; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: var(--panel-2); font-size: 2.1rem; transform: rotate(-8deg); box-shadow: 0 3px 0 var(--edge); transition: transform .15s; }
.g-card:hover .g-emoji { transform: rotate(4deg) scale(1.06); }
.g-text { display: grid; gap: 2px; min-width: 0; }
.g-text b { font-family: var(--font-display); font-weight: 400; font-size: 1.4rem; line-height: 1.15; }
.g-card:hover .g-text b { color: var(--accent); }
.g-text span { color: var(--muted); font-size: .95rem; line-height: 1.55; }
.g-text small { color: var(--faint); font-weight: 700; }
.g-grid.big .g-card { padding: 18px; }
.g-grid.big .g-emoji { width: 72px; height: 72px; font-size: 2.6rem; }

/* ---------- الدعوة الأخيرة ---------- */
.final-cta {
  position: relative; overflow: hidden; margin: 40px auto 12px; max-width: 860px; text-align: center;
  padding: 34px 20px 30px; border-radius: 30px;
  background: radial-gradient(ellipse 90% 80% at 50% 0%, #ffc53d26, transparent 70%), var(--panel);
  box-shadow: 0 6px 0 var(--edge), inset 0 0 0 2px var(--accent-line);
}
.final-emoji { font-size: 4.4rem; line-height: 1; display: inline-block; transform: rotate(-10deg); filter: drop-shadow(0 6px 0 #0007); animation: wobble 3.2s ease-in-out infinite; }
.final-cta h2 { font-size: clamp(1.8rem, 6vw, 2.6rem); margin: 10px 0 6px; }
.final-cta p { color: var(--muted); max-width: 30em; margin: 0 auto 18px; }
.final-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- الفوتر ---------- */
.site-bottom {
  max-width: 1080px; margin: 28px auto 0; padding: 26px 16px 22px;
  display: grid; gap: 22px; grid-template-columns: 1fr; border-top: 2px solid var(--line); color: var(--muted);
}
.foot-brand p { margin: 10px 0 0; max-width: 26em; line-height: 1.8; }
.foot-links { display: grid; gap: 6px; align-content: start; }
.foot-links b { color: var(--text); }
.foot-links a { color: var(--muted); text-decoration: none; width: fit-content; }
.foot-links a:hover { color: var(--accent); }
.copy { margin: 0; color: var(--faint); font-size: .9rem; }

/* ---------- زر "ابدأ اللعب الآن" الثابت ---------- */
.sticky-cta {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 50;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: #15131bee; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 2px solid var(--line);
}
.sticky-inner { max-width: 760px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sticky-note { color: var(--muted); font-weight: 700; font-size: .92rem; display: none; }
.sticky-btn { flex: 1; min-height: 54px; font-size: 1.15rem; animation: ctaPulse 2.8s ease-in-out infinite; }
@keyframes ctaPulse { 0%, 100% { box-shadow: 0 4px 0 var(--accent-edge), 0 0 0 0 #ffc53d55; } 50% { box-shadow: 0 4px 0 var(--accent-edge), 0 0 0 8px #ffc53d00; } }

@media (min-width: 560px) {
  .sticky-note { display: block; }
  .sticky-btn { flex: none; min-width: 260px; }
  .tips { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 860px) {
  .hero { grid-template-columns: 1.1fr .9fr; padding-top: 34px; }
  .hero-art { min-height: 360px; }
  .site-bottom { grid-template-columns: 2fr 1fr 1fr; }
  .copy { grid-column: 1 / -1; }
}

@media (max-width: 420px) {
  .hero-art { min-height: 250px; }
  .phone { width: 104px; }
  .phone-emoji { font-size: 2.3rem; }
  .bubble { max-width: 96%; }
}

@media (prefers-reduced-motion: reduce) {
  .phone, .spark, .sticky-btn, .final-emoji { animation: none; }
}

@media print {
  .sticky-cta, .site-top, .toc, .final-cta { display: none; }
}
