/* ============================================================
   نجوم السهرة — صفحات الموقع (v0.18، على شكل تطبيقات الألعاب)
   أسود عميق، كروت زجاجية بزوايا كبيرة، أغلفة ملوّنة للألعاب (public/covers)، خط Readex Pro،
   أزرار كبسولة (الأصفر للزر الرئيسي بس)، وشريط سفلي عائم فيه ➕ بالنص.
   ممنوع إيموجي قبل عناوين الأقسام (h2). الألوان من الأغلفة، والواجهة نفسها هادية.
   ============================================================ */

/* ---------- الأساس (الصفحات هاي ما بتحمّل style.css تبع اللعبة) ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { line-height: 1.55; -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; touch-action: manipulation; }
button:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 10px 14px; width: 100%; min-height: 48px; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2 { margin: 0 0 .35em; line-height: 1.2; }
h3 { margin: 0 0 .4em; line-height: 1.3; font-size: 1.05rem; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

body.app {
  --bg: #0b0c0f;
  --surface: #15171c;
  --surface-2: #1d2027;
  --surface-3: #262a33;
  --glass: rgba(255, 255, 255, .06);
  --glass-2: rgba(255, 255, 255, .1);
  --line: rgba(255, 255, 255, .08);
  --text: #f4f5f7;
  --muted: #a3a8b2;
  --faint: #858a94;
  --accent: #ffc53d;
  --accent-ink: #1a1300;
  --accent-soft: rgba(255, 197, 61, .14);
  --accent-line: rgba(255, 197, 61, .4);
  --font-display: 'Readex Pro', 'Segoe UI', Tahoma, sans-serif;
  --font-body: 'Readex Pro', 'Segoe UI', Tahoma, sans-serif;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  background: radial-gradient(1100px 520px at 50% -220px, rgba(255, 255, 255, .06), transparent 70%), var(--bg);
  background-attachment: fixed;
  overflow-x: hidden;
}
body.app::before { display: none; }
body.app h1, body.app h2, body.app h3 { font-family: var(--font-display); letter-spacing: -.01em; }
body.app h1, body.app h2 { font-weight: 700; }
body.app h3 { font-weight: 600; }
body.app p { margin: 0 0 1em; }
.num { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.logo { flex: none; }

/* ---------- الأيقونات ---------- */
.ico { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico.fill { fill: currentColor; stroke: none; }

/* ---------- الشريط العلوي ---------- */
.app-bar {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 10px;
  max-width: 1080px; margin: 0 auto; padding: calc(10px + env(safe-area-inset-top)) 16px 12px;
  background: linear-gradient(180deg, var(--bg) 60%, rgba(11, 12, 15, 0));
}
.app-brand, .app-bar-title {
  justify-self: center; display: inline-flex; align-items: center; gap: 8px; min-width: 0;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 1.05rem; white-space: nowrap;
}
.app-brand .logo { width: 30px; height: 30px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; padding: 0; display: grid; place-items: center;
  background: var(--glass); border: 1px solid var(--line); color: var(--text); text-decoration: none; cursor: pointer;
  transition: background .15s, transform .1s;
}
.icon-btn:hover { background: var(--glass-2); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.glass { background: rgba(10, 10, 14, .42); border-color: rgba(255, 255, 255, .16); color: #fff; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

/* ---------- الصفحة ---------- */
.app-main { max-width: 1080px; margin: 0 auto; padding: 4px 16px 0; }
.home-hero { padding: 6px 0 14px; }
.home-hero h1 { font-size: clamp(1.75rem, 6.5vw, 2.6rem); line-height: 1.2; margin: 6px 0; }
.h1-kicker { display: block; margin-bottom: 6px; color: var(--accent); font-size: .85rem; font-weight: 600; letter-spacing: 0; }
.home-hero .lead, .hub-head .lead { color: var(--muted); font-size: 1.02rem; margin: 0; line-height: 1.7; }

/* أول خطوتين: افتح غرفة / ادخل غرفة */
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 4px; }
.quick-tile {
  display: flex; align-items: center; gap: 12px; padding: 14px; min-height: 78px; border-radius: 22px; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); font: inherit; text-align: start; cursor: pointer;
  transition: transform .12s, background .15s;
}
.quick-tile:hover { background: var(--surface-2); }
.quick-tile:active { transform: scale(.97); }
.quick-tile:disabled { opacity: .5; cursor: not-allowed; }
.quick-tile b { display: block; font-weight: 600; font-size: 1.02rem; }
.quick-tile small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.quick-tile.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); box-shadow: 0 14px 30px -16px rgba(255, 197, 61, .8); }
.quick-tile.primary:hover { filter: brightness(1.05); }
.quick-tile.primary small { color: rgba(26, 19, 0, .68); }
.quick-ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--glass-2); }
.quick-tile.primary .quick-ico { background: rgba(0, 0, 0, .12); }
.resume-room {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 18px;
  border-radius: 22px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent) !important;
  font-weight: 600; text-decoration: none;
}
.resume-room b { direction: ltr; unicode-bidi: isolate; letter-spacing: 2px; }

/* ---------- البحث والتصنيفات ---------- */
.finder { margin: 18px 0 4px; }
.search {
  display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 16px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); color: var(--faint); transition: border-color .15s;
}
.search:focus-within { border-color: rgba(255, 255, 255, .24); }
body.app .search input {
  flex: 1; width: auto; min-width: 0; min-height: 0; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent;
  color: var(--text); font: inherit; font-size: 1rem; box-shadow: none; outline: none;
}
.search input::placeholder { color: var(--faint); }
.search input::-webkit-search-cancel-button { filter: invert(1) opacity(.5); }
.filter-tabs { display: flex; gap: 26px; overflow-x: auto; padding: 14px 4px 2px; scrollbar-width: none; }
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  position: relative; flex: none; padding: 4px 0 14px; background: none; border: 0; cursor: pointer;
  color: var(--faint); font: inherit; font-weight: 500; font-size: 1rem; transition: color .15s;
}
.filter-tab:hover { color: var(--muted); }
.filter-tab.on { color: var(--text); }
.filter-tab.on::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--accent); }

/* ---------- كروت الألعاب بالأغلفة ---------- */
.carousel {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px;
  margin: 4px -16px 0; padding: 10px 16px 24px; scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel .cover-card { flex: 0 0 min(66vw, 300px); scroll-snap-align: center; }
.cover-card {
  position: relative; isolation: isolate; aspect-ratio: 3 / 4; border-radius: 28px; overflow: hidden;
  background: var(--surface-2); box-shadow: 0 26px 46px -26px rgba(0, 0, 0, .95);
}
.cover-card[hidden] { display: none; }
.cover-link { position: absolute; inset: 0; display: block; color: #fff !important; text-decoration: none; }
.cover-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.cover-card:hover img { transform: scale(1.05); }
.cover-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .8) 100%); }
.cover-text { position: absolute; inset-inline: 18px 84px; bottom: 18px; display: grid; gap: 4px; }
.cover-text b { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; line-height: 1.2; text-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
.cover-text small { color: rgba(255, 255, 255, .8); font-size: .84rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cover-play {
  position: absolute; inset-inline-end: 14px; bottom: 16px; z-index: 2; width: 56px; height: 56px; border-radius: 19px;
  display: grid; place-items: center; color: #fff; text-decoration: none;
  background: rgba(16, 16, 20, .45); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: background .15s, color .15s, transform .1s;
}
.cover-play:hover { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.cover-play:active { transform: scale(.94); }
.cover-play .ico { width: 24px; height: 24px; }
.cover-card.small { aspect-ratio: 4 / 5; border-radius: 22px; }
.cover-card.small .cover-text { inset-inline: 12px; bottom: 12px; }
.cover-card.small .cover-text b { font-size: 1.02rem; }
.cover-card.small .cover-text small { font-size: .74rem; -webkit-line-clamp: 1; }
.no-results { text-align: center; color: var(--muted); padding: 24px 0; }

.h-scroll { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 4px 16px 12px; scroll-snap-type: x proximity; scrollbar-width: none; }
.h-scroll::-webkit-scrollbar { display: none; }
.h-scroll .cover-card { flex: 0 0 150px; scroll-snap-align: start; }
.games-block { padding-top: 10px; }
.g-grid.big { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.g-grid.big .cover-text { inset-inline: 14px 62px; bottom: 14px; }
.g-grid.big .cover-text b { font-size: 1.1rem; }
.g-grid.big .cover-text small { font-size: .76rem; }
.g-grid.big .cover-play { width: 44px; height: 44px; border-radius: 15px; inset-inline-end: 10px; bottom: 12px; }
.g-grid.big .cover-play .ico { width: 20px; height: 20px; }

/* ---------- الشريط السفلي ---------- */
.dock {
  position: fixed; z-index: 40; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(440px, calc(100% - 24px)); height: 70px; border-radius: 26px;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: rgba(21, 23, 28, .9); border: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 20px 44px -12px rgba(0, 0, 0, .85);
}
.dock-item { display: grid; justify-items: center; gap: 3px; color: var(--faint); font-size: .72rem; font-weight: 500; text-decoration: none; transition: color .15s; }
.dock-item:hover, .dock-item.on { color: var(--text); }
.dock-item.on .ico { color: var(--accent); }
.dock-fab {
  justify-self: center; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; transform: translateY(-20px);
  background: var(--accent); color: var(--accent-ink); text-decoration: none;
  box-shadow: 0 12px 28px -8px rgba(255, 197, 61, .6), 0 0 0 6px var(--bg); transition: transform .12s;
}
.dock-fab:active { transform: translateY(-20px) scale(.94); }
.dock-fab .ico { width: 28px; height: 28px; stroke-width: 2.4; }
body.home, body.hub-page { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

/* ---------- رسائل الموقع (الصيانة والإعلانات من لوحة التحكم) ---------- */
.announcements { display: grid; gap: 8px; margin: 4px 0 12px; }
.announcement { margin: 0; padding: 12px 16px; border-radius: 18px; background: rgba(77, 179, 255, .1); border: 1px solid rgba(77, 179, 255, .28); color: #d3ecff; font-weight: 500; }
.announcement.warn { background: rgba(255, 159, 67, .1); border-color: rgba(255, 159, 67, .3); color: #ffdcaa; }

/* ---------- قائمة الألعاب النصية (الرئيسية) ---------- */
.game-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.game-list a {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text) !important; text-decoration: none; transition: background .15s;
}
.game-list a:hover { background: var(--surface-2); }
.gl-emoji { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; flex: none; background: var(--surface-2); font-size: 1.6rem; }
.gl-text { display: grid; min-width: 0; }
.gl-text b { font-weight: 600; line-height: 1.4; }
.gl-text small { color: var(--muted); font-size: .84rem; }

/* ---------- القوائم من تحت ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fadeIn .2s ease both; }
.sheet-backdrop[hidden] { display: none; }
.sheet {
  position: fixed; z-index: 61; inset-inline: 0; bottom: 0; max-width: 520px; margin: 0 auto;
  display: grid; gap: 12px; padding: 10px 18px calc(20px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0; background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: 0 -20px 50px rgba(0, 0, 0, .6); animation: sheetUp .28s cubic-bezier(.2, .9, .3, 1) both;
}
.sheet[hidden] { display: none; }
.sheet-handle { justify-self: center; width: 44px; height: 5px; border-radius: 99px; background: var(--surface-3); margin-bottom: 4px; }
.sheet h2 { margin: 2px 0 4px; text-align: center; font-size: 1.35rem; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
body.sheet-open { overflow: hidden; }
.choice {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 22px; color: var(--text) !important; text-decoration: none;
  background: var(--surface-2); border: 1px solid var(--line); transition: background .15s, transform .1s;
}
.choice:hover { background: var(--surface-3); }
.choice:active { transform: scale(.98); }
.choice-ico { width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; flex: none; background: var(--glass); font-size: 1.8rem; line-height: 1; }
.choice-text b { display: block; font-size: 1.08rem; font-weight: 600; }
.choice-text span { color: var(--muted); font-size: .9rem; line-height: 1.6; }
.join-form { display: grid; gap: 10px; }
.join-form label { text-align: center; }
body.app .join-form input {
  text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 2rem; letter-spacing: 10px; direction: ltr;
  height: 66px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line);
}
body.app .join-form input:focus { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.menu-links { display: grid; gap: 8px; }
.menu-links a { padding: 14px 16px; border-radius: 16px; background: var(--surface-2); color: var(--text) !important; text-decoration: none; font-weight: 500; }
.menu-links a:hover { background: var(--surface-3); }

/* ---------- الأزرار ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 0 26px;
  border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; font: inherit; font-weight: 600; font-size: 1.05rem;
  transition: transform .1s, filter .15s, background .15s;
}
.pill:active { transform: scale(.97); }
.pill.primary { background: var(--accent); color: var(--accent-ink) !important; box-shadow: 0 14px 30px -14px rgba(255, 197, 61, .75); }
.pill.primary:hover { filter: brightness(1.06); }
.pill.primary:disabled { background: var(--surface-3); color: var(--faint) !important; box-shadow: none; }
.pill.ghost { background: var(--glass); color: var(--text) !important; border: 1px solid var(--line); }
.pill.ghost:hover { background: var(--glass-2); }
.pill.block { width: 100%; }
.pill .ico { width: 20px; height: 20px; }
.round-btn {
  flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: var(--glass); border: 1px solid var(--line); color: var(--text) !important; text-decoration: none; cursor: pointer;
  transition: background .15s, transform .1s;
}
.round-btn:hover { background: var(--glass-2); }
.round-btn:active { transform: scale(.94); }

/* ---------- صفحة اللعبة ---------- */
.detail-media { position: relative; height: min(46vh, 470px); min-height: 300px; overflow: hidden; }
.detail-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .32) 0%, rgba(0, 0, 0, 0) 26%, rgba(0, 0, 0, 0) 58%, var(--bg) 100%); }
.detail-top { position: absolute; z-index: 2; top: calc(12px + env(safe-area-inset-top)); inset-inline: 16px; display: flex; justify-content: space-between; }
.detail { position: relative; z-index: 3; max-width: 860px; margin: -76px auto 0; padding: 0 16px; }
.detail-card { padding: 20px 20px 18px; border-radius: 32px; background: rgba(21, 23, 28, .97); border: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .95); }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-top: 6px; }
.detail-head h1 { font-size: clamp(1.6rem, 6.4vw, 2.3rem); line-height: 1.2; margin: 0 0 4px; }
.detail-sub { color: var(--muted); margin: 0 !important; font-size: .95rem; }
.tag { flex: none; margin-top: 4px; padding: 8px 14px; border-radius: 999px; background: var(--glass-2); border: 1px solid var(--line); font-weight: 500; font-size: .88rem; white-space: nowrap; }
.stats { list-style: none; margin: 18px 0; padding: 16px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.stats li { position: relative; display: grid; justify-items: center; gap: 2px; text-align: center; padding: 0 6px; }
.stats li + li::before { content: ''; position: absolute; inset-inline-start: 0; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.stats .ico { color: var(--muted); margin-bottom: 4px; }
.stats b { font-weight: 600; font-size: 1.08rem; line-height: 1.4; }
.stats small { color: var(--muted); font-size: .8rem; line-height: 1.4; }
.detail-card .lead { color: var(--muted); line-height: 1.85; margin-bottom: 18px; }
.detail-actions { display: flex; gap: 10px; align-items: center; }
.detail-actions .pill.primary { flex: 1; min-width: 0; padding: 0 18px; white-space: nowrap; }
.detail-actions .pill.primary span { overflow: hidden; text-overflow: ellipsis; }
.cta-note { margin: 12px 0 0 !important; text-align: center; color: var(--faint); font-size: .86rem; }

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

.row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.row-head h2 { margin: 0; }
.row-head a { color: var(--muted); text-decoration: none; font-weight: 500; }
.row-head a:hover { color: var(--text); }

.toc { display: flex; gap: 8px; overflow-x: auto; padding: 22px 0 4px; scrollbar-width: none; }
.toc::-webkit-scrollbar { display: none; }
.toc a { flex: none; padding: 8px 15px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); color: var(--muted); text-decoration: none; font-weight: 500; font-size: .86rem; }
.toc a:hover { color: var(--text); background: var(--glass-2); }

/* صفحة كل الألعاب */
.hub-head { padding: 4px 0 6px; }
.hub-head h1 { font-size: clamp(1.7rem, 6.4vw, 2.5rem); margin: 6px 0; line-height: 1.2; }

/* ---------- محتوى الشرح ---------- */
.content { max-width: 860px; margin: 0 auto; }
.block { padding: 32px 0 0; scroll-margin-top: 80px; }
.block > h2, .row-head h2 { font-size: clamp(1.3rem, 4.6vw, 1.6rem); margin: 0 0 14px; }
.block p, .block li { color: #d3d6dc; font-size: 1rem; line-height: 1.9; }
.block .intro { color: var(--muted); }
.block b { color: var(--text); font-weight: 600; }
.block p a, .block li a, .faq a { color: var(--accent); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.steps h3 { margin: 2px 0 4px; font-size: 1.04rem; }
.steps p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.75; }
.step-n { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; }

.info-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.info-card { padding: 16px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.info-card h3, .info-card h4 { margin: 10px 0 4px; font-size: 1.06rem; font-weight: 600; }
.info-card p { margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.75; }
.info-emoji { width: 48px; height: 48px; border-radius: 15px; display: inline-grid; place-items: center; background: var(--surface-2); font-size: 1.6rem; }
.info-cards.tone-mafia .info-card { border-top: 3px solid #ff5a6e; }
.info-cards.tone-town .info-card { border-top: 3px solid #4db3ff; }
.info-cards.tone-jester .info-card { border-top: 3px solid #c98bff; }
.group-title { margin: 20px 0 10px; font-size: 1rem; color: var(--muted); }

.table-wrap { overflow-x: auto; border-radius: 20px; border: 1px solid var(--line); }
.table-wrap table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .95rem; }
.table-wrap th, .table-wrap td { padding: 12px 15px; text-align: start; border-bottom: 1px solid var(--line); line-height: 1.6; }
.table-wrap thead th { background: var(--surface-2); color: var(--muted); font-weight: 600; white-space: nowrap; }
.table-wrap tbody th { font-weight: 600; }
.table-wrap tbody tr:last-child > * { border-bottom: 0; }
.table-wrap a { color: var(--text); text-decoration: none; }
.table-wrap a:hover { color: var(--accent); }
.note { margin-top: 12px !important; color: var(--muted); font-size: .93rem !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: 0; top: .5em; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); }
.ticks li::after { content: ''; position: absolute; inset-inline-start: 6px; top: calc(.5em + 6px); 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: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 500; font-size: .9rem !important; line-height: 1.5 !important; }
.chip-groups { display: grid; gap: 16px; }
.chip-group h3 { font-size: .98rem; margin-bottom: 8px; color: var(--muted); }

.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(--surface); border: 1px solid var(--line); }
.bubble.alt { justify-self: end; border-radius: 20px 20px 6px 20px; background: var(--surface-2); }
.bubble b { display: block; color: var(--accent); font-size: .8rem; font-weight: 600; }
.bubble span { line-height: 1.75; }

.tips { display: grid; gap: 10px; }
.tip-col { padding: 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.tip-col h3 { margin-bottom: 10px; font-size: 1.04rem; }
.tip-col li { font-size: .95rem !important; line-height: 1.8 !important; }

.perks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 10px; }
.perk { padding: 16px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.perk-emoji { font-size: 1.6rem; }
.perk h3 { margin: 8px 0 2px; font-size: 1rem; }
.perk p { margin: 0; color: var(--muted); font-size: .9rem !important; line-height: 1.7 !important; }

.faq { display: grid; gap: 10px; }
.faq details { border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 15px 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { margin: 0; font-size: 1rem; font-weight: 500; flex: 1; line-height: 1.6; }
.faq summary::after { content: '+'; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--glass); color: var(--text); font-size: 1.2rem; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 18px 16px; color: var(--muted); }

/* صفحة الخصوصية */
.legal { padding: 8px 0 24px; }
.legal h1 { font-size: clamp(1.7rem, 6vw, 2.3rem); margin: 6px 0 4px; }
.legal h2 { font-size: 1.2rem; margin: 30px 0 10px; }
.legal p, .legal li { color: #d3d6dc; line-height: 1.9; }
.legal ul { padding-inline-start: 1.3em; margin: 6px 0; display: grid; gap: 6px; }
.legal b { color: var(--text); font-weight: 600; }
.legal a { color: var(--accent); overflow-wrap: anywhere; }

/* الدعوة الأخيرة */
.final-cta { margin: 36px auto 0; max-width: 860px; border-radius: 30px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.final-img { display: block; width: 100%; height: 190px; object-fit: cover; -webkit-mask-image: linear-gradient(180deg, #000 50%, transparent); mask-image: linear-gradient(180deg, #000 50%, transparent); }
.final-body { padding: 22px 20px 24px; text-align: center; }
.final-img + .final-body { padding-top: 0; margin-top: -20px; position: relative; }
.final-body h2 { font-size: clamp(1.4rem, 5vw, 1.9rem); margin: 0 0 6px; }
.final-body p { color: var(--muted); margin: 0 auto 18px; max-width: 30em; }
.final-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* الفوتر */
.site-bottom {
  max-width: 1080px; margin: 36px auto 0; padding: 26px 16px 24px;
  display: grid; gap: 22px; grid-template-columns: 1fr; border-top: 1px solid var(--line); color: var(--muted);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text) !important; text-decoration: none; font-weight: 600; font-size: 1.1rem; }
.brand .logo { width: 34px; height: 34px; }
.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); font-weight: 600; }
.foot-links a { color: var(--muted); text-decoration: none; width: fit-content; }
.foot-links a:hover { color: var(--text); }
.copy { margin: 0; color: var(--faint); font-size: .86rem; }

/* زر «ابدأ اللعب الآن» الثابت (صفحات الألعاب) */
body.game-page { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
.sticky-cta {
  position: fixed; z-index: 50; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(520px, calc(100% - 28px)); display: flex; align-items: center; gap: 12px; padding: 7px; padding-inline-end: 18px;
  border-radius: 999px; background: rgba(21, 23, 28, .9); border: 1px solid var(--line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 20px 44px -14px rgba(0, 0, 0, .9);
  transition: transform .3s ease, opacity .3s ease;
}
/* لما زر البدء اللي بالصفحة ظاهر، الثابت بينزل (زر واحد على الشاشة دايماً) */
body.cta-inline .sticky-cta { transform: translate(-50%, 150%); opacity: 0; pointer-events: none; }
.sticky-btn { flex: 1; min-height: 52px; }
.sticky-note { color: var(--muted); font-size: .8rem; white-space: nowrap; }

/* بنر الإعلان: مكتوب فوقه «إعلان»، ومكانه محجوز عشان الصفحة ما تنط، وبعيد عن الأزرار */
.ad-banner { display: block; max-width: 860px; margin: 28px auto; padding: 8px 12px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.ad-banner-label { display: block; margin-bottom: 6px; font-size: .75rem; font-weight: 500; color: var(--muted); }
.ad-banner ins.adsbygoogle { min-height: 100px; }
.ad-banner:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
.ad-preview { display: grid; place-items: center; min-height: 100px; border: 1px dashed rgba(255, 255, 255, .18); border-radius: 14px; color: var(--muted); text-align: center; padding: 12px; }

@media (max-width: 400px) {
  .detail-actions { gap: 8px; }
  .detail-actions .round-btn { width: 48px; height: 48px; }
  .detail-actions .pill.primary { padding: 0 14px; font-size: 1rem; }
}
/* جوالات صغيرة جداً: زر المشاركة موجود فوق على الصورة */
@media (max-width: 365px) {
  .detail-actions .round-btn:last-child { display: none; }
}

@media (max-width: 380px) {
  .sticky-note { display: none; }
  .quick-tile { padding: 12px; gap: 10px; }
  .quick-tile small { display: none; }
  .bubble { max-width: 96%; }
}

@media (min-width: 560px) {
  .tips { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .g-grid.big { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .h-scroll .cover-card { flex-basis: 180px; }
}

@media (min-width: 900px) {
  .carousel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; margin: 4px 0 0; padding: 10px 0 24px; }
  .carousel .cover-card { flex: none; aspect-ratio: 4 / 5; }
  .home-hero { text-align: center; padding-top: 24px; }
  .quick, .finder { max-width: 640px; margin-inline: auto; }
  .filter-tabs { justify-content: center; }
  .detail-media { height: 540px; }
  .detail-card { padding: 28px 32px 26px; }
  .site-bottom { grid-template-columns: 2fr 1fr 1fr; }
  .copy { grid-column: 1 / -1; }
  .h-scroll { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; margin: 0; padding: 4px 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .cover-card img, .sheet, .sheet-backdrop { transition: none; animation: none; }
}

@media print {
  .sticky-cta, .dock, .app-bar, .toc, .final-cta { display: none; }
}

/* تواصل معنا (/contact) */
.contact-form { display: grid; gap: 14px; margin: 18px 0; padding: 18px; border-radius: 24px; background: var(--surface-2); border: 1px solid var(--line); }
.contact-form label { display: grid; gap: 6px; font-weight: 600; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; padding: 12px 14px; border-radius: 16px; font: inherit; }
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.form-status { margin: 0; min-height: 1.4em; font-weight: 600; }
.form-status.good { color: #3ddc97; }
.form-status.bad { color: #ff8a9a; }
