/* challenge-pro.css — النمط المطوّر: بابان + شريط نقاط/عملات + مناطق الترابط + الأفعال
   ملاحظة: كل الأنماط تحت .ch-doors / .ch-pro-* / body.pro → الكلاسيكي لا يتأثر.
   ثيم «المختبر» فاتح — لا خلفيات داكنة (بروجكتر الصف يغسل الداكن). */

/* ── بابان في شاشة البداية ─────────────────────────────────────────────── */
.ch-doors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  width: 100%;
  max-width: 1040px;
  margin: 4px auto 0;
  text-align: right;
}

.ch-door {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 20px 16px;
  border-radius: 20px;
  background: #FFFFFF;
  border: 1px solid rgba(15, 23, 42, .12);
  border-top: 6px solid #0F172A;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
}

.ch-door.is-pro {
  border-top-color: transparent;
  border-image: linear-gradient(90deg, #4C1D95, #0E7490) 1;
  background: linear-gradient(180deg, rgba(76, 29, 149, .05), #FFFFFF 42%);
}

.ch-door-tag {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  color: #0F172A;
  background: rgba(15, 23, 42, .07);
}

.ch-door.is-pro .ch-door-tag { color: #4C1D95; background: rgba(76, 29, 149, .12); }

.ch-door-title {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  color: #0F172A;
}

.ch-door-sub {
  margin: 0 0 4px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #475569;
}

.ch-door-note {
  margin: 2px 0 0;
  font-size: 12px;
  color: #64748B;
}

.ch-door .ch-start { width: 100%; margin: 6px 0 4px; }

.ch-start.is-pro {
  color: #FFFFFF;
  background: linear-gradient(100deg, #4C1D95, #0E7490);
  box-shadow: 0 8px 20px rgba(76, 29, 149, .28);
}

.ch-door .ch-modes { display: flex; gap: 8px; flex-wrap: wrap; }
.ch-door .ch-mode { flex: 1 1 0; min-width: 96px; font-size: 14px; }
/* أزرار النمط المطوّر بنفس ارتفاع أزرار النمط الكلاسيكي تماماً */
.ch-door.is-pro .ch-modes .ch-mode { min-height: 78px; }

@media (max-width: 760px) {
  .ch-doors { grid-template-columns: 1fr; gap: 12px; }
  .ch-door { padding: 16px; }
  .ch-door-title { font-size: 18px; }
}

/* ── شريط النقاط والعملات (النمط المطوّر) ──────────────────────────────── */
.ch-pro-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97);
  border-top: 2px solid rgba(15, 23, 42, .12);
  box-shadow: 0 -6px 18px rgba(15, 23, 42, .08);
  font-size: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ch-pro-bar::-webkit-scrollbar { display: none; }

.ch-pro-turn {
  display: flex;
  align-items: center;
  font-weight: 800;
  font-size: 14px;
  color: #0F172A;
  padding-inline-end: 10px;
  border-inline-end: 2px solid rgba(15, 23, 42, .1);
  white-space: nowrap;
}

.ch-pro-chip {
  display: grid;
  gap: 1px;
  padding: 6px 12px;
  border-radius: 14px;
  border: 2px solid rgba(15, 23, 42, .12);
  background: rgba(15, 23, 42, .03);
  min-width: 120px;
  white-space: nowrap;
}

.ch-pro-chip.is-red { border-color: #C0392B; background: rgba(192, 57, 43, .08); }
.ch-pro-chip.is-green { border-color: #1E8449; background: rgba(30, 132, 73, .08); }
.ch-pro-chip.is-yellow { border-color: #E6B400; background: rgba(230, 180, 0, .12); }
.ch-pro-chip.is-purple { border-color: #C2185B; background: rgba(194, 24, 91, .08); }
.ch-pro-chip.is-active { box-shadow: 0 0 0 3px rgba(15, 23, 42, .18); }

.ch-pro-name { font-weight: 800; font-size: 13px; }
.ch-pro-pts { font-weight: 800; font-size: 15px; }
.ch-pro-coins { font-size: 13px; font-weight: 700; color: #92400E; }
.ch-pro-mini { font-size: 11px; color: #475569; }

body.pro .ch-tools { bottom: 92px; }
body.pro .game-root { padding-bottom: 96px; }
body.pro .finish-actions { padding-bottom: 8px; }

/* ── مساحة المجموعة المتجاورة (SVG فوق الشبكة) ──────────────────────────── */
.pro-regions { border-radius: 18px; }
body.pro .grid { position: relative; }
body.pro .grid .box { position: relative; z-index: 1; }

.box.pro-wager { outline: 3px dashed #B45309; outline-offset: -3px; }
.box.pro-locked { box-shadow: inset 0 0 0 3px #0F172A; }
.box.pro-blocked { filter: grayscale(.7); opacity: .55; }
.box.pro-blocked::before {
  content: '⛔';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 22px;
}

.box[data-val]::after {
  content: attr(data-val);
  position: absolute;
  top: 2px;
  inset-inline-start: 4px;
  font-size: 10px;
  font-weight: 800;
  opacity: .75;
}

.box.pro-pick {
  outline: 4px dashed #0F172A;
  outline-offset: -4px;
  cursor: crosshair;
  animation: proPick 1s ease-in-out infinite;
}

@keyframes proPick {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* ── أزرار الأفعال ─────────────────────────────────────────────────────── */
.pro-qbar,
.pro-acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(76, 29, 149, .06);
  border: 1px dashed rgba(76, 29, 149, .35);
}

.pro-qbar-label,
.pro-acts-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #4C1D95;
  white-space: nowrap;
}

.pro-act {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 12px;
  border: 2px solid #4C1D95;
  background: #FFFFFF;
  color: #0F172A;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}

.pro-act:hover:not(.is-off) { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(76, 29, 149, .22); }
.pro-act:active:not(.is-off) { transform: translateY(0); }
.pro-act.is-off { opacity: .45; cursor: not-allowed; border-color: #94A3B8; }
.pro-act-cost { font-size: 12.5px; color: #92400E; font-weight: 800; }

/* ── اختيار فريق (تجميد / حجب) ─────────────────────────────────────────── */
.pro-chooser {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, .45);
  padding: 20px;
}

.pro-chooser[hidden] { display: none !important; }

.pro-chooser-title {
  margin: 0;
  padding: 16px 24px 4px;
  font-size: 16px;
  font-weight: 800;
  color: #0F172A;
  background: #FFFFFF;
  border-radius: 16px 16px 0 0;
  text-align: center;
}

.pro-chooser-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 12px 18px 16px;
  background: #FFFFFF;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .28);
}

.pro-chooser-btn {
  padding: 10px 18px;
  border-radius: 14px;
  border: 2px solid #0F172A;
  background: #FFFFFF;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.pro-chooser-btn.is-red { border-color: #C0392B; color: #C0392B; }
.pro-chooser-btn.is-green { border-color: #1E8449; color: #1E8449; }
.pro-chooser-btn.is-yellow { border-color: #B45309; color: #B45309; }
.pro-chooser-btn.is-purple { border-color: #C2185B; color: #C2185B; }

.pro-chooser-cancel {
  padding: 10px 14px;
  border-radius: 14px;
  border: 2px solid #94A3B8;
  background: #F8FAFC;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* ── شاشة الفائز (المطوّر) ──────────────────────────────────────────────── */
.ch-winner.is-pro .ch-winner-title,
.ch-t4-winner.is-pro .ch-winner-title { color: #4C1D95; }

.ch-t4-final { display: grid; gap: 6px; margin-top: 10px; width: 100%; }
.ch-t4-final-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, .04);
  border-inline-start: 6px solid #0F172A;
  font-size: 14px;
}
.ch-t4-final-row.is-red { border-inline-start-color: #C0392B; }
.ch-t4-final-row.is-green { border-inline-start-color: #1E8449; }
.ch-t4-final-row.is-yellow { border-inline-start-color: #E6B400; }
.ch-t4-final-row.is-purple { border-inline-start-color: #C2185B; }
.ch-t4-final-name { font-weight: 800; }
.ch-t4-final-nums { color: #334155; font-size: 13px; }

/* لوحة الأكشن بعد الإجابة — تظهر على الشبكة (الصناديق مرئية للاختيار) */
.pro-sheet {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: min(1040px, 94vw);
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  border: 2px solid rgba(76, 29, 149, .28);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .22);
  animation: sheetIn .34s cubic-bezier(.34, 1.56, .64, 1);
}
.pro-sheet-label { font-size: 13px; font-weight: 800; color: #4C1D95; margin-inline-end: 4px; }
.pro-sheet-skip {
  font: inherit; font-size: 13px; font-weight: 800;
  padding: 6px 14px; border-radius: 999px; cursor: pointer;
  border: 2px solid #94A3B8; background: #F8FAFC; color: #334155;
}
.pro-sheet-skip:hover { background: #E2E8F0; }
@keyframes sheetIn {
  from { opacity: 0; transform: translateX(-50%) translateY(18px) scale(.96); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
