/* شريط الرصيد + إشحن — زي تصميم البوربوينت */

body.homepage .hub-balance-strip {
  direction: rtl;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin: 0 0 14px;
  width: 100%;
}

body.homepage .hub-balance-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

body.homepage .hub-balance-side-projects {
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  text-decoration: none;
  color: #111;
  min-width: 168px;
  min-height: 56px;
  padding: 8px 12px 8px 10px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
body.homepage .hub-balance-side-projects:hover,
body.homepage .hub-balance-side-projects:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34), 0 3px 8px rgba(0, 0, 0, 0.14);
  outline: none;
}
body.homepage .hub-balance-side-projects-play {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  background: #ff0000;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(255, 0, 0, 0.35);
}
body.homepage .hub-balance-side-projects-play i {
  margin-inline-start: 2px;
}
body.homepage .hub-balance-side-projects-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}
body.homepage .hub-balance-side-projects-label {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  text-align: start;
  max-width: none;
  color: #111;
  text-shadow: none;
}
body.homepage .hub-balance-side-projects-sub {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  color: #6b7280;
}

body.homepage .hub-balance-bar {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  width: auto;
  min-width: 0;
  min-height: 56px;
  border-radius: 12px;
  overflow: hidden;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

body.homepage .hub-balance-free {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
  min-height: 56px;
  flex: 0 0 auto;
}

body.homepage .hub-balance-free-points {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 44px;
  padding: 4px 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff2d2d, #b5000e);
  box-shadow: 0 8px 18px rgba(229, 9, 20, 0.35);
  line-height: 1.15;
}

body.homepage .hub-balance-free-points strong {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
}

body.homepage .hub-balance-free-points span {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 236, 240, 0.92);
}

body.homepage .hub-balance-free-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

body.homepage .hub-balance-free-meta strong {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
}

body.homepage .hub-balance-perk {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: transparent;
  border: none;
  color: #fff;
  flex: 1 1 auto;
  min-width: 0;
}

body.homepage .hub-balance-perk-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 6px 14px rgba(22, 163, 74, 0.35);
}

body.homepage .hub-balance-perk-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

body.homepage .hub-balance-perk-copy strong {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

body.homepage .hub-balance-perk-copy span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, #e50914, #b5000e);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
}

body.homepage .hub-balance-charge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0a0a0a;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.homepage .hub-balance-charge:hover,
body.homepage .hub-balance-charge:focus-visible {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #ff2d2d, #e50914);
  border-color: transparent;
  box-shadow: 0 16px 34px rgba(229, 9, 20, 0.38);
  outline: none;
}

body.homepage .hub-balance-paid {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 220, 228, 0.78);
  text-align: right;
}

body.homepage .hub-balance-paid strong {
  color: #fff;
  font-weight: 900;
}

body.homepage .hub-balance-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #c50812, #8b000e);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 28px rgba(120, 0, 14, 0.3);
  color: #fff;
}

body.homepage .hub-balance-status-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
  min-width: 0;
}

body.homepage .hub-balance-status-copy strong {
  font-size: 14px;
  font-weight: 900;
  color: #fff;
}

body.homepage .hub-balance-status-copy span {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 220, 228, 0.88);
}

body.homepage .hub-balance-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

body.homepage .hub-balance-status-pill i {
  font-size: 8px;
  color: #4ade80;
}

/* نافذة إشحن رصيد */
.hub-charge-modal[hidden] {
  display: none !important;
}

.hub-charge-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.hub-charge-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 0, 2, 0.72);
  backdrop-filter: blur(6px);
}

.hub-charge-modal__panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  border-radius: 22px;
  background: linear-gradient(160deg, #1a050a 0%, #0c0004 100%);
  border: 1px solid rgba(229, 9, 20, 0.35);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  padding: 22px 20px 18px;
  direction: rtl;
  color: #fff;
}

.hub-charge-modal__panel h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
}

.hub-charge-modal__panel > p {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 220, 228, 0.78);
}

.hub-charge-packs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.hub-charge-pack {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border-radius: 16px;
  padding: 14px 8px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.hub-charge-pack strong {
  display: block;
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 4px;
}

.hub-charge-pack span {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 210, 218, 0.8);
}

.hub-charge-pack.is-active,
.hub-charge-pack:hover {
  border-color: rgba(229, 9, 20, 0.7);
  background: rgba(229, 9, 20, 0.18);
  transform: translateY(-2px);
}

.hub-charge-custom {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.hub-charge-custom label {
  font-size: 13px;
  font-weight: 800;
  color: rgba(255, 220, 228, 0.88);
}

.hub-charge-custom input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(229, 9, 20, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 700;
}

.hub-charge-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hub-charge-actions .btn {
  flex: 1 1 140px;
  min-height: 46px;
  border-radius: 999px;
  font-weight: 800;
}

.hub-charge-close {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}

.hub-charge-feedback {
  margin: 12px 0 0;
  min-height: 20px;
  font-size: 13px;
  font-weight: 700;
  color: #86efac;
}

.hub-charge-feedback.is-error {
  color: #fda4af;
}

@media (max-width: 740px) {
  body.homepage .hub-balance-top-row {
    align-items: stretch;
    flex-wrap: wrap;
  }

  body.homepage .hub-balance-side-projects {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
  }

  body.homepage .hub-balance-bar {
    flex-wrap: wrap;
  }

  body.homepage .hub-balance-free,
  body.homepage .hub-balance-perk {
    flex: 1 1 100%;
    border-inline-end: none;
  }

  .hub-charge-packs {
    grid-template-columns: 1fr;
  }
}
