/**
 * لوبي عجلة الحظ — استوديو TV (متناسق مع luck-wheel.css)
 */

/* luck-wheel.css يضبط html { overflow: hidden } — نسمح بالتمرير في لوبي العجلة فقط */
html.lobby-boot-wheel {
  height: auto !important;
  min-height: 100%;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

html.lobby-boot-wheel body.lobby-theme-wheel {
  height: auto !important;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: visible !important;
}

body.lobby-theme-wheel {
  --wl-gold: #f0b429;
  --wl-gold-light: #ffe9a8;
  --wl-purple: #7c3aed;
  --wl-deep: #1a0a2e;
  --wl-panel: rgba(18, 6, 31, 0.72);
  --wl-border: rgba(251, 191, 36, 0.38);
  --wl-text: #fff8e7;
  --wl-muted: rgba(255, 248, 231, 0.72);
}

body.lobby-theme-wheel #particles {
  opacity: 0.22;
  mix-blend-mode: screen;
}

/* —— خلفية الاستوديو (فقط لوبي العجلة) —— */
body:not(.lobby-theme-wheel) .wl-lobby-bg {
  display: none !important;
}

body.lobby-theme-wheel .wl-lobby-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--wl-deep);
}

.wl-lobby-bg__canvas {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 42% at 50% -8%, rgba(255, 233, 168, 0.28), transparent 58%),
    radial-gradient(ellipse 85% 50% at 50% 108%, rgba(124, 58, 237, 0.32), transparent 62%),
    radial-gradient(ellipse 48% 40% at 12% 55%, rgba(168, 85, 247, 0.2), transparent 68%),
    radial-gradient(ellipse 44% 38% at 88% 48%, rgba(245, 158, 11, 0.14), transparent 65%),
    linear-gradient(165deg, #12061f 0%, #1a0a2e 35%, #261245 68%, #12061f 100%);
}

.wl-lobby-bg__wheel {
  position: absolute;
  left: 50%;
  top: 38%;
  width: min(130vmax, 1600px);
  height: min(130vmax, 1600px);
  transform: translate(-50%, -50%);
  opacity: 0.38;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from -18deg,
    rgba(255, 233, 168, 0.14) 0deg 28deg,
    rgba(124, 58, 237, 0.16) 28deg 56deg
  );
  mask-image: radial-gradient(circle, #000 0%, #000 38%, transparent 68%);
  -webkit-mask-image: radial-gradient(circle, #000 0%, #000 38%, transparent 68%);
}

.wl-lobby-bg__wheel::after {
  content: '';
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  border: 2px solid rgba(255, 233, 168, 0.12);
  box-shadow: inset 0 0 80px rgba(124, 58, 237, 0.25);
}

.wl-lobby-bg__rays {
  position: absolute;
  inset: -20%;
  opacity: 0.55;
  background: repeating-conic-gradient(
    from 0deg,
    transparent 0deg 8deg,
    rgba(255, 233, 168, 0.04) 8deg 9deg
  );
  mask-image: radial-gradient(circle at 50% 42%, #000 0%, transparent 55%);
  -webkit-mask-image: radial-gradient(circle at 50% 42%, #000 0%, transparent 55%);
}

body.lobby-theme-wheel #site-page,
body.lobby-theme-wheel .main-container {
  position: relative;
  z-index: 2;
}

body.lobby-theme-wheel .main-container .setup-section.is-wheel-mode {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  border: none;
  padding-top: clamp(12px, 3vw, 28px);
  padding-bottom: clamp(28px, 5vw, 48px);
  padding-inline: clamp(12px, 3vw, 40px);
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}

/* —— ترويسة —— */
body.lobby-theme-wheel .wl-lobby-hero {
  margin: 0 auto clamp(22px, 4vw, 36px);
  padding-inline: clamp(8px, 2vw, 24px);
  max-width: min(100%, 920px);
  overflow: visible;
}

body.lobby-theme-wheel h1.wl-lobby-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vw, 28px);
  margin: 0;
  padding: 0.12em 0 0.06em;
  font-size: unset;
  font-weight: inherit;
  line-height: normal;
  overflow: visible;
  color: inherit;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: unset;
  text-shadow: none;
  letter-spacing: 0;
}

body.lobby-theme-wheel .wl-lobby-title__rule {
  flex: 1 1 0;
  min-width: 32px;
  max-width: 140px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 233, 168, 0.15) 18%,
    rgba(255, 233, 168, 0.75) 50%,
    rgba(255, 233, 168, 0.15) 82%,
    transparent 100%
  );
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.22);
}

body.lobby-theme-wheel .wl-lobby-title__text {
  flex: 0 1 auto;
  max-width: 100%;
  display: inline-block;
  overflow: visible;
  font-size: clamp(1.7rem, 3.6vw, 2.35rem);
  font-weight: 900;
  line-height: 1.45;
  padding-block: 0.2em 0.1em;
  letter-spacing: 0.02em;
  text-align: center;
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #fff7e6 38%,
    #f5d78a 72%,
    #e8c060 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  filter:
    drop-shadow(0 1px 0 rgba(26, 10, 46, 0.5))
    drop-shadow(0 0 1px rgba(255, 255, 255, 0.35))
    drop-shadow(0 0 20px rgba(168, 85, 247, 0.28));
}

@media (max-width: 480px) {
  body.lobby-theme-wheel .wl-lobby-title__rule {
    max-width: 48px;
  }

  body.lobby-theme-wheel .wl-lobby-title__text {
    letter-spacing: 0.02em;
  }
}

/* —— شرح تطبيقي (نسخة مصغّرة من lw-screen) —— */
body.lobby-theme-wheel .wheel-lobby-guide {
  width: min(100%, 720px);
  margin: 0 auto clamp(18px, 3vw, 28px);
  text-align: center;
}

body.lobby-theme-wheel .wheel-lobby-guide__caption {
  margin: 0 0 12px;
  padding: 0 8px;
  font-size: clamp(0.88rem, 2.6vw, 1rem);
  font-weight: 800;
  line-height: 1.55;
  color: var(--wl-muted);
  min-height: 2.85em;
}

body.lobby-theme-wheel .wl-demo {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
}

body.lobby-theme-wheel .wl-demo__screen {
  min-height: 300px;
  max-height: 360px;
  height: auto;
  padding: 8px 10px 6px;
}

body.lobby-theme-wheel .wl-demo__infobar {
  display: none !important;
}

body.lobby-theme-wheel .wl-demo__board {
  min-height: 140px;
  align-items: center;
  justify-content: center;
}

body.lobby-theme-wheel .wl-demo__puzzle.lw-puzzle-grid {
  --demo-tile: 46px;
}

body.lobby-theme-wheel .wl-demo__puzzle .lw-tile {
  width: var(--demo-tile);
  height: calc(var(--demo-tile) * 1.12);
  font-size: 1.25rem;
}

body.lobby-theme-wheel .wl-demo__topic-pick {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  background: rgba(8, 3, 18, 0.72);
  backdrop-filter: blur(6px);
}

body.lobby-theme-wheel .wl-demo__topic-pick[hidden] {
  display: none !important;
}

body.lobby-theme-wheel .wl-demo__topic-pick-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  color: rgba(255, 248, 231, 0.75);
}

body.lobby-theme-wheel .wl-demo__topic-pick-value {
  margin: 0;
  font-size: clamp(1.1rem, 4vw, 1.45rem);
  font-weight: 900;
  color: var(--gold-light, var(--wl-gold-light));
}

body.lobby-theme-wheel .wl-demo__letter-pop {
  position: absolute;
  left: 50%;
  bottom: 18%;
  transform: translateX(-50%);
  z-index: 4;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-weight: 900;
  font-size: 1.2rem;
  color: #1a0a2e;
  background: linear-gradient(180deg, #ffe9a8, #f0b429);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  animation: wl-demo-letter-pop 0.65s ease;
}

body.lobby-theme-wheel .wl-demo__letter-pop.is-wrong {
  background: linear-gradient(180deg, #fecaca, #ef4444);
  color: #fff;
}

body.lobby-theme-wheel .wl-demo__letter-pop[hidden] {
  display: none !important;
}

@keyframes wl-demo-letter-pop {
  0% { opacity: 0; transform: translateX(-50%) translateY(8px) scale(0.85); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

body.lobby-theme-wheel .wl-demo__wheel-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: rgba(8, 3, 18, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.lobby-theme-wheel .wl-demo__wheel-layer[hidden] {
  display: none !important;
}

body.lobby-theme-wheel .wl-demo__wheel-card {
  width: min(100%, 280px);
  padding: 6px 8px 8px;
  background: linear-gradient(165deg, rgba(45, 26, 74, 0.95), rgba(18, 8, 32, 0.98));
}

body.lobby-theme-wheel .wl-demo__wheel-stage {
  width: min(72vw, 240px);
  height: min(72vw, 240px);
  flex: none;
}

body.lobby-theme-wheel .wl-demo__wheel-wrap {
  width: 100%;
  height: 100%;
}

body.lobby-theme-wheel .wl-demo__rotor {
  transform-origin: 50% 50%;
}

body.lobby-theme-wheel .wl-demo.is-spin-result .wl-demo__wheel-card {
  border: 1px solid rgba(251, 191, 36, 0.45);
}

body.lobby-theme-wheel .wl-demo.is-spin-result .lw-wheel-card__result {
  border: 1px solid rgba(251, 191, 36, 0.55);
  background: rgba(12, 4, 24, 0.72);
  border-radius: 12px;
  padding: 8px 10px;
  font-weight: 900;
  color: var(--gold-light, var(--wl-gold-light));
}

body.lobby-theme-wheel .wl-demo .lw-wheel-footer .lw-power-stack,
body.lobby-theme-wheel .wl-demo .lw-wheel-footer .lw-spin-btn {
  display: none !important;
}

/* معاينة اللوبي — نفس ترتيب اللعبة: الاسم والنقاط جنب بعض (الاسم بدون ...) */
body.lobby-theme-wheel .wl-demo .lw-screen__playerbar-side {
  overflow: visible;
}

body.lobby-theme-wheel .wl-demo .lw-screen__playerbar .lw-seat--hd {
  width: auto;
  min-width: min(120px, 28vw);
  max-width: min(320px, 50vw);
  align-items: center;
}

body.lobby-theme-wheel .wl-demo .lw-screen__playerbar .lw-seat__body {
  flex: 1;
  min-width: 0;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body.lobby-theme-wheel .wl-demo .lw-screen__playerbar .lw-seat__scores {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  flex-shrink: 0;
  line-height: 1.15;
}

body.lobby-theme-wheel .wl-demo .lw-screen__playerbar .lw-seat__name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: clamp(0.82rem, 2vw, 1.05rem);
  line-height: 1.2;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: break-word;
  text-align: right;
}

/* luck-wheel.css يخفي playerbar ≤1250px — المعاينة تحتاج الفرق ظاهرة على الجوال */
@media (max-width: 1250px) {
  body.lobby-theme-wheel .wl-demo .lw-screen__playerbar {
    display: flex !important;
    flex-shrink: 0;
    gap: 4px;
    padding: 4px 2px 6px;
  }

  body.lobby-theme-wheel .wl-demo .lw-screen__playerbar-side {
    flex: 1 1 0;
    min-width: 0;
    gap: 4px;
  }

  body.lobby-theme-wheel .wl-demo .lw-screen__playerbar .lw-seat--hd {
    width: auto;
    max-width: none;
    flex: 1 1 0;
    min-width: 0;
    padding: 3px 4px;
  }

  body.lobby-theme-wheel .wl-demo .lw-screen__playerbar .lw-seat__avatar {
    width: 28px;
    height: 28px;
  }

  body.lobby-theme-wheel .wl-demo .lw-screen__playerbar .lw-seat__name {
    font-size: clamp(0.68rem, 3vw, 0.86rem);
  }

  body.lobby-theme-wheel .wl-demo .lw-screen__playerbar .lw-seat__score--round {
    font-size: clamp(0.68rem, 2.8vw, 0.84rem);
  }

  body.lobby-theme-wheel .wl-demo .lw-screen__playerbar .lw-seat__score--total {
    font-size: clamp(0.62rem, 2.5vw, 0.76rem);
  }
}

/* —— أ panels —— */
body.lobby-theme-wheel #wheelTopicsPanel.wl-panel {
  max-width: min(100%, 1440px);
  width: 100%;
  box-sizing: border-box;
}

body.lobby-theme-wheel .wl-panel {
  max-width: 820px;
  margin-inline: auto;
  margin-bottom: 18px;
  padding: clamp(14px, 3vw, 20px) clamp(14px, 3.5vw, 22px);
  border-radius: 18px;
  border: 1px solid var(--wl-border);
  background:
    linear-gradient(145deg, rgba(45, 26, 74, 0.55), var(--wl-panel));
  box-shadow:
    0 0 0 1px rgba(124, 58, 237, 0.2) inset,
    0 16px 40px rgba(0, 0, 0, 0.35);
}

body.lobby-theme-wheel .wl-panel__head {
  text-align: center;
  margin-bottom: 12px;
}

body.lobby-theme-wheel .wl-panel__head h2 {
  margin: 0 0 4px;
  font-size: 1.12rem;
  font-weight: 900;
  color: var(--wl-text);
}

body.lobby-theme-wheel .wl-panel__head h2::after {
  display: none;
}

/* —— عناوين أقسام اللوبي (أخف من الترويسة الرئيسية) —— */
body.lobby-theme-wheel .wl-panel__head h2.wheel-section-title {
  margin: 0 0 2px;
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  font-weight: 800;
  line-height: 1.35;
  color: rgba(255, 244, 220, 0.96);
  letter-spacing: 0.01em;
}

body.lobby-theme-wheel .wl-panel__head h2.wheel-section-title::after {
  display: block;
  content: "";
  width: 42px;
  height: 2px;
  margin: 7px auto 0;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(245, 158, 11, 0.55),
    transparent
  );
}

body.lobby-theme-wheel .wl-panel__sub {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--wl-muted);
}

/* —— مواضيع: شكل فاتورة — رؤوس مثلثية محدبة فوق/تحت، جوانب سادة —— */
body.lobby-theme-wheel .wheel-topics-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
  gap: 14px 12px;
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-block: 6px 4px;
  overflow: visible;
}

@media (min-width: 720px) {
  body.lobby-theme-wheel .wheel-topics-grid {
    gap: 18px 16px;
  }
}

body.lobby-theme-wheel .wheel-topic-tile {
  position: relative;
  flex: 0 1 108px;
  width: 108px;
  max-width: calc(50% - 6px);
  aspect-ratio: 100 / 148;
  min-width: 0;
  margin-inline-end: 0;
  transform: none;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.22));
  container-type: size;
  overflow: visible;
}

@media (min-width: 720px) {
  body.lobby-theme-wheel .wheel-topic-tile {
    flex: 0 0 128px;
    width: 128px;
    max-width: 128px;
  }
}

body.lobby-theme-wheel .wheel-topic-tile__ticket {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

body.lobby-theme-wheel .wheel-topic-tile__ticket-path {
  paint-order: stroke fill;
}

body.lobby-theme-wheel .wheel-topic-tile__edge {
  display: none;
}

body.lobby-theme-wheel .wheel-topic-tile.is-selected {
  opacity: 1;
  transform: none;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.28));
}

body.lobby-theme-wheel .wheel-topic-tile.is-selected .wheel-topic-tile__ticket {
  filter: brightness(1.08) saturate(1.06);
}

body.lobby-theme-wheel .wheel-topic-tile:not(.is-selected) {
  opacity: 1;
  transform: none;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.22));
}

body.lobby-theme-wheel .wheel-topic-tile:not(.is-selected) .wheel-topic-tile__ticket {
  filter: grayscale(0.78) brightness(0.93) saturate(0.35);
}

body.lobby-theme-wheel .wheel-topic-tile__select {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 15% 10px 14% 10px;
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
  overflow: hidden;
}

body.lobby-theme-wheel .wheel-topic-tile__select:hover,
body.lobby-theme-wheel .wheel-topic-tile__select:focus-visible {
  outline: none;
}

body.lobby-theme-wheel .wheel-topic-tile__name {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 4px 3px;
  box-sizing: border-box;
  overflow: hidden;
  font-size: clamp(0.78rem, 13.2cqh, 1.14rem);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: 0.01em;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  color: #ede9fe;
  -webkit-text-stroke: 0.9px #3b0764;
  paint-order: stroke fill;
  text-shadow:
    0 1px 0 #ddd6fe,
    0 2px 0 #a78bfa,
    0 3px 0 #7c3aed;
}

@supports not (font-size: 1cqh) {
  body.lobby-theme-wheel .wheel-topic-tile__name {
    font-size: clamp(0.78rem, 2.9vw, 1.08rem);
  }
}

body.lobby-theme-wheel .wheel-topic-tile.is-selected .wheel-topic-tile__name {
  color: #faf5ff;
  -webkit-text-stroke: 1px #2e1065;
  text-shadow:
    0 1px 0 #e9d5ff,
    0 2px 0 #c4b5fd,
    0 3px 0 #8b5cf6;
}

body.lobby-theme-wheel .wheel-topic-tile:not(.is-selected) .wheel-topic-tile__name {
  color: #ddd6fe;
  -webkit-text-stroke: 0.85px #4c1d95;
  text-shadow:
    0 1px 0 #c4b5fd,
    0 2px 0 #9333ea,
    0 3px 0 #6b21a8;
  opacity: 0.9;
}

body.lobby-theme-wheel .wheel-topic-tile__name-keep {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
}

/* تعجب + تولتيب — أسلوب بطاقة لعبة (دائرة بيضاء + حد أسود) */
body.lobby-theme-wheel .wheel-topic-tile__info {
  position: absolute;
  top: 11%;
  inset-inline-start: 6px;
  z-index: 5;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff;
  border: 2.5px solid #120818;
  color: #120818;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.35),
    0 3px 6px rgba(0, 0, 0, 0.28);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  transform: none;
  padding-bottom: 1px;
}

body.lobby-theme-wheel .wheel-topic-tile__info:hover,
body.lobby-theme-wheel .wheel-topic-tile__info:focus-visible {
  transform: translateY(-1px) scale(1.08);
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.38),
    0 5px 10px rgba(0, 0, 0, 0.32);
  outline: none;
}

body.lobby-theme-wheel .wheel-topic-tile:not(.is-selected) .wheel-topic-tile__info {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(18, 8, 24, 0.75);
  color: rgba(18, 8, 24, 0.85);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
}

body.lobby-theme-wheel .wheel-topic-tile__tooltip {
  position: absolute;
  top: calc(11% + 28px);
  inset-inline: 6px;
  z-index: 6;
  padding: 7px 9px;
  border-radius: 10px;
  background: #fffef8;
  border: 2px solid #120818;
  color: #1a0a2e;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  max-height: min(38vh, 108px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow:
    0 6px 0 rgba(18, 8, 24, 0.2),
    0 10px 22px rgba(0, 0, 0, 0.32);
  display: none;
}

body.lobby-theme-wheel .wheel-topic-tile__tooltip.visible {
  display: block;
}

body.lobby-theme-wheel .wheel-topic-tile__tooltip::before {
  content: '';
  position: absolute;
  top: -6px;
  inset-inline-start: 13px;
  width: 10px;
  height: 10px;
  background: #fffef8;
  border-inline-start: 2px solid #120818;
  border-top: 2px solid #120818;
  transform: rotate(45deg);
  pointer-events: none;
}

/* —— اللاعبون (عدد + مقاعد في لوحة واحدة) —— */
body.lobby-theme-wheel .wheel-players-unified__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  margin-bottom: 4px;
}

body.lobby-theme-wheel .wheel-players-unified__intro {
  width: 100%;
}

/* —— طريقة اللعب (نفس بنية المافيا / خلية الحروف) —— */
body.lobby-theme-wheel #wheelPlayModePanel.wl-panel {
  max-width: min(100%, 920px);
}

body.lobby-theme-wheel .wheel-host-mode-block {
  width: 100%;
  margin: 0;
}

body.lobby-theme-wheel .wheel-host-mode-block .mafia-panel.mafia-lobby-play {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

body.lobby-theme-wheel .wheel-host-mode-block .mafia-panel.mafia-lobby-play > h2 {
  margin: 0 0 14px;
  padding-bottom: 0;
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.01em;
  color: rgba(255, 244, 220, 0.96);
  text-shadow: none;
}

body.lobby-theme-wheel .wheel-host-mode-block .mafia-panel.mafia-lobby-play > h2::after {
  display: block !important;
  content: "";
  position: static;
  transform: none;
  width: 42px;
  height: 2px;
  margin: 7px auto 0;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(245, 158, 11, 0.55),
    transparent
  );
}

body.lobby-theme-wheel .team-count-block--center {
  width: 100%;
  display: flex;
  justify-content: center;
}

body.lobby-theme-wheel .team-count-controls {
  gap: 16px;
  margin: 0;
  justify-content: center;
}

body.lobby-theme-wheel .team-count-btn {
  width: 48px;
  height: 48px;
  font-size: 1.6rem;
  font-weight: 800;
  border: 2px solid rgba(255, 233, 168, 0.45);
  background: linear-gradient(180deg, #ffe9a8, #d97706);
  color: #1a0a2e;
  box-shadow: 0 4px 0 #92400e, 0 8px 20px rgba(0, 0, 0, 0.3);
}

body.lobby-theme-wheel .team-count-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 #92400e, 0 10px 24px rgba(251, 191, 36, 0.25);
}

body.lobby-theme-wheel #teamCountDisplay {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--wl-gold-light);
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.35);
  min-width: 3rem;
}

/* —— مقاعد اللاعبين —— */
body.lobby-theme-wheel .wheel-players-grid {
  gap: 12px;
  margin: 0;
  padding: 0;
  max-width: 100%;
}

body.lobby-theme-wheel .team-card--wheel-player.wl-player-seat {
  position: relative;
  padding: 14px 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(168, 85, 247, 0.35);
  background:
    linear-gradient(160deg, rgba(45, 26, 74, 0.65), rgba(12, 4, 24, 0.88));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
}

body.lobby-theme-wheel .team-card--wheel-player.wl-player-seat:hover {
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38), 0 0 20px rgba(124, 58, 237, 0.2);
}

body.lobby-theme-wheel .wl-player-seat__num {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 900;
  color: #1a0a2e;
  background: linear-gradient(180deg, var(--wl-gold-light), var(--wl-gold));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

body.lobby-theme-wheel .team-card--wheel-player .team-image-wrap {
  padding: 4px;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--wl-gold-light), var(--wl-purple), var(--wl-gold));
}

body.lobby-theme-wheel .team-card--wheel-player .team-image {
  width: 84px;
  height: 84px;
  border: none;
  border-radius: 999px;
}

body.lobby-theme-wheel .team-card--wheel-player .image-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(18, 6, 31, 0.85);
  color: var(--wl-gold-light);
  font-size: 0.85rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

body.lobby-theme-wheel .team-card--wheel-player .image-nav-btn:hover {
  background: rgba(124, 58, 237, 0.45);
  border-color: rgba(255, 233, 168, 0.55);
}

body.lobby-theme-wheel .wl-player-name-field {
  position: relative;
  width: 100%;
}

body.lobby-theme-wheel .team-card--wheel-player .team-name-input {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(168, 85, 247, 0.4);
  background: rgba(8, 2, 18, 0.92);
  color: var(--wl-text);
  font-weight: 700;
  text-align: center;
  text-shadow: none;
  font-style: normal;
  margin: 0;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
  text-overflow: clip;
  white-space: nowrap;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

body.lobby-theme-wheel .team-card--wheel-player .team-name-input:focus {
  outline: none;
  border-color: rgba(251, 191, 36, 0.65);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}

/* تلميح مرئي بدل ::placeholder — يتجنّب نقاط بيضاء عند حرف العين في Chrome */
body.lobby-theme-wheel .wl-player-name-hint {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  pointer-events: none;
  color: #a898b8;
  font-weight: 600;
  font-size: 1em;
  line-height: 1.35;
  text-align: center;
  text-shadow: none;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
}

body.lobby-theme-wheel .wl-player-name-hint[hidden] {
  display: none !important;
}

body.lobby-theme-wheel .wl-player-name-field:focus-within .wl-player-name-hint,
body.lobby-theme-wheel .wl-player-name-field.has-value .wl-player-name-hint {
  display: none !important;
}

/* —— زر البدء —— */
body.lobby-theme-wheel .start-btn {
  display: block;
  width: min(100%, 360px);
  margin: 22px auto 0;
  padding: 14px 28px;
  font-size: 1.12rem;
  font-weight: 900;
  border-radius: 999px;
  border: 2px solid rgba(255, 233, 168, 0.55);
  background: linear-gradient(180deg, #ffe9a8 0%, #f0b429 45%, #d97706 100%);
  color: #1a0a2e;
  box-shadow:
    0 4px 0 #92400e,
    0 14px 36px rgba(251, 191, 36, 0.35),
    0 0 32px rgba(124, 58, 237, 0.25);
}

body.lobby-theme-wheel .start-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow:
    0 6px 0 #92400e,
    0 18px 40px rgba(251, 191, 36, 0.4);
}

body.lobby-theme-wheel .start-btn::after {
  display: none;
}
