/* شريط العنوان العلوي */
    .header-banner {
      position: fixed;
      top: 0;
      right: 0;
      left: 0;
      height: 80px;
      background: rgba(26, 10, 46, 0.55);
      backdrop-filter: blur(20px) saturate(1.4);
      -webkit-backdrop-filter: blur(20px) saturate(1.4);
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: flex-start;
      padding: 0 20px;
      box-shadow: 0 4px 32px rgba(0, 0, 0, 0.45);
      z-index: 1000;
      border-bottom: 1px solid rgba(168, 85, 247, 0.35);
    }

    .header-content {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex: 1;
      min-width: 0;
      width: 100%;
      max-width: 1400px;
      margin: 0 auto;
      position: relative;
    }

    /* شعار الفريق - في المنتصف تماماً */
    .header-image {
      width: 60px;
      height: 60px;
      border-radius: 12px;
      object-fit: cover;
      border: 2px solid rgba(168, 85, 247, 0.45);
      box-shadow: 0 0 22px rgba(124, 58, 237, 0.45), 0 4px 16px rgba(0, 0, 0, 0.35);
      background: linear-gradient(135deg, #7c3aed, #4c1d95);
      padding: 3px;
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
    }

    .header-wheel-slot {
      position: absolute;
      top: 60%;
      left: 72%;
      transform: translate(-50%, -50%);
      z-index: 1001;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      cursor: pointer;
      user-select: none;
      max-width: min(200px, 42vw);
    }

    .header-wheel-slot .header-wheel-image {
      width: 150px;
      height: 150px;
      object-fit: contain;
      display: block;
      user-select: none;
    }

    .header-wheel-image.is-used-gray {
      filter: grayscale(1) brightness(0.88) opacity(0.72);
    }

    /* طالما نتيجة العجلة سارية: لا تُعرض صورة العجلة إطلاقاً (يُستبدل النص فقط) */
    .header-wheel-slot.has-wheel-effect .header-wheel-image {
      display: none !important;
    }

    .header-wheel-slot.header-wheel-slot--spent {
      cursor: default;
      opacity: 0.9;
    }

    .header-wheel-slot.header-wheel-slot--result-active {
      cursor: default;
    }

    .wheel-header-result-label {
      margin: 0;
      padding: clamp(6px, 1vw, 10px) clamp(8px, 1.4vw, 14px);
      max-width: 100%;
      font-size: clamp(0.62rem, 1.15vw, 0.82rem);
      font-weight: 700;
      line-height: 1.25;
      text-align: center;
      color: #f5f3ff;
      text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
      background: rgba(45, 26, 74, 0.75);
      border: 1px solid rgba(168, 85, 247, 0.35);
      border-radius: 12px;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    }

    /* مؤشر الدور - في أقصى اليسار */
    .turn-indicator-header {
      background: rgba(124, 58, 237, 0.2);
      backdrop-filter: blur(10px);
      border-radius: 24px;
      padding: 7px 14px;
      display: flex;
      align-items: center;
      gap: 10px;
      border: 1.5px solid rgba(168, 85, 247, 0.45);
      box-shadow: 0 4px 18px rgba(124, 58, 237, 0.2);
      margin-right: auto;
      margin-left: 0;
      white-space: nowrap;
      position: absolute;
      left: 20px;
      right: auto;
    }

    .turn-text {
      font-weight: bold;
      color: white;
      font-size: 1.1em;
    }

    .current-team-name-header {
      font-weight: bold;
      color: var(--accent-color);
      background: rgba(0,0,0,0.24);
      padding: 4px 10px;
      border-radius: 14px;
      font-size: 1em;
    }

    .next-turn-btn-header {
      background: var(--accent-color);
      border: none;
      color: white;
      padding: 6px 12px;
      border-radius: 18px;
      font-size: 0.9em;
      font-weight: bold;
      cursor: pointer;
      transition: all 0.3s ease;
      border: 1px solid rgba(255,255,255,0.3);
    }

    .next-turn-btn-header:hover {
      background: #f57c00;
      transform: translateY(-2px);
      box-shadow: 0 5px 10px rgba(0,0,0,0.3);
    }

    /* عنصر وهمي للتوازن (معطل) */
    .header-spacer {
      display: none;
    }

    :root {
      --primary-color: #7c3aed;
      --primary-light: #a855f7;
      --primary-dark: #4c1d95;
      --secondary-color: #c084fc;
      --accent-color: #f59e0b;
      --text-light: #f5f3ff;
      --bg-gradient: linear-gradient(135deg, #7c3aed 0%, #a855f7 45%, #c084fc 100%);
      --bg-deep: #1a0a2e;
      --bg-mid: #22103a;
    }

    /* ========== Orientation Lock - Landscape Only ========== */
    .orientation-warning {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(135deg, #6a0dad 0%, #9c27b0 100%);
      z-index: 10000;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      color: white;
      text-align: center;
      padding: 20px;
      font-family: 'Cairo', sans-serif;
    }

    .orientation-warning.show {
      display: flex;
    }

    .orientation-warning-icon {
      font-size: 80px;
      margin-bottom: 30px;
      animation: rotate-back 2s linear infinite;
    }

    @keyframes rotate-back {
      from { transform: rotate(90deg); }
      to { transform: rotate(0deg); }
    }

    .orientation-warning h2 {
      font-size: 28px;
      margin-bottom: 15px;
      font-weight: 700;
    }

    .orientation-warning p {
      font-size: 18px;
      line-height: 1.6;
      max-width: 400px;
    }

    /* Hide main content when in portrait on mobile */
    @media screen and (max-width: 768px) and (orientation: portrait) {
      body > *:not(.orientation-warning) {
        display: none !important;
      }
      
      .orientation-warning {
        display: flex !important;
      }
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html, body {
      height: 100%;
      width: 100%;
      font-family: 'Cairo', sans-serif;
      background:
        radial-gradient(1200px 700px at 85% -10%, rgba(168, 85, 247, 0.2), transparent 60%),
        radial-gradient(1000px 600px at 0% 100%, rgba(245, 158, 11, 0.12), transparent 65%),
        linear-gradient(135deg, var(--bg-deep) 0%, var(--bg-mid) 45%, #2b0e46 100%);
      color: white;
      position: relative;
      overflow: hidden;
    }

    #particles-bg {
      position: fixed;
      inset: 0;
      z-index: 0;
      pointer-events: none;
    }

    .board {
      display: flex;
      flex-direction: column;
      height: 100vh;
      width: 100vw;
      overflow: hidden;
      padding-top: 80px;
    }

    /* تصميم الفئات */
    .categories-container {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      grid-auto-rows: 1fr;
      gap: 10px;
      padding: 10px 14px;
      height: calc(100vh - 210px);
      min-height: 260px;
      overflow-y: hidden;
      animation: fadeIn 0.6s ease-out;
    }

    .category-wrapper {
      display: flex;
      flex-direction: column;
      height: 100%;
      min-height: 0;
    }

    .category-box {
      display: flex;
      align-items: stretch;
      background-color: rgba(255, 255, 255, 0.1);
      border-radius: 12px;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
      padding: 8px;
      border: 2px solid rgba(225, 190, 231, 0.3);
      backdrop-filter: blur(5px);
      height: 100%;
      min-height: 0;
      flex: 1;
      position: relative;
      overflow: hidden;
    }

    .category-image {
      width: 30%;
      height: 100%;
      object-fit: cover;
      border-radius: 10px;
      margin: 0 6px;
      filter: brightness(1) saturate(1.1); /* منوّرة دائماً */
      transition: filter 0.3s, transform 0.3s;
      position: relative;
    }
    
    .category-image:hover {
      filter: brightness(1.08) saturate(1.2);
    }

    .category-title {
      position: absolute;
      bottom: 12px;
      right: 50%;
      transform: translateX(50%);
      background: rgba(106, 13, 173, 0.7);
      color: white;
      padding: 6px 14px;
      font-weight: bold;
      border-radius: 22px;
      text-align: center;
      width: 32%;
      min-width: 32%;
      max-width: 32%;
      min-height: 2.35em;
      box-sizing: border-box;
      box-shadow: 0 3px 8px rgba(0,0,0,0.3);
      z-index: 2;
      backdrop-filter: blur(5px);
      border: 2px solid rgba(255, 255, 255, 0.3);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: clip;
      display: block;
      direction: rtl;
      line-height: 1.2;
      font-size: clamp(0.5rem, 1.2vw, 1.1em);
    }

    .cells-side {
      display: flex;
      flex-direction: column;
      gap: 6px;
      flex: 1;
      height: 100%;
      min-height: 0;
      justify-content: space-around;
    }

    .cell {
      background: rgba(106, 13, 173, 0.7);
      color: var(--text-light);
      padding: 8px 0;
      font-size: 1.15em;
      font-weight: bold;
      border: none;
      border-radius: 10px;
      cursor: pointer;
      box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
      transition: all 0.2s ease;
      display: flex;
      justify-content: center;
      align-items: center;
      position: relative;
      flex: 1;
      min-height: 0;
    }

    .cell:hover {
      background: rgba(156, 39, 176, 0.8);
      transform: translateY(-3px);
      box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    }

    .cell.used {
      background: rgba(149, 165, 166, 0.5);
      cursor: default;
    }

    .cell.used:hover {
      background: rgba(149, 165, 166, 0.5);
      transform: none;
      box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    }

    /* قسم الفرق - تصميم مضغوط لتناسب صف واحد */
    .teams {
      display: flex;
      justify-content: center;
      gap: 8px;
      background-color: rgba(44, 62, 80, 0.9);
      padding: 8px 10px;
      flex-wrap: nowrap;
      overflow-x: auto;
      min-height: auto;
      border-top: 2px solid var(--primary-light);
      box-shadow: 0 -3px 10px rgba(0,0,0,0.2);
      align-items: stretch;
      flex-shrink: 0;
      scrollbar-width: thin;
      scrollbar-color: var(--accent-color) rgba(255,255,255,0.2);
    }

    .teams::-webkit-scrollbar {
      height: 5px;
    }

    .teams::-webkit-scrollbar-thumb {
      background-color: var(--accent-color);
      border-radius: 10px;
    }

    /* فريقان فقط: كل بطاقة بزاوية الشريط السفلي (في RTL: فريق 1 يمين، فريق 2 يسار) */
    .teams.teams--two {
      position: relative;
      justify-content: space-between;
      padding-inline: clamp(12px, 2.5vw, 28px);
      padding-block: 10px 12px;
      gap: 0;
    }

    .teams-two-center-brand {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      z-index: 2;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;
      gap: clamp(6px, 1.8vw, 12px);
      pointer-events: none;
      user-select: none;
      direction: rtl;
    }

    .teams-two-center-brand__text {
      font-weight: 800;
      font-size: clamp(1.2rem, 3.6vw, 1.85rem);
      /* لون ذهبي-برتقالي كما المرجع */
      color: #ffb800;
      letter-spacing: 0.02em;
      line-height: 1;
      text-shadow:
        0 1px 0 rgba(0, 0, 0, 0.35),
        0 0 14px rgba(255, 184, 0, 0.4);
      white-space: nowrap;
    }

    .teams-two-center-brand__brain {
      display: inline-block;
      font-size: clamp(1.45rem, 4.2vw, 2.35rem);
      line-height: 1;
      filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
      font-style: normal;
    }

    /* لا يُجمع visible + hidden على المحورين (يُحوَّل الأفقي إلى auto ويُقصّ أيقونات المساعدة) */
    .teams.teams--two .team {
      overflow: visible;
      align-items: center;
      box-sizing: border-box;
      padding: 8px 10px;
      gap: clamp(12px, 2.25vw, 22px);
      min-width: clamp(260px, 36vw, 480px) !important;
      max-width: min(520px, 47vw) !important;
      background: transparent !important;
      backdrop-filter: none !important;
      -webkit-backdrop-filter: none !important;
      border: none !important;
      box-shadow: none !important;
    }

    .teams.teams--two .team:hover {
      transform: none;
      box-shadow: none !important;
    }

    /* فصل الصورة عن المحتوى (النقاط لا تلمس جانب الصورة)، وتكبير طفيف */
    .teams--two .team .team-image-container {
      flex-shrink: 0 !important;
      isolation: isolate;
      position: relative;
      z-index: 0;
      flex: 0 0 clamp(86px, 12.8vw, 132px) !important;
      box-sizing: border-box;
      width: clamp(86px, 12.8vw, 132px) !important;
      height: clamp(86px, 12.8vw, 132px) !important;
      max-width: min(132px, 32vw) !important;
      max-height: clamp(86px, 12.8vw, 132px) !important;
      min-width: clamp(86px, 12.8vw, 132px);
      min-height: clamp(86px, 12.8vw, 132px);
      padding: 0;
      align-self: center;
      overflow: hidden;
      background: transparent !important;
      border: none !important;
      box-shadow: none !important;
    }

    .teams--two .team.team--avatar-at-corner-side .team-image-container {
      border: none !important;
      border-left: none !important;
      border-right: none !important;
    }

    .teams--two .team .team-image-large {
      display: block;
      box-sizing: border-box;
      width: 100% !important;
      height: 100% !important;
      max-width: none !important;
      max-height: none !important;
      aspect-ratio: 1 / 1;
      object-fit: cover;
      object-position: center;
      border: none !important;
      box-shadow: none !important;
      background: transparent;
    }

    .teams--two .team .team-content.team-content--two-cols {
      flex: 1 1 0 !important;
      width: auto !important;
      /* فوق min-width:0 العام لـ .team-content — يحترم الحد الأدنى لعرض الشبكة (الأيقونات) */
      min-width: auto;
      padding: 6px 4px;
      overflow-x: visible;
      overflow-y: visible;
      justify-content: flex-start;
      gap: clamp(6px, 1.2vw, 12px);
      isolation: isolate;
      position: relative;
      z-index: 1;
    }

    .team {
      background-color: rgba(255, 255, 255, 0.15);
      border-radius: 10px;
      box-shadow: 0 2px 5px rgba(0,0,0,0.2);
      min-width: 200px;
      max-width: 220px;
      flex: 0 0 auto;
      display: flex;
      align-items: stretch;
      backdrop-filter: blur(5px);
      border: 1px solid rgba(225, 190, 231, 0.3);
      transition: all 0.3s ease;
      overflow: hidden;
      height: auto;
    }

    .team:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    }

    /* بطاقة الفريق على يسار الشاشة (فقط مع فريقين): صورة خارجياً تجاه الزاوية، المحتوى ليمين الصورة */
    .team.team--avatar-at-corner-side {
      direction: ltr;
    }

    .team.team--avatar-at-corner-side .team-image-container {
      border-left: none;
      border-right: 1px solid rgba(255, 255, 255, 0.2);
    }

    /* صف عمودين بجانب بعض: المحتوى ltr والعمود النصي rtl لقراءة العربية */
    .team.team--avatar-at-corner-side .team-content.team-content--two-cols {
      direction: ltr;
    }

    /* النصف الأيمن: صورة الفريق */
    .team-image-container {
      width: 35%;
      background-color: rgba(0, 0, 0, 0.2);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 5px;
      border-left: 1px solid rgba(255, 255, 255, 0.2);
    }

    .team-image-large {
      width: 100%;
      height: auto;
      aspect-ratio: 1 / 1;
      border-radius: 8px;
      object-fit: cover;
      border: 1px solid var(--accent-color);
      box-shadow: 0 2px 5px rgba(0,0,0,0.3);
      background: var(--bg-gradient);
    }

    /* النصف الأيسر: محتوى الفريق */
    .team-content {
      width: 65%;
      display: flex;
      flex-direction: column;
      gap: 4px;
      padding: 6px 5px;
      min-width: 0;
      justify-content: space-between;
    }

    /* فريقان: صف عنوان بعرض البطاقة كاملاً، ثم شبكة نقاط | أدوات (أوضح من شبكة الاسم كنظير مباشر) */
    .team-content.team-content--two-cols {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      justify-content: flex-start;
      width: 100%;
      min-width: 0;
      gap: clamp(6px, 1.2vw, 12px);
      box-sizing: border-box;
    }

    .team-content--two-cols .team-two-banner {
      width: 100%;
      max-width: 100%;
      min-width: 0;
      flex: 0 0 auto;
      box-sizing: border-box;
    }

    .team-content--two-cols .team-two-main {
      /* أيقونات وسائل المساعدة أوضح من السابق دون الغُلو */
      --team-two-control-diameter: clamp(26px, 4.2vw, 40px);
      --team-two-help-icon-diameter: clamp(32px, 5.25vw, 48px);
      --team-two-icon-gap: clamp(4px, 1.4vw, 10px);
      /* عمود الأدوات لا يضغط تحت عرض 3 أيقونات + الفجوات (يمنع إخفاء الثالثة) */
      --team-two-tools-col-min: calc(3 * var(--team-two-help-icon-diameter) + 2 * var(--team-two-icon-gap) + 10px);
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(var(--team-two-tools-col-min), 1fr);
      grid-template-rows: auto auto;
      align-items: center;
      justify-items: stretch;
      width: 100%;
      max-width: 100%;
      min-width: 0;
      column-gap: clamp(10px, 2.2vw, 20px);
      row-gap: clamp(6px, 1.8vw, 14px);
      box-sizing: border-box;
      overflow-x: visible;
    }

    .team-two-grid-cell--score {
      grid-column: 1;
      grid-row: 1;
      min-width: 0;
      container-type: inline-size;
      container-name: team-score-controls;
    }

    .team-two-grid-cell--tools-title {
      grid-column: 2;
      grid-row: 1;
      min-width: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
    }

    .team-two-grid-cell--score-btns {
      grid-column: 1;
      grid-row: 2;
      min-width: 0;
      display: flex;
      flex-direction: row;
      flex-wrap: nowrap;
      justify-content: center;
      align-items: center;
      gap: clamp(8px, 3vw, 18px);
      box-sizing: border-box;
    }

    .team-two-grid-cell--tool-icons {
      grid-column: 2;
      grid-row: 2;
      min-width: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .teams--two .team-two-grid-cell--tool-icons .team-tools {
      display: flex;
      flex-direction: row;
      flex-wrap: nowrap;
      justify-content: center;
      align-items: center;
      gap: var(--team-two-icon-gap);
      width: 100%;
      max-width: 100%;
      margin-top: 0;
      box-sizing: border-box;
    }

    .teams--two .team-two-grid-cell--tools-title .team-tools-heading {
      display: block;
      margin: 0;
      max-width: 100%;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .teams--two .team-two-grid-cell--score .score {
      font-size: clamp(1.62rem, 10.25cqw, 2.75rem);
      font-weight: 800;
      width: 100%;
      max-width: 100%;
      margin: 0;
      padding-block: 12px;
      padding-inline: clamp(12px, 6cqw, 22px);
      overflow: hidden;
      text-overflow: clip;
      box-sizing: border-box;
      font-variant-numeric: tabular-nums;
      color: #ffcc80;
      letter-spacing: 0.03em;
      text-shadow:
        0 0 2px rgba(0, 0, 0, 0.9),
        0 2px 4px rgba(0, 0, 0, 0.65);
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      white-space: nowrap;
      background: rgba(0, 0, 0, 0.55);
      border-radius: 10px;
      border: 1px solid rgba(255, 255, 255, 0.14);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }

    .teams--two .team-two-grid-cell--score-btns .btn-score {
      box-sizing: border-box;
      cursor: pointer;
      flex-shrink: 0;
      width: var(--team-two-control-diameter);
      height: var(--team-two-control-diameter);
      min-width: var(--team-two-control-diameter);
      min-height: var(--team-two-control-diameter);
      max-width: min(var(--team-two-control-diameter), calc(100% - 4px));
      max-height: min(var(--team-two-control-diameter), calc(100% - 4px));
      margin: 0;
      padding: 0;
      font-size: clamp(0.72rem, 2.2vw, 0.95rem);
      line-height: 1;
    }

    @container team-score-controls (max-width: 200px) {
      .teams--two .team-two-grid-cell--score .score {
        font-size: clamp(1.28rem, 7.5cqw, 2.08rem);
        padding-inline: clamp(8px, 4.5cqw, 16px);
        letter-spacing: 0;
      }
    }

    @container team-score-controls (max-width: 148px) {
      .teams--two .team-two-grid-cell--score .score {
        font-size: clamp(1.15rem, 6.85cqw, 1.82rem);
      }
    }

    .teams--two .team-two-banner .team-name {
      display: block;
      width: 100%;
      max-width: 100%;
      min-width: 0;
      box-sizing: border-box;
      /* حجم أقصى يُصغَّر عبر JS إن لزم لبقاء الاسم بسطر واحد كاملاً */
      font-size: clamp(0.92rem, 2.15vw, 1.18rem);
      padding: 6px clamp(14px, 4.5vw, 28px);
      text-align: center;
      line-height: 1.35;
      border-radius: 18px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: clip;
    }

    .team-content--two-cols .team-meta-col {
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 6px;
      flex: 1 1 0;
      min-width: clamp(136px, 34%, 240px);
      max-width: 100%;
      overflow: hidden;
      direction: rtl;
    }

    .team-content--two-cols .team-tools-group {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 6px;
      flex: 0 0 auto;
      flex-shrink: 0;
      min-width: clamp(120px, 26vw, 200px);
      box-sizing: border-box;
      padding-inline: 4px;
    }

    .team-tools-heading {
      margin: 0;
      font-size: clamp(0.55rem, 1.15vw, 0.72rem);
      font-weight: 700;
      color: rgba(255, 255, 255, 0.92);
      text-align: center;
      line-height: 1.2;
      white-space: nowrap;
    }

    .team-content--two-cols .team-tools {
      margin-top: 0;
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
      justify-content: center;
      gap: clamp(6px, 1.4vw, 12px);
    }

    /* scale() على الأيقونات لا يوسّع صندوق التخطيط فيزيد التداخل — نلغيه هنا ونحدد حجماً حقيقياً */
    .team-content--two-cols .team-tool-icon {
      transform: none !important;
      width: clamp(30px, 4.2vw, 42px);
      min-width: clamp(30px, 4.2vw, 42px);
      height: clamp(30px, 4.2vw, 42px);
    }

    .teams--two .team-content--two-cols .team-two-main .team-tool-icon {
      box-sizing: border-box;
      width: var(--team-two-help-icon-diameter);
      height: var(--team-two-help-icon-diameter);
      min-width: var(--team-two-help-icon-diameter);
      min-height: var(--team-two-help-icon-diameter);
      max-width: var(--team-two-help-icon-diameter);
      max-height: var(--team-two-help-icon-diameter);
      flex-shrink: 0;
      border-radius: 50%;
      object-fit: contain;
      object-position: center;
    }

    .teams--two .team-tools-heading {
      font-size: clamp(0.72rem, 1.65vw, 1rem);
      white-space: normal;
      overflow-wrap: break-word;
      max-width: 100%;
      line-height: 1.25;
    }

    /* فريقان فقط: تصغير خفيف على هذا النطاق (يشمل مثلاً 679×421 و718×388 حتى 1280px) */
    @media (min-width: 640px) and (max-width: 1280px) {
      .teams.teams--two {
        padding-inline: clamp(10px, 1.8vw, 22px);
        padding-block: 8px 10px;
      }

      .teams.teams--two .team {
        min-width: clamp(210px, 28vw, 360px) !important;
        max-width: min(380px, 40vw) !important;
        padding: 6px 8px !important;
        gap: clamp(8px, 1.5vw, 16px);
      }

      .teams--two .team .team-image-container {
        flex: 0 0 clamp(68px, 9vw, 100px) !important;
        width: clamp(68px, 9vw, 100px) !important;
        height: clamp(68px, 9vw, 100px) !important;
        max-width: min(100px, 28vw) !important;
        max-height: clamp(68px, 9vw, 100px) !important;
        min-width: clamp(68px, 9vw, 100px);
        min-height: clamp(68px, 9vw, 100px);
      }

      .teams-two-center-brand__text {
        font-size: clamp(1.05rem, 2.9vw, 1.55rem);
      }

      .teams-two-center-brand__brain {
        font-size: clamp(1.2rem, 3.2vw, 1.95rem);
      }

      .teams--two .team .team-content.team-content--two-cols {
        padding: 5px 3px;
        gap: clamp(5px, 1vw, 10px);
      }

      .teams--two .team-two-banner .team-name {
        font-size: clamp(0.78rem, 1.65vw, 1.02rem);
        padding: 5px clamp(11px, 3.2vw, 20px);
        border-radius: 14px;
      }

      .teams--two .team-two-grid-cell--score .score {
        padding-block: 8px;
        padding-inline: clamp(10px, 5cqw, 18px);
        border-radius: 8px;
      }

      .team-content--two-cols .team-two-main {
        --team-two-control-diameter: clamp(22px, 3.5vw, 34px);
        --team-two-help-icon-diameter: clamp(26px, 4.2vw, 40px);
        column-gap: clamp(8px, 1.5vw, 16px);
        row-gap: clamp(5px, 1.2vw, 11px);
      }

      .teams--two .team-two-grid-cell--score-btns {
        gap: clamp(6px, 2.2vw, 14px);
      }

      .teams--two .team-two-grid-cell--score-btns .btn-score {
        font-size: clamp(0.65rem, 1.85vw, 0.88rem);
      }

      .teams--two .team-tools-heading {
        font-size: clamp(0.62rem, 1.2vw, 0.88rem);
      }
    }

    .team-name {
      font-weight: 700;
      font-size: 0.9em;
      color: var(--text-light);
      text-shadow: 0 1px 3px rgba(0,0,0,0.3);
      text-align: center;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      background: rgba(106, 13, 173, 0.3);
      padding: 2px 4px;
      border-radius: 15px;
      border: 1px solid rgba(255,255,255,0.2);
    }

    .score-container {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 3px;
      width: 100%;
    }

    .score {
      font-size: 1.2em;
      font-weight: bold;
      color: var(--accent-color);
      min-width: 35px;
      text-align: center;
      background: rgba(0,0,0,0.2);
      padding: 2px 3px;
      border-radius: 6px;
      flex: 1;
    }

    .btn-score {
      background-color: var(--accent-color);
      border: none;
      color: white;
      font-weight: bold;
      font-size: 1.1em;
      border-radius: 50%;
      width: 26px;
      height: 26px;
      cursor: pointer;
      transition: all 0.2s ease;
      display: flex;
      justify-content: center;
      align-items: center;
      box-shadow: 0 2px 5px rgba(0,0,0,0.3);
      flex-shrink: 0;
    }

    .btn-score:hover {
      background-color: #f57c00;
      transform: scale(1.05);
    }

    .team-tools {
      display: flex;
      gap: 4px;
      width: 100%;
      margin-top: 8px;
      justify-content: space-between;
    }

    .team-tool-icon {
      width: calc((100% - 8px) / 3);
      height: 22px;
      border-radius: 6px;
      object-fit: contain;
      object-position: center;
      display: block;
      transform: scale(1.75);
      transform-origin: center;
      border: none;
      box-shadow: none;
      background: transparent;
      user-select: none;
    }

    .tool-delete-question {
      cursor: pointer;
    }

    .tool-risk-question {
      cursor: pointer;
    }

    .tool-steal-turn {
      cursor: pointer;
    }

    .team-tool-icon.tool-disabled {
      opacity: 0.45;
      cursor: not-allowed;
      pointer-events: none;
    }

    /* تنبيه وسائل المساعدة: صورة فقط، بدون تعتيم الصفحة */
    .tool-notify-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 5000;
      background: transparent;
      align-items: center;
      justify-content: center;
      padding: 12px;
      pointer-events: none;
    }

    .tool-notify-overlay.show {
      display: flex;
    }

    .tool-notify-frame {
      max-width: min(92vw, 520px);
      max-height: min(70vh, 560px);
      line-height: 0;
      background: transparent;
      box-sizing: border-box;
      pointer-events: none;
    }

    .tool-notify-img {
      display: block;
      width: 100%;
      height: auto;
      max-height: min(68vh, 540px);
      object-fit: contain;
    }

    /* ══ WHEEL MODAL (مطابق tahannak.html) ══ */
    .wheel-modal {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 2100;
      background: rgba(10, 5, 20, 0.82);
      backdrop-filter: blur(10px);
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 28px;
    }

    .wheel-modal.open {
      display: flex;
    }

    .wheel-modal .wheel-modal-box {
      background: linear-gradient(145deg, #2d1a4a, #1e0f36);
      border: 1px solid rgba(168, 85, 247, 0.45);
      border-radius: 28px;
      padding: clamp(14px, 3.5vw, 40px);
      text-align: center;
      position: relative;
      box-shadow: 0 0 80px rgba(124, 58, 237, 0.35);
      min-width: min(340px, calc(100vw - 24px));
      max-width: min(720px, calc(100vw - 16px));
      max-height: min(92dvh, 92vh, 900px);
      overflow-x: hidden;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      box-sizing: border-box;
    }

    .wheel-modal .wheel-close {
      position: absolute;
      top: 16px;
      left: 20px;
      background: rgba(255, 255, 255, 0.08);
      border: none;
      color: #a78bfa;
      font-size: 22px;
      cursor: pointer;
      border-radius: 50%;
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.2s;
    }

    .wheel-modal .wheel-close:hover {
      background: rgba(239, 68, 68, 0.25);
      color: #fff;
    }

    .wheel-modal .wheel-title {
      font-size: clamp(17px, 4.2vw, 20px);
      font-weight: 900;
      margin-bottom: clamp(14px, 3vw, 28px);
      background: linear-gradient(90deg, #c4b5fd, #a855f7);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    /* صف دائماً: العجلة يسار، الجملة والزر والنتيجة يمين (direction: ltr على الصف ثم rtl للعمود النصي) */
    .wheel-modal .wheel-modal-main {
      display: flex;
      flex-direction: row;
      align-items: flex-start;
      justify-content: center;
      gap: clamp(12px, 2.2vw, 28px);
      direction: ltr;
      width: 100%;
    }

    .wheel-modal .wheel-modal-col--wheel {
      flex: 0 0 auto;
      display: flex;
      justify-content: center;
      width: auto;
    }

    .wheel-modal .wheel-modal-col--side {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      direction: rtl;
      text-align: right;
    }

    .wheel-modal .wheel-canvas-wrap {
      position: relative;
      display: inline-block;
      margin-bottom: 0;
    }

    .wheel-modal #wheelCanvas {
      border-radius: 50%;
      box-shadow: 0 0 40px rgba(124, 58, 237, 0.5), 0 0 0 4px rgba(168, 85, 247, 0.25);
      display: block;
      width: min(280px, 38vw);
      max-width: 280px;
      height: auto;
    }

    .wheel-modal .wheel-pointer {
      position: absolute;
      top: -18px;
      left: 50%;
      transform: translateX(-50%);
      width: 0;
      height: 0;
      border-left: 12px solid transparent;
      border-right: 12px solid transparent;
      border-top: 26px solid #f59e0b;
      filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.4));
    }

    .wheel-modal .wheel-spin-btn {
      background: linear-gradient(135deg, #7c3aed, #5b21b6);
      color: #fff;
      font-family: 'Cairo', sans-serif;
      font-size: 16px;
      font-weight: 800;
      padding: 13px 40px;
      border: none;
      border-radius: 40px;
      cursor: pointer;
      box-shadow: 0 5px 25px rgba(139, 92, 246, 0.4);
      transition: all 0.25s;
      width: 100%;
    }

    .wheel-modal .wheel-spin-btn:hover:not(:disabled) {
      transform: translateY(-2px);
      box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4);
    }

    .wheel-modal .wheel-spin-btn:disabled {
      opacity: 0.55;
      cursor: not-allowed;
    }

    .wheel-modal .wheel-outcome {
      margin-top: 14px;
      text-align: right;
      opacity: 0;
      transition: opacity 0.4s;
    }

    .wheel-modal .wheel-outcome.show {
      opacity: 1;
    }

    .wheel-modal .wheel-result {
      font-size: 16px;
      font-weight: 800;
      min-height: 26px;
      color: #f59e0b;
      margin: 0;
      text-align: right;
    }

    .wheel-modal .wheel-result-detail {
      margin: 10px 0 0;
      padding: 0 4px 0 0;
      font-size: 13px;
      font-weight: 500;
      line-height: 1.55;
      color: rgba(245, 243, 255, 0.88);
      max-width: none;
      text-align: right;
    }

    .wheel-modal .wheel-result-detail:empty {
      display: none;
    }

    .wheel-modal .wheel-scope-note {
      margin: 0 0 14px;
      padding: 0 4px 0 0;
      font-size: clamp(11px, 1.35vw, 13px);
      font-weight: 500;
      line-height: 1.5;
      color: rgba(196, 181, 253, 0.92);
      text-align: right;
      max-width: none;
    }

    @media (max-width: 720px), (max-height: 520px) and (max-width: 900px) {
      .wheel-modal {
        padding: max(8px, env(safe-area-inset-top, 0px)) max(8px, env(safe-area-inset-right, 0px))
          max(8px, env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
        align-items: center;
        justify-content: flex-start;
        overflow-y: auto;
      }

      .wheel-modal .wheel-modal-box {
        min-width: 0;
        width: calc(100vw - 16px);
        max-width: none;
        margin: auto;
        padding: 14px 10px 16px;
      }

      .wheel-modal .wheel-modal-main {
        gap: 10px;
      }

      .wheel-modal #wheelCanvas {
        width: min(168px, 34vw);
        max-width: min(168px, 34vw);
        height: auto;
      }

      .wheel-modal .wheel-pointer {
        top: -14px;
        border-left-width: 9px;
        border-right-width: 9px;
        border-top-width: 20px;
      }

      .wheel-modal .wheel-scope-note {
        margin: 0 0 10px;
        font-size: 11px;
        line-height: 1.45;
        padding: 0 2px 0 0;
      }

      .wheel-modal .wheel-spin-btn {
        font-size: 14px;
        padding: 10px 14px;
      }

      .wheel-modal .wheel-outcome {
        margin-top: 10px;
      }

      .wheel-modal .wheel-result {
        font-size: 14px;
      }

      .wheel-modal .wheel-result-detail {
        font-size: 12px;
      }
    }

    /* تأكيد قبل فتح عجلة الحظ (مثل نافذة تسجيل الخروج: نعم / لا) */
    .wheel-luck-consent-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 2200;
      align-items: center;
      justify-content: center;
      padding: 20px;
      box-sizing: border-box;
      background: rgba(10, 5, 20, 0.72);
      backdrop-filter: blur(6px);
    }

    .wheel-luck-consent-overlay.is-visible {
      display: flex;
    }

    .wheel-luck-consent-box {
      width: min(92vw, 420px);
      background: linear-gradient(145deg, #2d1a4a, #1e0f36);
      border: 1px solid rgba(168, 85, 247, 0.45);
      border-radius: 20px;
      padding: 22px 18px;
      text-align: center;
      box-shadow: 0 0 50px rgba(124, 58, 237, 0.35);
      direction: rtl;
      color: #fff;
      font-family: 'Cairo', sans-serif;
    }

    .wheel-luck-consent-box p {
      margin: 0 0 18px;
      font-size: 1.05em;
      font-weight: 800;
      line-height: 1.65;
      color: #fff;
    }

    .wheel-luck-consent-actions {
      display: flex;
      justify-content: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .wheel-luck-consent-actions button {
      border: none;
      border-radius: 12px;
      padding: 10px 24px;
      font-family: inherit;
      font-size: 0.95em;
      font-weight: 700;
      cursor: pointer;
      transition: filter 0.2s;
    }

    .wheel-luck-consent-actions .wheel-luck-consent-yes {
      background: #22c55e;
      color: #fff;
    }

    .wheel-luck-consent-actions .wheel-luck-consent-no {
      background: #ef4444;
      color: #fff;
    }

    .wheel-luck-consent-actions button:hover {
      filter: brightness(1.08);
    }

    .help-tool-consent-box p {
      margin-bottom: 14px;
    }

    .help-tool-consent-skip {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      margin: 0 auto 16px;
      padding: 9px 14px;
      border-radius: 10px;
      background: rgba(0, 0, 0, 0.35);
      border: 1px solid rgba(0, 0, 0, 0.2);
      font-size: 0.85em;
      font-weight: 500;
      color: rgba(255, 255, 255, 0.78);
      cursor: pointer;
      user-select: none;
    }

    .help-tool-consent-skip:hover {
      background: rgba(0, 0, 0, 0.45);
    }

    .help-tool-consent-skip input[type="checkbox"] {
      width: 16px;
      height: 16px;
      margin: 0;
      flex-shrink: 0;
      cursor: pointer;
      appearance: none;
      -webkit-appearance: none;
      border-radius: 4px;
      border: 1px solid rgba(255, 255, 255, 0.35);
      background: rgba(0, 0, 0, 0.4);
      transition: background 0.15s ease, border-color 0.15s ease;
    }

    .help-tool-consent-skip input[type="checkbox"]:checked {
      background: rgba(0, 0, 0, 0.65);
      border-color: rgba(255, 255, 255, 0.55);
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M10.2 2.8 4.5 8.5 1.8 5.8l-.9.9 3.6 3.6 6.6-6.6z'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: center;
      background-size: 11px;
    }

    .help-tool-consent-skip input[type="checkbox"]:focus-visible {
      outline: 2px solid rgba(255, 255, 255, 0.45);
      outline-offset: 2px;
    }

    /* الخروج وحفظ اللعبة — زر نصّي بسيط ملاصق للحافة */
    .home-btn {
      position: relative;
      flex-shrink: 0;
      margin: 0;
      z-index: 1001;
      background: rgba(124, 58, 237, 0.12);
      color: #fff;
      border: none;
      box-shadow: none;
      border-radius: 24px;
      padding: 8px 14px;
      font-size: 0.88em;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      transition: all 0.22s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      max-width: min(320px, 44vw);
      backdrop-filter: blur(10px);
    }

    .home-btn:hover {
      background: rgba(124, 58, 237, 0.22);
      transform: translateY(-2px);
      box-shadow: none;
    }

    .home-btn:focus-visible {
      outline: 2px solid rgba(196, 181, 253, 0.85);
      outline-offset: 3px;
    }

    .home-btn:disabled {
      opacity: 0.55;
      cursor: not-allowed;
      pointer-events: none;
    }

    .home-btn i {
      font-size: 0.95em;
      flex-shrink: 0;
      opacity: 0.95;
    }

    .home-btn-label {
      line-height: 1.3;
      text-align: right;
      white-space: normal;
    }

    /* تأثيرات */
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(20px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* تحسينات للشاشات المختلفة */
    @media (max-width: 1200px) {
      .categories-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 8px 12px;
      }

      .category-title {
        font-size: 1em;
        padding: 5px 10px;
      }
      
      .team {
        min-width: 190px;
        max-width: 210px;
      }
      
      .header-image {
        width: 65px;
        height: 65px;
      }
      
      .turn-indicator-header {
        padding: 8px 20px;
      }

      .home-btn {
        padding: 6px 11px;
        font-size: 0.78em;
        gap: 6px;
        border-radius: 20px;
        max-width: min(270px, 40vw);
      }

      .home-btn i {
        font-size: 0.88em;
      }
    }

    @media (max-width: 992px) {
      .team {
        min-width: 180px;
        max-width: 200px;
      }
      
      .team-name {
        font-size: 0.85em;
      }
      
      .score {
        font-size: 1.1em;
        min-width: 30px;
      }
      
      .btn-score {
        width: 24px;
        height: 24px;
        font-size: 1em;
      }
      
      .header-image {
        width: 60px;
        height: 60px;
      }
      
      .turn-indicator-header {
        padding: 7px 18px;
        gap: 15px;
      }
      
      .current-team-name-header {
        font-size: 1.1em;
        padding: 4px 12px;
      }
      
      .next-turn-btn-header {
        padding: 6px 15px;
        font-size: 0.95em;
      }
    }

    @media (max-width: 1000px) {
      html {
        overflow-y: scroll !important;
        overflow-x: hidden !important;
        height: auto !important;
        min-height: 100vh !important;
      }
      
      body {
        overflow-y: scroll !important;
        overflow-x: hidden !important;
        height: auto !important;
        min-height: 100vh !important;
        position: relative !important;
      }
      
      .board {
        padding-top: 0px !important;
        padding-bottom: 0px !important;
        height: auto !important;
        min-height: 1vh !important;
        overflow: visible !important;
        display: block !important;
      }
      
      .header-banner {
        height: 45px !important;
        padding: 0 10px !important;
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
      }

      .wheel-container {
        width: 340px !important;
        height: 340px !important;
      }

      .wheel {
        width: 295px !important;
        height: 295px !important;
      }

      .wheel-center {
        width: 98px !important;
        height: 98px !important;
      }

      .wheel-label {
        width: 80px !important;
        font-size: 0.76em !important;
      }

      .wheel-panel {
        top: 50% !important;
        left: calc(100% + 14px) !important;
        transform: translateY(-50%) !important;
        width: 210px !important;
        align-items: flex-start !important;
        gap: 8px !important;
      }

      .wheel-result,
      .wheel-result-details {
        text-align: right !important;
      }

      .wheel-result {
        font-size: 0.9em !important;
        margin-top: 0 !important;
      }

      .wheel-result-details {
        font-size: 0.8em !important;
      }

      .wheel-close-btn {
        align-self: center !important;
      }
      .header-image {
        width: 45px !important;
        height: 45px !important;
        border-width: 2px !important;
      }
      .header-wheel-slot {
        top: 55% !important;
        left: 72% !important;
      }
      .header-wheel-slot .header-wheel-image {
        width: 90px !important;
        height: 90px !important;
      }

      .turn-indicator-header {
        padding: 3px 8px !important;
        gap: 6px !important;
        font-size: 0.7em !important;
        border-radius: 20px !important;
        border-width: 1.5px !important;
      }
      
      .home-btn {
        padding: 0 8px 0 10px !important;
        font-size: 0.62em !important;
        gap: 4px !important;
        max-width: min(200px, 48vw) !important;
        border-radius: 10px 0 0 10px !important;
      }
      
      .home-btn i {
        font-size: 0.95em !important;
      }
      .categories-container {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
        padding: 2px 8px !important;
        
        min-height: calc(100vh + 150xp)important;
        margin-top: 0 !important;
        overflow: visible !important;
      }
      
      .teams {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 999 !important;
      }
      
      .category-box {
        flex-direction: row !important;
        min-height: 120px !important;
        padding: 4px !important;
        height: auto !important;
      }
      
      .category-image {
        width: 25% !important;
        height: 100% !important;
        margin: 0 4px !important;
        object-fit: cover !important;
      }
      
      .category-title {
        font-size: 0.6em !important;
        padding: 2px 6px !important;
        width: 32% !important;
        min-width: 32% !important;
        max-width: 32% !important;
        min-height: 2.35em !important;
      }
      
      .cells-side {
        flex-direction: column !important;
        gap: 4px !important;
        width: 100% !important;
      }
      
      .cell {
        width: 100% !important;
        padding: 4px 0 !important;
        font-size: 0.8em !important;
      }
      
      .teams {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        min-height: 60px !important;
        padding: 4px 6px !important;
        gap: 4px !important;
        position: relative !important;
        z-index: 10 !important;
        flex-shrink: 0 !important;
      }
      
      .team {
        min-width: 100x !important;
        max-width: 110px !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
      }
      
      .team-image-container {
        width: 35% !important;
        padding: 2px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        visibility: visible !important;
      }
      
      .team-image-large {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
        border-width: 1.5px !important;
        display: block !important;
        object-fit: cover !important;
        visibility: visible !important;
      }
      
      
      .team-content {
        width: 65% !important;
        padding: 2px 1px !important;
        visibility: visible !important;
      }
    }

    @media (max-width: 768px) {
      html {
        overflow-y: scroll !important;
        overflow-x: hidden !important;
        height: auto !important;
        min-height: 100vh !important;
        max-height: none !important;
        position: relative !important;
        -webkit-overflow-scrolling: touch !important;
      }
      
      body {
        overflow-y: scroll !important;
        overflow-x: hidden !important;
        height: auto !important;
        min-height: 100vh !important;
        max-height: none !important;
        position: relative !important;
        -webkit-overflow-scrolling: touch !important;
      }
      
      .header-banner {
        height: 50px !important;
        padding: 0 10px !important;
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
      }

      .wheel-container {
        width: 300px !important;
        height: 300px !important;
      }

      .wheel {
        width: 260px !important;
        height: 260px !important;
      }

      .wheel-center {
        width: 88px !important;
        height: 88px !important;
      }

      .wheel-label {
        width: 86px !important;
        font-size: 0.72em !important;
      }

      .wheel-panel {
        top: 50% !important;
        left: calc(100% + 10px) !important;
        transform: translateY(-50%) !important;
        width: 185px !important;
        align-items: flex-start !important;
        gap: 7px !important;
      }

      .wheel-result,
      .wheel-result-details {
        text-align: right !important;
      }

      .wheel-result {
        font-size: 0.84em !important;
        margin-top: 0 !important;
      }

      .wheel-result-details {
        font-size: 0.74em !important;
      }

      .wheel-close-btn {
        align-self: center !important;
      }
      
      .board {
        padding-top: 0px !important;
        padding-bottom: 0px !important;
        height: auto !important;
        min-height: 1vh !important;
        overflow: visible !important;
        display: block !important;
      }
      
      .header-image {
        width: 45px !important;
        height: 45px !important;
        border-width: 2px !important;
      }
      .header-wheel-slot {
        top: 55% !important;
        left: 72% !important;
      }
      .header-wheel-slot .header-wheel-image {
        width: 90px !important;
        height: 90px !important;
      }
      
      .turn-indicator-header {
        padding: 5px 10px !important;
        gap: 6px !important;
        font-size: 0.7em !important;
        border-radius: 20px !important;
        border-width: 1.5px !important;
      }
      
      .turn-text {
        font-size: 1em !important;
      }
      
      .current-team-name-header {
        font-size: 1em !important;
        padding: 6px 8px !important;
      }
      
      .next-turn-btn-header {
        padding: 4px 10px !important;
        font-size: 1em !important;
      }
      
      .home-btn {
        padding: 0 8px 0 10px !important;
        font-size: 0.62em !important;
        gap: 4px !important;
        max-width: min(200px, 48vw) !important;
        border-radius: 10px 0 0 10px !important;
      }
      
      .home-btn i {
        font-size: 0.95em !important;
      }
      .categories-container {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
        padding: 6px 8px !important;
        height: auto !important;
        min-height: 100vh !important;
        overflow: visible !important;
        overflow-y: visible !important;
        display: grid !important;
        position: relative !important;
      }
      
      .category-box {
        flex-direction: row !important;
        min-height: 120px !important;
        padding: 4px !important;
        height: auto !important;
      }
      
      .category-image {
        width: 25% !important;
        height: 100% !important;
        margin: 0 4px !important;
        object-fit: cover !important;
      }
      
      .category-title {
        font-size: 0.6em !important;
        padding: 2px 6px !important;
        width: 32% !important;
        min-width: 32% !important;
        max-width: 32% !important;
        min-height: 2.35em !important;
      }
      
      .cells-side {
        flex-direction: column !important;
        gap: 4px !important;
        width: 100% !important;
      }
      
      .cell {
        width: 100% !important;
        padding: 4px 0 !important;
        font-size: 0.8em !important;
      }
      
      .teams {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        min-height: 60px !important;
        padding: 4px 6px !important;
        gap: 4px !important;
        position: relative !important;
        z-index: 10 !important;
        flex-shrink: 0 !important;
      }
      
      .team {
        min-width: 100x !important;
        max-width: 110px !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
      }
      
      .team-image-container {
        width: 40% !important;
        padding: 3px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        visibility: visible !important;
      }
      
      .team-image-large {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
        border-width: 2px !important;
        display: block !important;
        object-fit: cover !important;
        visibility: visible !important;
      }
      
      .team-content {
        width: 60% !important;
        padding: 3px 2px !important;
        visibility: visible !important;
      }
      
      .turn-indicator-header {
        padding: 4px 10px;
        gap: 8px;
      }
      
      .turn-text {
        font-size: 0.75em;
      }
      
      .current-team-name-header {
        font-size: 0.8em;
        padding: 2px 8px;
      }
      
      .next-turn-btn-header {
        padding: 3px 8px;
        font-size: 0.7em;
      }
      
      .home-btn {
        padding: 0 10px 0 12px;
        font-size: 0.72em;
        max-width: min(220px, 50vw);
        border-radius: 11px 0 0 11px;
      }
      
      .home-btn i {
        font-size: 0.95em;
      }
    }

    @media (max-width: 600px) {
      html {
        overflow: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
        min-height: 100vh !important;
        -webkit-overflow-scrolling: touch !important;
      }
      
      body {
        overflow: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
        min-height: 100vh !important;
        position: relative !important;
        -webkit-overflow-scrolling: touch !important;
      }
      
      .header-banner {
        height: 45px !important;
        padding: 0 8px !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
      }
      
      .board {
        padding-top: 45px !important;
        padding-bottom: calc(70px + 12px) !important;
        display: block !important;
        min-height: calc(100vh + 400px) !important;
        height: auto !important;
        overflow: visible !important;
        width: 100% !important;
        position: relative !important;
      }
      
      .header-image {
        width: 32px !important;
        height: 32px !important;
        border-width: 2px !important;
      }
      .header-wheel-slot {
        top: 52% !important;
        left: 73% !important;
      }
      .header-wheel-slot .header-wheel-image {
        width: 80px !important;
        height: 80px !important;
      }
      
      .turn-indicator-header {
        padding: 2px 6px !important;
        gap: 5px !important;
        font-size: 0.65em !important;
        border-radius: 18px !important;
        border-width: 1.5px !important;
      }
      
      .turn-text {
        font-size: 0.6em !important;
      }
      
      .current-team-name-header {
        font-size: 0.65em !important;
        padding: 2px 5px !important;
      }
      
      .next-turn-btn-header {
        padding: 2px 6px !important;
        font-size: 0.6em !important;
      }
      
      .home-btn {
        padding: 0 6px 0 8px !important;
        font-size: 0.55em !important;
        gap: 3px !important;
        max-width: min(160px, 52vw) !important;
        border-radius: 9px 0 0 9px !important;
      }
      
      .home-btn i {
        font-size: 0.95em !important;
      }
      
      .categories-container {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 5px !important;
        padding: 5px 6px !important;
        height: auto !important;
        min-height: calc(100vh + 200px) !important;
        overflow: visible !important;
        display: grid !important;
      }
      
      .category-box {
        flex-direction: row !important;
        min-height: 110px !important;
        padding: 3px !important;
        height: auto !important;
      }
      
      .category-image {
        width: 20% !important;
        height: 100% !important;
        margin: 0 3px !important;
        object-fit: cover !important;
      }
      
      .category-title {
        font-size: 0.55em !important;
        padding: 2px 5px !important;
        width: 32% !important;
        min-width: 32% !important;
        max-width: 32% !important;
        min-height: 2.35em !important;
      }
      
      .cells-side {
        flex-direction: column !important;
        gap: 3px !important;
        width: 100% !important;
      }
      
      .cell {
        width: 100% !important;
        padding: 3px 0 !important;
        font-size: 0.75em !important;
      }
      
      .teams {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: auto !important;
        min-height: 70px !important;
        max-height: 25vh !important;
        padding: 5px 6px !important;
        gap: 5px !important;
        z-index: 999 !important;
        flex-shrink: 0 !important;
      }
      
      .team {
        min-width: 100px !important;
        max-width: 120px !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
      }
      
      .team-image-container {
        width: 40% !important;
        padding: 2px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        visibility: visible !important;
      }
      
      .team-image-large {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
        border-width: 1.5px !important;
        display: block !important;
        object-fit: cover !important;
        visibility: visible !important;
      }
      
      .team-content {
        width: 60% !important;
        padding: 2px 1px !important;
        visibility: visible !important;
      }
      
      .team-image-container {
        width: 35% !important;
        padding: 4px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
      }
      
      .team-image-large {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
        border-width: 2px !important;
        display: block !important;
        object-fit: cover !important;
      }
      
      .team-content {
        width: 65% !important;
        padding: 4px 3px !important;
      }
    }

    @media (max-width: 576px) {
      html {
        overflow: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
        min-height: 100vh !important;
        -webkit-overflow-scrolling: touch !important;
      }
      
      body {
        overflow: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
        min-height: 100vh !important;
        position: relative !important;
        -webkit-overflow-scrolling: touch !important;
      }
      
      .header-banner {
        height: 55px !important;
        padding: 0 12px !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
      }
      
      .board {
        padding-top: 55px !important;
        padding-bottom: calc(70px + 12px) !important;
        display: block !important;
        min-height: calc(100vh + 400px) !important;
        height: auto !important;
        overflow: visible !important;
        width: 100% !important;
        position: relative !important;
      }
      
      .header-image {
        width: 25px !important;
        height: 25px !important;
        border-width: 2px !important;
      }
      .header-wheel-slot {
        top: 52% !important;
        left: 73% !important;
      }
      .header-wheel-slot .header-wheel-image {
        width: 80px !important;
        height: 80px !important;
      }
      
      .turn-indicator-header {
        padding: 4px 8px;
        gap: 6px;
      }
      
      .turn-text {
        font-size: 0.7em;
      }
      
      .current-team-name-header {
        font-size: 0.75em;
        padding: 2px 6px;
      }
      
      .next-turn-btn-header {
        padding: 3px 6px;
        font-size: 0.65em;
      }
      
      .home-btn {
        padding: 0 8px 0 10px;
        font-size: 0.58em;
        max-width: min(170px, 52vw);
        border-radius: 9px 0 0 9px;
      }
      
      .home-btn i {
        font-size: 0.95em;
      }
      
      .categories-container {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 5px !important;
        padding: 5px 6px !important;
        height: auto !important;
        min-height: calc(100vh + 200px) !important;
        overflow: visible !important;
        display: grid !important;
      }
      
      .category-box {
        flex-direction: row !important;
        min-height: 110px !important;
        padding: 3px !important;
        height: auto !important;
      }
      
      .category-image {
        width: 20% !important;
        height: 100% !important;
        margin: 0 3px !important;
        object-fit: cover !important;
      }
      
      .category-title {
        font-size: 0.55em !important;
        padding: 2px 5px !important;
        width: 32% !important;
        min-width: 32% !important;
        max-width: 32% !important;
        min-height: 2.35em !important;
      }
      
      .cells-side {
        flex-direction: column !important;
        gap: 3px !important;
        width: 100% !important;
      }
      
      .cell {
        width: 100% !important;
        padding: 3px 0 !important;
        font-size: 0.75em !important;
      }
      
      .teams {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: auto !important;
        min-height: 70px !important;
        max-height: 25vh !important;
        gap: 5px !important;
        padding: 5px 6px !important;
        z-index: 999 !important;
        flex-shrink: 0 !important;
      }
      
      .team {
        min-width: 100px !important;
        max-width: 120px !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
      }
      
      .team-image-container {
        width: 40% !important;
        padding: 2px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        visibility: visible !important;
      }
      
      .team-image-large {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
        border-width: 1.5px !important;
        display: block !important;
        object-fit: cover !important;
        visibility: visible !important;
      }
      
      .team-content {
        width: 60% !important;
        padding: 2px 1px !important;
        visibility: visible !important;
      }
      
      .team-name {
        font-size: 0.8em;
        padding: 2px 3px;
      }
      
      .score {
        font-size: 1em;
        min-width: 28px;
      }
      
      .btn-score {
        width: 22px;
        height: 22px;
        font-size: 0.9em;
      }
      
      .team-tool-icon {
        height: 20px;
      }
      
      .turn-indicator-header {
        padding: 5px 12px;
        gap: 8px;
        left: 10px;
      }
      
      .turn-text {
        font-size: 0.85em;
      }
      
      .current-team-name-header {
        font-size: 0.9em;
        padding: 2px 8px;
      }
      
      .next-turn-btn-header {
        padding: 4px 10px;
        font-size: 0.8em;
      }
    }

    @media (max-width: 480px) {
      html {
        overflow: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
        min-height: 100vh !important;
        -webkit-overflow-scrolling: touch !important;
      }
      
      body {
        overflow: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
        min-height: 100vh !important;
        position: relative !important;
        -webkit-overflow-scrolling: touch !important;
      }
      
      .header-banner {
        height: 50px !important;
        padding: 0 15px !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
      }
      
      .board {
        padding-top: 50px !important;
        padding-bottom: calc(70px + 12px) !important;
        display: block !important;
        min-height: calc(100vh + 400px) !important;
        height: auto !important;
        overflow: visible !important;
        width: 100% !important;
        position: relative !important;
      }
      
      .header-image {
        width: 22px !important;
        height: 22px !important;
        border-width: 2px !important;
      }
      
      .categories-container {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 5px !important;
        padding: 5px 6px !important;
        height: auto !important;
        min-height: calc(100vh + 200px) !important;
        overflow: visible !important;
        display: grid !important;
      }
      
      .category-box {
        flex-direction: row !important;
        min-height: 110px !important;
        padding: 3px !important;
        height: auto !important;
      }
      
      .category-image {
        width: 20% !important;
        height: 100% !important;
        margin: 0 3px !important;
        object-fit: cover !important;
      }
      
      .category-title {
        font-size: 0.55em !important;
        padding: 2px 5px !important;
        width: 32% !important;
        min-width: 32% !important;
        max-width: 32% !important;
        min-height: 2.35em !important;
      }
      
      .cells-side {
        flex-direction: column !important;
        gap: 3px !important;
        width: 100% !important;
      }
      
      .cell {
        width: 100% !important;
        font-size: 0.75em !important;
        padding: 3px 0 !important;
      }
      
      .teams {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: auto !important;
        min-height: 70px !important;
        max-height: 25vh !important;
        gap: 5px !important;
        padding: 5px 6px !important;
        z-index: 999 !important;
        flex-shrink: 0 !important;
      }
      
      .team {
        min-width: 100px !important;
        max-width: 120px !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
      }
      
      .team-image-container {
        width: 40% !important;
        padding: 2px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        visibility: visible !important;
      }
      
      .team-image-large {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
        border-width: 1.5px !important;
        display: block !important;
        object-fit: cover !important;
        visibility: visible !important;
      }
      
      .team-content {
        width: 60% !important;
        padding: 2px 1px !important;
        visibility: visible !important;
      }
      
      .team-name {
        font-size: 0.75em;
        padding: 2px 3px;
      }
      
      .score {
        font-size: 0.95em;
        min-width: 25px;
      }
      
      .btn-score {
        width: 20px;
        height: 20px;
        font-size: 0.85em;
      }
      
      .team-tool-icon {
        height: 18px;
      }
      
      .home-btn {
        padding: 0 8px 0 10px;
        font-size: 0.56em;
        max-width: min(150px, 54vw);
        border-radius: 8px 0 0 8px;
      }
      
      .home-btn i {
        font-size: 0.95em;
      }
      
      .turn-indicator-header {
        padding: 3px 8px;
        left: 8px;
        gap: 5px;
      }
      
      .turn-text {
        font-size: 0.65em;
      }
      
      .current-team-name-header {
        font-size: 0.7em;
        padding: 2px 5px;
      }
      
      .next-turn-btn-header {
        padding: 2px 6px;
        font-size: 0.6em;
      }
    }

    @media (max-width: 360px) {
      html {
        overflow: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
        min-height: 100vh !important;
        -webkit-overflow-scrolling: touch !important;
      }
      
      body {
        overflow: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
        min-height: 100vh !important;
        position: relative !important;
        -webkit-overflow-scrolling: touch !important;
      }
      
      .header-banner {
        height: 50px !important;
        padding: 0 8px !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
      }
      
      .board {
        padding-top: 50px !important;
        padding-bottom: calc(65px + 10px) !important;
        display: block !important;
        min-height: calc(100vh + 400px) !important;
        height: auto !important;
        overflow: visible !important;
        width: 100% !important;
        position: relative !important;
      }
      
      .header-image {
        width: 22px !important;
        height: 22px !important;
        border-width: 2px !important;
      }
      
      .turn-indicator-header {
        padding: 3px 6px;
        left: 6px;
        gap: 4px;
      }
      
      .turn-text {
        font-size: 0.6em;
      }
      
      .current-team-name-header {
        font-size: 0.65em;
        padding: 2px 4px;
      }
      
      .next-turn-btn-header {
        padding: 2px 5px;
        font-size: 0.55em;
      }
      
      .home-btn {
        padding: 0 5px 0 7px !important;
        font-size: 0.5em !important;
        gap: 3px !important;
        max-width: min(130px, 56vw) !important;
        border-radius: 7px 0 0 7px !important;
      }
      
      .home-btn i {
        font-size: 0.95em !important;
      }
      
      .categories-container {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 4px !important;
        padding: 4px 5px !important;
        height: auto !important;
        min-height: calc(100vh + 200px) !important;
        overflow: visible !important;
        display: grid !important;
      }
      
      .category-box {
        flex-direction: row !important;
        min-height: 100px !important;
        padding: 3px !important;
        height: auto !important;
      }
      
      .category-image {
        width: 18% !important;
        height: 100% !important;
        margin: 0 2px !important;
        object-fit: cover !important;
      }
      
      .category-title {
        font-size: 0.5em !important;
        padding: 2px 4px !important;
        width: 32% !important;
        min-width: 32% !important;
        max-width: 32% !important;
        min-height: 2.35em !important;
      }
      
      .cells-side {
        flex-direction: column !important;
        gap: 2px !important;
        width: 100% !important;
      }
      
      .cell {
        width: 100% !important;
        font-size: 0.7em !important;
        padding: 2px 0 !important;
      }
      
      .teams {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: auto !important;
        min-height: 65px !important;
        max-height: 25vh !important;
        gap: 4px !important;
        padding: 4px 5px !important;
        z-index: 999 !important;
        flex-shrink: 0 !important;
      }
      
      .team {
        min-width: 90px !important;
        max-width: 110px !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
      }
      
      .team-image-container {
        width: 40% !important;
        padding: 2px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        visibility: visible !important;
      }
      
      .team-image-large {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
        border-width: 1.5px !important;
        display: block !important;
        object-fit: cover !important;
        visibility: visible !important;
      }
      
      .team-content {
        width: 60% !important;
        padding: 2px 1px !important;
        visibility: visible !important;
      }
      
      .team-name {
        font-size: 0.7em;
        padding: 2px 2px;
      }
      
      .score {
        font-size: 0.85em;
        min-width: 22px;
      }
      
      .btn-score {
        width: 18px;
        height: 18px;
        font-size: 0.75em;
      }
      
      .team-tool-icon {
        height: 17px;
      }
      
      .turn-text {
        display: none;
      }
    }

    /* للشاشات الكبيرة جداً */
    @media (min-width: 1400px) {
      .team {
        min-width: 220px;
        max-width: 240px;
      }
      
      .team-image-container {
        padding: 8px;
      }
      
      .team-name {
        font-size: 1em;
      }
      
      .score {
        font-size: 1.3em;
        min-width: 45px;
      }
      
      .btn-score {
        width: 30px;
        height: 30px;
        font-size: 1.2em;
      }
      
      .team-tool-icon {
        height: 24px;
      }
      
      .header-image {
        width: 85px;
        height: 85px;
      }
      
      .turn-indicator-header {
        padding: 12px 30px;
        gap: 25px;
      }
      
      .turn-text {
        font-size: 1.2em;
      }
      
      .current-team-name-header {
        font-size: 1.3em;
        padding: 6px 18px;
      }
      
      .next-turn-btn-header {
        padding: 8px 20px;
        font-size: 1.1em;
      }
    }

    /* شاشات صغيرة: نص زر الخروج على سطرين لتقليل العرض */
    @media (max-width: 992px) {
      .header-banner .home-btn {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 5px 8px !important;
        max-width: min(118px, 31vw) !important;
        border: none !important;
        box-shadow: none !important;
      }

      .header-banner .home-btn i {
        font-size: 0.9em;
      }

      .header-banner .home-btn-label {
        display: block;
        width: 100%;
        max-width: 100%;
        text-align: center;
        line-height: 1.15;
        font-size: clamp(0.58rem, 2.4vw, 0.72rem);
        font-weight: 600;
      }
    }
