/* فهيم — نمط مستوحى من سين جيم / تحداني */
:root {
  --orange: #f4772e;
  --orange-dark: #d95f18;
  --red: #ee3b2f;
  --grad: linear-gradient(120deg, #ee3b2f, #f79a3e);
  --bg: #f5f4f2;
  --card: #ffffff;
  --ink: #2b2b33;
  --ink-soft: #71717c;
  --sky: #dceafb;
  --info-blue: #2f7fd3;
  /* فريقان: لون + شكل (صديق لعمى الألوان) */
  --team-a: #1668b8;
  --team-b: #b34a0a;
  --radius: 18px;
  --shadow: 0 4px 16px rgba(40, 30, 20, .10);
  --shadow-lg: 0 10px 30px rgba(40, 30, 20, .16);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
  font-family: "Tajawal", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.screen { display: none; min-height: 100vh; flex-direction: column; }
.screen.active { display: flex; }

/* ═════ أزرار ═════ */
.btn {
  font-family: inherit; font-weight: 800; font-size: 1rem;
  border: none; border-radius: 999px; padding: .7em 1.7em;
  cursor: pointer; transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(.96); }
.btn-grad {
  background: var(--grad); color: #fff;
  box-shadow: 0 6px 18px rgba(238, 59, 47, .35);
}
.btn-grad:disabled {
  background: #cfcac3; box-shadow: none; cursor: not-allowed; color: #fff;
}
.btn-ghost { background: #fff; color: var(--ink); border: 2px solid #ddd6cc; }
.btn-big { font-size: 1.25rem; padding: .85em 2.6em; }
.btn-sm { font-size: .85rem; padding: .55em 1.2em; }
.btn-hero { font-size: 1.45rem; padding: .9em 3em; }

/* ═════ عناصر مشتركة ═════ */
.logo { font-size: 2rem; font-weight: 900; line-height: 1; }
.logo-dot { color: var(--orange); }
.logo-sm { font-size: 1.5rem; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-title { font-size: 2.2rem; font-weight: 900; text-align: center; }
.page-sub { color: var(--ink-soft); text-align: center; font-weight: 500; margin-top: 6px; }
.team-shape { font-size: 1.15rem; }
.shape-a, .team-a-accent .team-shape { color: var(--team-a); }
.shape-b, .team-b-accent .team-shape { color: var(--team-b); }

.site-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 28px;
}
.nav-actions { display: flex; gap: 8px; align-items: center; }
.platform-home { text-decoration: none; display: inline-flex; align-items: center; }

/* ═════ 1) الرئيسية ═════ */
.hero {
  text-align: center; padding: 40px 20px 30px; position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  overflow: hidden;
}
.hero-title { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 900; line-height: 1.2; }
.hero-sub { color: var(--ink-soft); font-size: 1.15rem; max-width: 560px; font-weight: 500; }
.hero-bubbles .hb {
  position: absolute; font-weight: 900; color: var(--orange);
  opacity: .14; user-select: none;
}
.hb1 { font-size: 9rem; top: 0; right: 6%; transform: rotate(-12deg); }
.hb2 { font-size: 6rem; bottom: 12%; left: 8%; transform: rotate(14deg); }
.hb3 { font-size: 4rem; top: 30%; left: 22%; transform: rotate(-6deg); }

.hero-cards { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; justify-content: center; }
.mini-card {
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 14px 20px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  transform: rotate(var(--rot)); transition: transform .2s;
}
.mini-card:hover { transform: rotate(0) translateY(-6px); }
.mini-card span { font-size: 2.4rem; }
.mini-card b { font-size: .9rem; font-weight: 800; }

.ll-showcase { text-align: center; padding: 44px 20px 60px; background: #fff; }
.section-title { font-size: 1.9rem; font-weight: 900; }
.section-sub { color: var(--ink-soft); margin: 8px 0 26px; }
.ll-showcase-grid {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  max-width: 1100px; margin: 0 auto;
}
.ll-show-card {
  background: var(--bg); border-radius: var(--radius); padding: 22px 18px;
  width: 200px; display: flex; flex-direction: column; gap: 8px; align-items: center;
  border: 2px solid #eee7db;
}
.ll-show-icon {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.7rem; color: #fff;
}
.ll-show-card b { font-weight: 900; font-size: 1.1rem; }
.ll-show-card p { font-size: .85rem; color: var(--ink-soft); line-height: 1.5; }
.ll-show-when {
  font-size: .72rem; font-weight: 800; background: var(--ink); color: #fff;
  border-radius: 999px; padding: 3px 12px;
}
.site-footer { text-align: center; color: var(--ink-soft); padding: 22px; font-size: .85rem; }

/* ═════ 2) نموذج الإنشاء ═════ */
.setup-wrap { flex: 1; padding: 10px 18px 60px; max-width: 980px; margin: 0 auto; width: 100%; }
.form-card {
  background: var(--card); border-radius: 24px; box-shadow: var(--shadow-lg);
  padding: 30px 28px; margin-top: 26px;
  display: flex; flex-direction: column; gap: 24px; align-items: stretch;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-weight: 800; }
.field input, .team-form input {
  font-family: inherit; font-size: 1.05rem; font-weight: 700;
  border: 2px solid #ddd6cc; border-radius: 14px; padding: 12px 16px;
  outline: none; background: #fff; color: var(--ink); width: 100%;
  transition: border-color .15s;
}
.field input:focus, .team-form input:focus { border-color: var(--orange); }

.teams-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.team-form {
  border: 3px solid; border-radius: 18px; padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.team-a-accent { border-color: var(--team-a); background: #1668b80d; }
.team-b-accent { border-color: var(--team-b); background: #b34a0a0d; }
.team-form-head { font-weight: 900; font-size: 1.15rem; display: flex; gap: 8px; align-items: center; }
.name-row { display: flex; gap: 8px; align-items: stretch; }
.dice-btn {
  flex-shrink: 0; width: 50px; border: none; border-radius: 14px;
  background: var(--grad); color: #fff; font-size: 1.35rem; cursor: pointer;
  box-shadow: 0 4px 12px rgba(238, 59, 47, .3); transition: transform .15s;
}
.dice-btn:hover { transform: rotate(20deg) scale(1.08); }
.dice-btn:active { transform: rotate(180deg) scale(.94); }
@keyframes namePop { 0% { transform: scale(.92); border-color: var(--orange); } 60% { transform: scale(1.03); } 100% { transform: scale(1); } }
.name-pop { animation: namePop .35s ease; }
.ll-pick-label { font-weight: 800; font-size: .92rem; display: flex; justify-content: space-between; align-items: center; }
.ll-count { background: var(--ink); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: .78rem; }
.ll-pick-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ll-chip {
  font-family: inherit; cursor: pointer; text-align: center;
  background: #fff; border: 2.5px solid #e2dcd2; border-radius: 14px;
  padding: 10px 8px 8px; width: calc(33.33% - 6px); min-width: 86px;
  display: flex; flex-direction: column; gap: 5px; align-items: center;
  filter: grayscale(1); opacity: .75; transition: border-color .15s, background .15s, opacity .15s;
  position: relative;
}
.ll-info {
  position: absolute; top: -8px; left: -8px; z-index: 3;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--info-blue); color: #fff; font-weight: 900; font-style: italic;
  font-family: Georgia, serif; font-size: .8rem;
  display: grid; place-items: center; cursor: help;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.ll-tip {
  position: absolute; bottom: calc(100% + 10px); right: 50%; transform: translateX(50%);
  z-index: 20; width: 190px; background: var(--ink); color: #fff;
  border-radius: 12px; padding: 10px 12px; font-size: .8rem; font-weight: 500;
  line-height: 1.55; text-align: right; pointer-events: none;
  opacity: 0; transition: opacity .15s; box-shadow: var(--shadow-lg);
}
.ll-tip::after {
  content: ""; position: absolute; top: 100%; right: 50%; transform: translateX(50%);
  border: 7px solid transparent; border-top-color: var(--ink);
}
.ll-tip b { display: block; font-weight: 900; margin-bottom: 2px; color: #ffd23e; }
.ll-tip em { display: block; font-style: normal; font-weight: 800; font-size: .72rem; margin-top: 5px; color: #9fdcac; }
.ll-info:hover ~ .ll-tip, .ll-info:focus ~ .ll-tip,
.ll-chip:hover .ll-tip, .ll-chip.tip-open .ll-tip { opacity: 1; }
.ll-chip .ll-chip-icon {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.15rem; color: #fff;
}
.ll-chip b { font-size: .78rem; font-weight: 800; }
.ll-chip.on { filter: none; opacity: 1; border-color: var(--info-blue); background: #2f7fd30d; }
.ll-chip:hover { filter: none; opacity: 1; }

/* ═════ 3) اختيار الفئات ═════ */
.cats-topbar {
  position: sticky; top: 0; z-index: 30; background: var(--bg);
  padding: 12px 18px 14px; border-bottom: 1px solid #e5e0d8;
  display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.cats-topbar-row {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  max-width: 1200px;
}
.cats-topbar .page-title { font-size: 1.6rem; }
.cats-topbar .page-sub { margin-top: 0; font-size: .9rem; }

/* ═════ شاشة اختيار الدولة ═════ */
.country-wrap {
  flex: 1; padding: 10px 18px 60px; max-width: 860px; margin: 0 auto; width: 100%;
  display: flex; flex-direction: column; gap: 18px; align-items: center;
}
.detect-status {
  font-weight: 700; color: var(--ink-soft); background: #fff;
  border-radius: 999px; padding: 8px 22px; box-shadow: var(--shadow);
}
.detect-status b { color: var(--orange-dark); }
.country-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px; width: 100%;
}
.country-card {
  font-family: inherit; cursor: pointer; position: relative;
  background: var(--card); border: 3px solid transparent; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 10px 16px;
  display: flex; flex-direction: column; gap: 10px; align-items: center;
  transition: transform .15s, border-color .15s;
}
.country-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.country-card img {
  width: 62px; height: 62px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 3px #fff, 0 2px 8px rgba(0,0,0,.25);
}
.country-card b { font-weight: 900; font-size: 1.1rem; }
.country-card.picked { border-color: var(--orange); background: #f4772e0d; }
.picked-check {
  position: absolute; top: 10px; right: 10px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--orange); color: #fff; font-weight: 900; font-size: .85rem;
  display: grid; place-items: center;
}
.detect-badge {
  position: absolute; top: -10px; right: 50%; transform: translateX(50%);
  background: var(--info-blue); color: #fff; font-size: .72rem; font-weight: 800;
  border-radius: 999px; padding: 3px 12px; white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.all-globe { font-size: 3.2rem; line-height: 62px; }
.country-card-all .all-globe { line-height: 1; padding: 4px 0; }

/* شارة الدولة المقفولة في شاشة الفئات */
.country-lock {
  display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; font-weight: 800;
  border-radius: 999px; padding: 8px 22px;
}
.country-lock img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #fff; }
.country-lock b { color: #ffd23e; }
.country-lock .lock-icon { opacity: .8; }
.country-lock .all-globe { font-size: 1.3rem; line-height: 1; }

.picker-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
#cat-search {
  font-family: inherit; font-size: 1rem; font-weight: 500;
  border: 2px solid #ddd6cc; border-radius: 999px;
  padding: 8px 18px; width: 260px; outline: none; background: #fff;
}
#cat-search:focus { border-color: var(--orange); }

#catalog { flex: 1; padding: 24px 90px 130px 18px; max-width: 1280px; margin: 0 auto; width: 100%; }
.group-section { margin-bottom: 38px; animation: fadeUp .35s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
.group-title {
  display: flex; width: fit-content; margin: 0 auto 20px; align-items: center; gap: 10px;
  background: var(--orange); color: #fff;
  font-weight: 900; font-size: 1.15rem; border-radius: 999px; padding: 8px 28px;
  box-shadow: 0 4px 12px rgba(244, 119, 46, .35);
}
.group-title img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #fff; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }

.cat-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); cursor: pointer; position: relative;
  border: 3px solid transparent; transition: transform .15s, border-color .15s, filter .25s, opacity .25s;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cat-art {
  height: 118px; display: grid; place-items: center; font-size: 3.2rem; position: relative;
  background:
    radial-gradient(circle at 30% 25%, #ffffffb0, transparent 42%),
    radial-gradient(circle at 75% 80%, #f4772e22, transparent 45%),
    linear-gradient(160deg, var(--sky), #eef5fd);
}
.cat-art::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(#1668b81a 1.5px, transparent 1.5px);
  background-size: 18px 18px;
}
.cat-art > * { position: relative; z-index: 1; }
.cat-flag {
  position: absolute; bottom: 8px; left: 10px; z-index: 2;
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0,0,0,.3);
}
.cat-info {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--info-blue); color: #fff; font-weight: 900; font-style: italic;
  display: grid; place-items: center; font-size: .95rem; font-family: Georgia, serif;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.cat-name {
  background: var(--orange); color: #fff; font-weight: 800;
  text-align: center; padding: 10px 6px; font-size: 1rem;
}
/* عند اكتمال الاختيار: غير المختار يصير رمادي مثل سين جيم */
.catalog-full .cat-card:not(.picked-a):not(.picked-b) { filter: grayscale(1); opacity: .6; }
.catalog-full .cat-card:not(.picked-a):not(.picked-b) .cat-name { background: #8f8a82; }
.cat-card.picked-a { border-color: var(--team-a); }
.cat-card.picked-b { border-color: var(--team-b); }
.pick-badge {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  min-width: 34px; height: 34px; border-radius: 999px; padding: 0 8px;
  display: grid; place-items: center;
  color: #fff; font-weight: 900; font-size: .85rem;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.picked-a .pick-badge { background: var(--team-a); }
.picked-b .pick-badge { background: var(--team-b); }

/* الشريط الجانبي للاختيارات */
.pick-rail {
  position: fixed; top: 50%; transform: translateY(-50%); left: 12px; z-index: 40;
  background: #fff; border-radius: 999px; box-shadow: var(--shadow-lg);
  padding: 12px 8px; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.rail-slots { display: flex; flex-direction: column; gap: 6px; }
.rail-slot {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--bg); border: 2px dashed #d8d2c8; font-size: 1.3rem; position: relative;
}
.rail-slot.filled-a { border: 2.5px solid var(--team-a); background: #1668b814; }
.rail-slot.filled-b { border: 2.5px solid var(--team-b); background: #b34a0a14; }
.rail-slot .rail-x {
  position: absolute; top: -6px; right: -6px; width: 18px; height: 18px;
  background: var(--red); color: #fff; border-radius: 50%; font-size: .65rem;
  display: grid; place-items: center; cursor: pointer; font-weight: 900;
}
.rail-btn {
  width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--orange); color: #fff; font-size: 1.05rem;
  display: grid; place-items: center; transition: transform .15s;
}
.rail-btn:hover { transform: scale(1.1); }

.cats-footer {
  position: fixed; bottom: 0; right: 0; left: 0; z-index: 30;
  padding: 12px 16px 16px; text-align: center;
  background: linear-gradient(0deg, var(--bg) 70%, transparent);
  display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.pick-status { font-weight: 800; color: var(--ink-soft); background: #ffffffd9; border-radius: 999px; padding: 4px 18px; }
.pick-status b.a { color: var(--team-a); }
.pick-status b.b { color: var(--team-b); }

/* ═════ 4) لوحة اللعب ═════ */
.board-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; gap: 12px;
}
.board-title-wrap { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.board-game-name { font-weight: 900; font-size: 1.05rem; color: var(--ink-soft); }
.turn-banner {
  font-weight: 900; font-size: 1.1rem; border-radius: 999px; padding: 7px 24px;
  color: #fff; display: flex; align-items: center; gap: 8px;
}
.turn-banner.turn-a { background: var(--team-a); }
.turn-banner.turn-b { background: var(--team-b); }

.board-grid {
  flex: 1; display: grid; gap: 10px; padding: 8px 16px 14px;
  grid-template-columns: repeat(6, 1fr);
  max-width: 1300px; margin: 0 auto; width: 100%;
}
.board-col { display: flex; flex-direction: column; gap: 8px; }
.board-cat {
  background: var(--ink); color: #fff; border-radius: 14px;
  text-align: center; font-weight: 800; font-size: .92rem;
  padding: 10px 4px; min-height: 68px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  line-height: 1.25;
}
.board-cat .bc-icon { font-size: 1.3rem; }
.board-cat small { color: #ffffff99; font-weight: 700; }
.q-cell {
  font-family: inherit; font-weight: 900; font-size: 1.25rem;
  background: var(--card); color: var(--orange-dark);
  border: 2px solid #eee7db; border-radius: 999px;
  padding: 13px 4px; cursor: pointer; transition: transform .12s, border-color .12s;
}
.q-cell:hover:not(:disabled) { transform: scale(1.05); border-color: var(--orange); }
.q-cell:disabled { background: #eae6df; color: #b6b0a6; cursor: default; text-decoration: line-through; }

.score-panel {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 12px 16px 16px; max-width: 940px; margin: 0 auto; width: 100%;
}
.team-score {
  border-radius: var(--radius); padding: 12px 16px; color: #fff;
  display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.team-a-bg { background: var(--team-a); }
.team-b-bg { background: var(--team-b); }
.ts-row { display: flex; gap: 8px; font-weight: 800; font-size: 1.05rem; align-items: center; }
.ts-row .team-shape { color: #fff; }
.ts-points { font-size: 2.1rem; font-weight: 900; line-height: 1; }
.lifelines { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.ll-btn {
  font-family: inherit; font-size: .8rem; font-weight: 700;
  background: #ffffff26; color: #fff; border: 1.5px solid #ffffff88;
  border-radius: 999px; padding: 4px 11px; cursor: pointer;
}
.ll-btn:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }

/* ═════ 5) السؤال ═════ */
#screen-question { background: #23232b; color: #fff; }
.q-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; gap: 10px; }
.q-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.chip { border-radius: 999px; padding: 6px 18px; font-weight: 800; font-size: 1rem; }
.chip-cat { background: #ffffff22; color: #fff; }
.chip-points { background: var(--grad); color: #fff; }
.chip-effect { background: #ffd23e; color: #4a3800; }
.chip-team-a { background: var(--team-a); color: #fff; }
.chip-team-b { background: var(--team-b); color: #fff; }
.btn-correct { background: #1f8a3d; box-shadow: 0 4px 0 #15642b; }
.btn-wrong { background: #c0362c; box-shadow: 0 4px 0 #8f261e; }
.steal-label {
  flex-basis: 100%; text-align: center; font-weight: 900; font-size: 1.25rem;
  color: #ffd23e; margin-bottom: 4px;
}
.steal-label b { color: #fff; }
.q-timer {
  width: 64px; height: 64px; border-radius: 50%; border: 4px solid var(--orange);
  display: grid; place-items: center; font-size: 1.5rem; font-weight: 900; flex-shrink: 0;
}
.q-timer.low { border-color: #ff4d4d; animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }
.q-body {
  flex: 1; display: flex; flex-direction: column; gap: 26px;
  align-items: center; justify-content: center; padding: 20px; text-align: center;
}
.q-text { font-size: clamp(1.5rem, 4vw, 2.6rem); font-weight: 800; max-width: 920px; line-height: 1.55; }
.a-text {
  font-size: clamp(1.3rem, 3.5vw, 2.2rem); font-weight: 900;
  color: #7be08a; background: #ffffff12;
  border: 2px dashed #7be08a; border-radius: var(--radius); padding: 18px 36px;
}
.a-text::before { content: "الجواب: "; color: #ffffffaa; font-weight: 700; }
.q-lifelines { display: flex; gap: 10px; justify-content: center; padding: 0 16px; flex-wrap: wrap; }
.q-lifelines .ll-btn { border-color: #ffffff55; font-size: .9rem; }
.q-footer { padding: 20px; text-align: center; }
.award-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-award { color: #fff; font-size: 1.1rem; }

/* ═════ 6) النتيجة ═════ */
#screen-result { align-items: center; justify-content: center; text-align: center; position: relative; overflow: hidden; }
.result-body { z-index: 2; display: flex; flex-direction: column; gap: 18px; align-items: center; padding: 30px; }
.result-trophy { font-size: 5rem; }
#result-title { font-size: 2.2rem; font-weight: 900; }
.result-scores { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.result-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; align-items: center; }
.result-actions a { text-decoration: none; display: inline-flex; align-items: center; }
.result-scores .team-score { min-width: 210px; }
#confetti { position: absolute; inset: 0; pointer-events: none; }

/* ═════ نوافذ وإشعارات ═════ */
.overlay { position: fixed; inset: 0; background: #000a; z-index: 50; display: grid; place-items: center; }
.overlay-card {
  background: #fff; color: var(--ink); border-radius: 24px;
  padding: 36px 46px; text-align: center; display: flex;
  flex-direction: column; gap: 12px; align-items: center; max-width: 90vw;
}
.call-icon { font-size: 3rem; }
.call-timer { font-size: 3.2rem; font-weight: 900; color: var(--orange); }
.toast {
  position: fixed; bottom: 24px; right: 50%; transform: translateX(50%);
  background: var(--ink); color: #fff; font-weight: 700;
  border-radius: 999px; padding: 12px 28px; z-index: 60; box-shadow: var(--shadow-lg);
  text-align: center; max-width: 92vw;
}

/* ═════ استجابة ═════ */
@media (max-width: 900px) {
  .teams-grid { grid-template-columns: 1fr; }
  #catalog { padding: 20px 16px 150px; }
  .pick-rail { flex-direction: row; top: auto; bottom: 92px; left: 50%; transform: translateX(-50%); padding: 8px 12px; }
  .rail-slots { flex-direction: row; }
  .rail-slot { width: 38px; height: 38px; font-size: 1.1rem; }
}
@media (max-width: 760px) {
  .board-grid { grid-template-columns: repeat(3, 1fr); }
  .q-timer { width: 52px; height: 52px; font-size: 1.2rem; }
  .hb1 { font-size: 5rem; }
}
