:root {
  --primary-color: #35d6ff;
  --glass-bg: rgba(3, 10, 22, 0.78);
  --border-color: rgba(53, 216, 255, 0.28);
  --neon-blue: #35d6ff;
  --deep-blue: #071b3a;
  --deep-blue-2: #0b2d5c;
  --black-gloss: #03050b;
  --text-color: #ffffff;
  --gold-glow: #35d6ff;
}

body {
  background: #071b3a;
  font-family: 'Segoe UI', sans-serif;
  color: var(--text-color);
}

/* الحاوية العامة */
header {
  position: sticky !important;
  top: 0;
  z-index: 999;
  padding-top: 10px;
}

/* === شكل جديد للتوب بار === */
.top-bar {
  width: 94%;
  max-width: 1180px;
  min-height: 68px;
  margin: 0 auto 12px;
  padding: 8px 10px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  align-items: center;
  gap: 10px;

  background:
    linear-gradient(145deg, rgba(3, 5, 11, 0.92), rgba(7, 27, 58, 0.88)),
    radial-gradient(circle at 20% 0%, rgba(53, 216, 255, 0.22), transparent 34%);
  border: 1px solid var(--border-color);
  border-radius: 999px;

  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -12px 22px rgba(0, 0, 0, 0.22),
    0 0 22px rgba(53, 216, 255, 0.12);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

/* لمعة خفيفة */
.top-bar::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  opacity: .55;
  pointer-events: none;
}

/* نقطة إضاءة */
.top-bar::after {
  content: "";
  position: absolute;
  width: 105px;
  height: 105px;
  left: -35px;
  top: -42px;
  background: radial-gradient(circle, rgba(53,216,255,.22), transparent 65%);
  pointer-events: none;
}

/* النهاري */
body:not(.dark-mode) .top-bar {
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(223,248,255,.92)),
    radial-gradient(circle at 18% 0%, rgba(53,216,255,.30), transparent 36%);
  border-color: rgba(7, 27, 58, 0.12);
  box-shadow:
    0 16px 32px rgba(7, 27, 58, 0.13),
    inset 0 1px 0 rgba(255,255,255,.9);
}

/* ترتيب العناصر */
.menu-toggle {
  order: 1;
  margin-right: auto;
}

.vip-badge {
  order: 2;
  margin-left: 10px;
}

.balance-section {
  order: 3;
}

.logo {
  order: 4;
}

/* الشعار صار داخل جزيرة */
.logo {
  height: 42px;
  max-width: 112px;
  object-fit: contain;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(53,216,255,.22);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    0 8px 20px rgba(0,0,0,.22);
  transition: transform .25s ease, box-shadow .25s ease;
}

.logo:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 20px rgba(53,216,255,.32);
}

body:not(.dark-mode) .logo {
  background: #ffffff;
  border-color: rgba(7, 27, 58, 0.10);
}

/* زر القائمة */
.menu-toggle {
  width: 48px;
  height: 48px;
  margin-right: 0;
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(53,216,255,.26), rgba(255,255,255,.06));
  border: 1px solid rgba(53,216,255,.28);
  color: #ffffff;
  font-size: 20px;

  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.15),
    0 8px 18px rgba(0,0,0,.24);
  transition: .25s ease;
}

.menu-toggle i {
  color: #ffffff !important;
}

.menu-toggle:hover {
  transform: rotate(-8deg) scale(1.05);
  background: linear-gradient(145deg, #35d6ff, #0b2d5c);
  box-shadow: 0 0 22px rgba(53,216,255,.35);
}

body:not(.dark-mode) .menu-toggle {
  background: linear-gradient(145deg, #ffffff, #dff8ff);
  border-color: rgba(7, 27, 58, 0.10);
}

body:not(.dark-mode) .menu-toggle i {
  color: #071b3a !important;
}

/* زر الرجوع في topbar1 */
.btn-back {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(53,216,255,.26), rgba(255,255,255,.06));
  border: 1px solid rgba(53,216,255,.28);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.15),
    0 8px 18px rgba(0,0,0,.24);
  transition: .25s ease;
}

.btn-back i {
  color: #ffffff !important;
}

.btn-back:hover {
  transform: translateX(3px) scale(1.05);
  box-shadow: 0 0 20px rgba(53,216,255,.30);
}

body:not(.dark-mode) .btn-back {
  background: linear-gradient(145deg, #ffffff, #dff8ff);
  border-color: rgba(7, 27, 58, 0.10);
}

body:not(.dark-mode) .btn-back i {
  color: #071b3a !important;
}

/* الرصيد صار زر مركزي مميز */
.balance-section {
  justify-self: center;
  min-width: 150px;
  height: 48px;
  padding: 0 18px;

  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;

  color: #ffffff;
  border-radius: 999px;
  cursor: pointer;

  background:
    linear-gradient(135deg, rgba(53,216,255,.30), rgba(11,45,92,.45)),
    radial-gradient(circle at top, rgba(255,255,255,.20), transparent 55%);
  border: 1px solid rgba(53,216,255,.35);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 10px 24px rgba(0,0,0,.26),
    0 0 18px rgba(53,216,255,.12);

  transition: .25s ease;
}

.balance-section:hover {
  transform: translateY(-3px);
  background:
    linear-gradient(135deg, rgba(53,216,255,.48), rgba(11,45,92,.60));
  box-shadow:
    0 0 24px rgba(53,216,255,.34),
    0 12px 25px rgba(0,0,0,.26);
}

.balance-amount {
  font-size: 16px;
  font-weight: 900;
  color: #ffffff;
  margin-left: 0;
  letter-spacing: .2px;
}

.balance-currency {
  font-size: 12px;
  font-weight: 900;
  color: #bff4ff;
}

.balance-section i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  color: #35d6ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

body:not(.dark-mode) .balance-section {
  background:
    linear-gradient(135deg, #071b3a, #0b8fc2);
  color: #ffffff;
  border-color: rgba(7,27,58,.12);
}

body:not(.dark-mode) .balance-amount {
  color: #ffffff;
}

body:not(.dark-mode) .balance-currency {
  color: #dff8ff;
}

/* VIP */
.vip-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.vip-badge img {
  height: 46px !important;
  width: 46px !important;
  object-fit: cover;
  border-radius: 50% !important;
  border: 1px solid rgba(53,216,255,.45);
  box-shadow:
    0 0 0 4px rgba(53,216,255,.08),
    0 0 20px rgba(53,216,255,.34) !important;
  transition: .25s ease;
}

.vip-badge img:hover {
  transform: scale(1.08) rotate(5deg);
}

/* دعم topbar1 */
.back-logo {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

/* موبايل */
@media (max-width: 600px) {
  header {
    padding-top: 7px;
  }

  .top-bar {
    width: 94%;
    min-height: 60px;
    padding: 7px;
    gap: 7px;
    border-radius: 26px;
  }

  .logo {
    height: 36px;
    max-width: 92px;
    padding: 4px 7px;
  }

  .menu-toggle,
  .btn-back {
    width: 42px;
    height: 42px;
  }

  .balance-section {
    min-width: 112px;
    height: 42px;
    padding: 0 10px;
    gap: 5px;
  }

  .balance-amount {
    font-size: 13px;
  }

  .balance-currency {
    font-size: 10px;
  }

  .balance-section i {
    width: 19px;
    height: 19px;
    font-size: 10px;
  }

  .vip-badge img {
    height: 40px !important;
    width: 40px !important;
  }
}

@media (max-width: 380px) {
  .balance-section {
    min-width: 96px;
    padding: 0 8px;
  }

  .balance-amount {
    font-size: 12px;
  }

  .logo {
    max-width: 78px;
  }
}