/* ===========================================================
   أيجنتس — غرفة الأخبار الأيزومتريك
   الهوية: كحلي #04060c · نعناعي #57e3c4 · خط Cairo
   =========================================================== */

@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('../fonts/cairo-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF, U+1EE00-1EEFF;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('../fonts/cairo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #04060c;
  --navy-2: #070c15;
  --mint: #57e3c4;
  --ink: #e9fbf6;
  --muted: #7d8b9e;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--navy);
  color: var(--ink);
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 80% at 50% 0%, #0b1421 0%, #060a12 45%, #04060c 100%);
}

/* ---------- الشريط العلوي ---------- */
.topbar {
  flex: 0 0 auto;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid rgba(87, 227, 196, .12);
  background: linear-gradient(180deg, rgba(8, 14, 23, .92), rgba(4, 6, 12, .55));
  backdrop-filter: blur(6px);
}

.brand { display: flex; align-items: center; gap: 10px; }

.mark { width: 30px; height: 30px; flex: 0 0 auto; filter: drop-shadow(0 0 10px rgba(87, 227, 196, .35)); }

.brand-text { display: flex; align-items: baseline; gap: 8px; line-height: 1; }
.brand-text strong { font-size: 18px; font-weight: 800; letter-spacing: .2px; }
.brand-text span { font-size: 12.5px; color: var(--muted); }

.badges { display: flex; align-items: center; gap: 8px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 27px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(87, 227, 196, .22);
  color: var(--mint);
  background: rgba(87, 227, 196, .06);
}

.pill.ghost { color: #8fa0b5; border-color: rgba(143, 160, 181, .22); background: rgba(143, 160, 181, .05); }

.pill.live i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(87, 227, 196, .6);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(87, 227, 196, .55); }
  70%  { box-shadow: 0 0 0 7px rgba(87, 227, 196, 0); }
  100% { box-shadow: 0 0 0 0 rgba(87, 227, 196, 0); }
}

.clock {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 52px;
  text-align: left;
  direction: ltr;
}

.pill.sound {
  cursor: pointer;
  font-family: inherit;
  gap: 7px;
  padding: 0 12px;
  color: #8fa0b5;
  border-color: rgba(143, 160, 181, .25);
  background: rgba(143, 160, 181, .05);
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.pill.sound:hover { color: var(--ink); border-color: rgba(87, 227, 196, .45); }
.pill.sound .spk { width: 15px; height: 15px; display: block; flex: 0 0 auto; }
.pill.sound .wave { display: none; }
.pill.sound .slash { display: block; }
.pill.sound[aria-pressed="true"] {
  color: var(--mint);
  border-color: rgba(87, 227, 196, .55);
  background: rgba(87, 227, 196, .10);
}
.pill.sound[aria-pressed="true"] .wave { display: block; }
.pill.sound[aria-pressed="true"] .slash { display: none; }

/* ---------- تنبيه صغير ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 54px;
  transform: translate(-50%, 10px);
  max-width: min(90vw, 470px);
  padding: 10px 16px;
  border-radius: 12px;
  background: #101b2b;
  border: 1px solid rgba(87, 227, 196, .45);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 20;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- المسرح ---------- */
.stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px 0;
}

#scene {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

/* ---------- الشريط السفلي ---------- */
.footbar {
  flex: 0 0 auto;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 11.5px;
  color: #5d6b7e;
  border-top: 1px solid rgba(87, 227, 196, .08);
  background: rgba(4, 6, 12, .6);
}

.footbar .sep { width: 3px; height: 3px; border-radius: 50%; background: #2a3648; }

/* ---------- فقاعات الكلام (داخل SVG) ---------- */
.bubble-wrap { pointer-events: none; }

.bubble {
  font-family: 'Cairo', system-ui, sans-serif;
  background: transparent;
  border: 0;
  padding: 10px 16px 12px;
  color: var(--ink);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.45;
  text-align: right;
  direction: rtl;
}

.bubble-who {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--mint);
  margin-bottom: 2px;
  letter-spacing: .2px;
}

.noscript { color: var(--ink); text-align: center; padding: 40px; }

@media (max-width: 720px) {
  .topbar { height: 54px; padding: 0 12px; }
  .brand-text span { display: none; }
  .footbar { font-size: 10px; gap: 6px; padding: 0 8px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .pill.live i { animation: none; }
}
