/* ======================================
   GLOBAL RESET
====================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ======================================
   ROOT VARIABLES
====================================== */
:root {
  --bg-main: #020510;
  --bg-app-top: #040b16;
  --bg-app-bottom: #02040a;

  --cyan: #00e5ff;
  --cyan-soft: rgba(0, 229, 255, 0.22);

  --gold: #ffd54f;
  --gold-strong: #ffb300;

  --danger: #ff5252;

  --text-main: #e9f4ff;
  --text-muted: #90a4c8;

  --radius-pill: 999px;
}

/* ======================================
   BODY + GLOBAL BACKGROUND
====================================== */
html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at 10% 0%, #041b34 0%, #020510 40%, #000 100%);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* pattern + subtle glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(0, 229, 255, 0.25) 0, transparent 55%),
    radial-gradient(circle at 80% 85%, rgba(0, 229, 255, 0.18) 0, transparent 60%),
    radial-gradient(circle at 50% 120%, rgba(0, 0, 0, 0.9) 0, transparent 65%);
  opacity: 0.9;
}

/* big neon blobs */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background-image:
    radial-gradient(circle at 90% 0%, rgba(0, 229, 255, 0.4) 0, transparent 60%),
    radial-gradient(circle at 0% 100%, rgba(124, 77, 255, 0.4) 0, transparent 60%);
  filter: blur(40px);
  opacity: 0.75;
}

.hidden {
  display: none !important;
}

/* ======================================
   SPLASH
====================================== */
.splash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, #020714 0%, #000 90%);
  z-index: 999;
}

.splash-inner {
  text-align: center;
}

.splash-coin {
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 0 24px rgba(255, 193, 7, 0.9));
}

.splash-title {
  margin: 10px 0 4px;
  font-size: 30px;
  letter-spacing: 0.14em;
}

.splash-sub {
  font-size: 13px;
  opacity: 0.8;
}

/* ======================================
   APP WRAPPER (PHONE)
====================================== */
.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-bottom: 80px;

  background: radial-gradient(circle at top, rgba(4, 11, 22, 0.98), rgba(2, 4, 10, 0.99));
  border-left: 1px solid rgba(0, 229, 255, 0.12);
  border-right: 1px solid rgba(0, 229, 255, 0.12);
  box-shadow:
    0 0 40px rgba(0, 229, 255, 0.08),
    0 0 80px rgba(0, 0, 0, 0.9);

  /* يمنع أي glow يطلع برا الحافة */
  overflow: hidden;
}

/* grid overlay inside app */
.app::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(0, 229, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 229, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.35;
  mix-blend-mode: soft-light;
  pointer-events: none;
  z-index: 0;
}

/* كل المحتوى فوق grid */
.top-bar,
.daily-row,
.event-banner,
.screen-container,
.bottom-nav {
  position: relative;
  z-index: 1;
}

/* ======================================
   TOP BAR
====================================== */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px 8px;
  background: linear-gradient(to bottom, #050b16 0%, #040813 100%);
  border-bottom: 1px solid rgba(0, 229, 255, 0.18);
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
  object-fit: cover;
}

.user-info {
  display: flex;
  gap: 10px;
  align-items: center;
}

.user-text {
  display: flex;
  flex-direction: column;
}

.user-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

#username {
  font-size: 14px;
  font-weight: 600;
}

.user-join {
  font-size: 11px;
  opacity: 0.75;
}

.level-bar {
  margin-top: 3px;
  width: 140px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.level-fill {
  height: 100%;
  width: 10%;
  background: linear-gradient(90deg, var(--gold), var(--gold-strong));
}

.rank-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(0, 229, 255, 0.2);
  border: 1px solid rgba(0, 229, 255, 0.6);
  color: var(--text-main);
}

.top-icons {
  display: flex;
  gap: 10px;
}

.icon-btn {
  border: none;
  background: rgba(0, 229, 255, 0.08);
  padding: 6px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}

.icon-btn img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.icon-btn:active {
  transform: scale(0.95);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
}

/* ======================================
   DAILY SHORTCUTS
====================================== */
.daily-row {
  display: flex;
  gap: 10px;
  padding: 2px 16px 12px;
}

.daily-pill {
  flex: 1;
  border-radius: 16px;
  border: 1px solid rgba(0, 229, 255, 0.4);
  background: rgba(4, 14, 30, 0.96);
  color: var(--text-main);
  font-size: 12px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;

  padding: 12px 6px;
  cursor: pointer;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, border-color 0.12s;
}

.daily-pill img {
  width: 36px;
  height: 36px;
  margin-bottom: 2px;
}

.daily-pill:active {
  transform: scale(0.96);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.4);
  border-color: var(--cyan);
}

/* ======================================
   EVENT BANNER
====================================== */
.event-banner {
  padding: 4px 16px 6px;
  font-size: 12px;
  opacity: 0.9;
}

/* ======================================
   SCREENS CONTAINER
====================================== */
.screen-container {
  padding: 4px 16px 80px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

/* ======================================
   HOME / HERO ZONE
====================================== */
.hero-zone {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* خلفية نيون وراء الدائرة */
.hero-zone::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  top: 0;
  filter: blur(45px);
  background: radial-gradient(circle, rgba(0, 229, 255, 0.38), transparent 70%);
  opacity: 0.6;
  z-index: -1;
}

/* الدائرة الرئيسية */
.hero-circle {
  width: min(330px, 80vw);
  height: min(330px, 80vw);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #041526 0%, #000 70%);
  box-shadow:
    0 0 40px rgba(0, 229, 255, 0.45),
    0 0 80px rgba(0, 0, 0, 0.9);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  cursor: pointer;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}

.hero-circle:active {
  transform: scale(0.97);
  box-shadow:
    0 0 45px rgba(0, 229, 255, 0.9),
    0 0 90px rgba(0, 0, 0, 0.9);
}

.hero-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.25), transparent 70%);
  filter: blur(6px);
}

.hero-circle img {
  width: 70%;
  height: auto;
  z-index: 1;
}

/* نبضة عند الضغط */
.hero-circle.tap-anim {
  animation: heroPulse 0.25s ease-out;
}

@keyframes heroPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.5);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 40px rgba(0, 229, 255, 0.9);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.5);
  }
}

.hero-name {
  margin-top: 10px;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: #e3f2fd;
}

/* الطاقة + زر Boost */
.energy-row {
  margin-top: 8px;
  width: 100%;
  max-width: 320px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.energy-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  opacity: 0.9;
}

.energy-info span:first-child {
  color: #ffb74d;
}

.boost-btn {
  border-radius: var(--radius-pill);
  border: none;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 600;
  background: linear-gradient(135deg, #ffb300, #ffea00);
  color: #251200;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(255, 193, 7, 0.7);
}

/* ======================================
   STATS + BALANCE
====================================== */
.stats-strip {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.stat-block {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(4, 14, 30, 0.96);
  border: 1px solid rgba(0, 229, 255, 0.2);
}

.stat-block img {
  width: 24px;
  height: 24px;
}

.stat-label {
  font-size: 10px;
  opacity: 0.7;
}

.stat-value {
  font-size: 14px;
  font-weight: 600;
}

.balance-block {
  margin-top: 10px;
  text-align: center;
}

.balance-label {
  font-size: 12px;
  opacity: 0.75;
}

.balance-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
}

.balance-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(255, 193, 7, 0.8);
}

.balance-coin {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

/* ======================================
   INBOX + GENERIC BUTTONS
====================================== */
.inbox-row {
  margin-top: 10px;
  text-align: center;
}

.pill-btn {
  border-radius: var(--radius-pill);
  border: none;
  padding: 7px 14px;
  font-size: 13px;
  background: linear-gradient(135deg, #0069ff, #00e5ff);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease-out, box-shadow 0.1s ease-out;
}

.pill-btn.secondary {
  background: transparent;
  border: 1px solid rgba(0, 229, 255, 0.5);
}

.pill-btn.wide {
  width: 100%;
  justify-content: center;
}

.pill-btn:active {
  transform: scale(0.97);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.6);
}

.badge-dot {
  margin-left: 6px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--danger);
  font-size: 11px;
}

/* ======================================
   GENERIC TITLES
====================================== */
.screen-title {
  margin: 8px 0 2px;
  font-size: 18px;
}

.screen-subtitle {
  margin: 0 0 10px;
  font-size: 12px;
  opacity: 0.8;
}

.section-title {
  margin: 12px 0 6px;
  font-size: 14px;
}

/* ======================================
   HEROES SCREEN
====================================== */
.hero-preview {
  align-items: flex-start;
  margin-top: 6px;
  display: flex;
  gap: 10px;
  background: rgba(4, 14, 30, 0.96);
  border-radius: 16px;
  border: 1px solid rgba(0, 229, 255, 0.3);
  padding: 8px;
}

.hero-preview-img {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, #04101f, #000);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-preview-img .hero-glow {
  width: 100%;
  height: 100%;
}

.hero-preview-img img {
  width: 70px;
  height: auto;
  position: relative;
  z-index: 1;
}
/* ===== HERO UPGRADE RING (Timer) ===== */
.hero-preview-ring{
  position: relative; /* مهم جدا */
  width: 96px;
  height: 96px;
  border-radius: 50%;
  padding: 3px;
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.30);
  display: grid;
  place-items: center;
}



.hero-preview-ring .hero-preview-img{
  width: 90px;
  height: 90px;
}

.hero-preview-info {
  flex: 1;
  font-size: 12px;
}

.hero-preview-name {
  font-size: 14px;
  font-weight: 600;
}

.hero-preview-rarity {
  font-size: 11px;
  opacity: 0.8;
}

.hero-preview-bonuses {
  margin-top: 4px;
}

.hero-preview-bonuses div {
  font-size: 11px;
}

.hero-preview-actions{
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
/* ===== AD ICON INSIDE HERO RING ===== */
.hero-ad-ring{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 44px;
  height: 44px;
  border-radius: 50%;

  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255, 213, 79, 0.6);
  color: #ffd54f;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 18px;
  cursor: pointer;
  z-index: 5;

  animation: adPulse 1.6s infinite ease-in-out;
}

/* نبضة */
@keyframes adPulse {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 0.75; }
  50%  { transform: translate(-50%, -50%) scale(1.12); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0.75; }
}

/* Upgrade ياخذ السطر كامل */
#btn-upgrade-hero{
  grid-column: 1 / -1;
}

/* ===== Watch Ad (upgrade) ===== */
.hero-ad-btn{
  display: none;              /* افتراضيًا مخفي */
  width: 100%;
  justify-content: center;
  margin-top: 6px;
  border-color: rgba(255, 213, 79, 0.75);
  background: rgba(255, 213, 79, 0.12);
  color: #ffecb3;
  font-weight: 600;
}

.hero-ad-btn:active{
  box-shadow: 0 0 16px rgba(255, 213, 79, 0.35);
}

.hero-ad-info{
  margin-top: 6px;
  font-size: 11px;
  opacity: 0.85;
  color: #ffecb3;
}



.hero-shards-row,
.hero-fusion-row {
  margin-top: 8px;
  font-size: 12px;
}

.hero-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.hero-grid-card {
  border-radius: 16px;
  border: 1px solid rgba(0, 229, 255, 0.18);
  background: rgba(4, 14, 30, 0.96);
  text-align: center;
  padding: 6px 4px 8px;
  font-size: 11px;
  cursor: pointer;
}

.hero-grid-card img {
  width: 60px;
  height: 60px;
}
/* HERO GRID STATES */
.hero-grid-card.locked {
  opacity: 0.55;
  filter: saturate(0.8);
}

.hero-grid-card.active {
  border-color: rgba(255, 213, 79, 0.85);
  box-shadow:
    0 0 18px rgba(255, 213, 79, 0.35),
    0 0 26px rgba(0, 229, 255, 0.18);
}

.hero-grid-card.active .hero-grid-rarity {
  opacity: 0.95;
}

.hero-grid-rarity {
  opacity: 0.7;
  font-size: 10px;
}

.hero-grid-lock {
  font-size: 10px;
  color: #ffb74d;
}

/* ======================================
   TASKS / MISSIONS / MARKET
====================================== */
.task-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(4, 14, 30, 0.96);
  border-radius: 16px;
  border: 1px solid rgba(0, 229, 255, 0.18);
  padding: 9px 10px;
  margin-bottom: 6px;
}

.task-icon img {
  width: 32px;
  height: 32px;
}

.task-body {
  flex: 1;
}

.task-title {
  font-size: 13px;
  font-weight: 500;
}

.task-desc {
  font-size: 11px;
  opacity: 0.8;
}

.task-reward {
  font-size: 11px;
  color: var(--gold);
}

.task-btn {
  border-radius: var(--radius-pill);
  border: none;
  padding: 6px 10px;
  font-size: 12px;
  background: #00c853;
  color: #fff;
  cursor: pointer;
}

.mission-card {
  border-radius: 16px;
  border: 1px solid rgba(0, 229, 255, 0.18);
  background: rgba(4, 14, 30, 0.96);
  padding: 10px;
}

.mission-title {
  font-size: 13px;
  font-weight: 500;
}

.mission-desc,
.mission-reward {
  font-size: 11px;
  opacity: 0.8;
}

.mission-progress {
  margin-top: 6px;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.mission-progress-fill {
  width: 20%;
  height: 100%;
  background: linear-gradient(90deg, #00e5ff, #00ff9d);
}

.loot-row,
.market-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.loot-btn {
  flex: 1;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 229, 255, 0.5);
  background: rgba(4, 14, 30, 0.96);
  color: var(--text-main);
  font-size: 12px;
  padding: 6px;
  cursor: pointer;
}

.loot-btn.wide {
  width: 100%;
}

/* ======================================
   MINI GAMES LIST & MODALS
====================================== */
.mini-games-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-card {
  background: rgba(4, 14, 30, 0.96);
  border-radius: 16px;
  border: 1px solid rgba(0, 229, 255, 0.16);
  padding: 9px 10px;
}

.mini-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mini-name {
  font-size: 13px;
  font-weight: 500;
}

.mini-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(0, 229, 255, 0.12);
  color: var(--cyan);
}

.mini-desc {
  margin: 4px 0 7px;
  font-size: 11px;
  opacity: 0.8;
}

.mini-play-btn {
  border-radius: var(--radius-pill);
  border: none;
  padding: 6px 10px;
  font-size: 12px;
  background: linear-gradient(135deg, #0069ff, #00e5ff);
  color: #fff;
  cursor: pointer;
}

/* game modals */
.game-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
}

.game-modal.hidden {
  display: none;
}

.game-panel {
  width: 90%;
  max-width: 360px;
  background: radial-gradient(circle at top, #041529, #020610);
  border-radius: 18px;
  padding: 12px 12px 14px;
  border: 1px solid rgba(0, 229, 255, 0.5);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.4);
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  margin-bottom: 4px;
}

.game-close {
  border: none;
  background: transparent;
  color: #9fb5ff;
  font-size: 16px;
  cursor: pointer;
}

.game-sub {
  font-size: 11px;
  opacity: 0.8;
}

/* speed builder */
.sb-grid {
  margin: 10px auto;
  width: 210px;
  height: 210px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.sb-cell {
  border-radius: 14px;
  background: rgba(2, 10, 24, 0.9);
  border: 1px solid rgba(0, 229, 255, 0.18);
  cursor: pointer;
}

.sb-cell.active {
  background: radial-gradient(circle, #00e5ff, #0069ff);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.7);
}

/* energy runner */
.er-track {
  position: relative;
  margin: 10px auto;
  width: 220px;
  height: 160px;
  border-radius: 16px;
  background: rgba(5, 15, 32, 0.95);
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.er-lane {
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.er-lane:first-child {
  border-left: none;
}

.er-hero {
  position: absolute;
  bottom: 6px;
  width: 40px;
  height: 18px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #00e5ff, #00ff9d);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.7);
  left: calc(50% - 20px);
  transition: left 0.18s ease-out;
}

.er-battery {
  position: absolute;
  width: 20px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, #ffc107, #ffeb3b);
  box-shadow: 0 0 10px rgba(255, 235, 59, 0.7);
  top: -40px;
  left: calc(50% - 10px);
}

.er-controls {
  margin: 8px 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* magnet zone */
.mz-area {
  margin: 10px auto;
  width: 230px;
  height: 180px;
  border-radius: 16px;
  background: rgba(5, 15, 32, 0.95);
  position: relative;
  overflow: hidden;
}

.mz-coin {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold), #ff9800);
  box-shadow: 0 0 12px rgba(255, 193, 7, 0.8);
  cursor: pointer;
}

/* ======================================
   FRIENDS & TEAMS
====================================== */
#screen-friends .screen-title {
  font-size: 18px;
  letter-spacing: 0.04em;
}

#screen-friends .screen-subtitle {
  font-size: 12px;
  opacity: 0.85;
}

.friends-hero-card {
  margin-top: 10px;
  padding: 14px 14px 12px;
  border-radius: 20px;
  background: radial-gradient(circle at top, #06286b 0%, #04102a 55%, #020713 100%);
  border: 1px solid rgba(0, 229, 255, 0.45);
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.35);
}

.friends-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.friends-hero-title {
  font-size: 14px;
  font-weight: 600;
}

.friends-hero-tag {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: rgba(0, 229, 255, 0.12);
  color: var(--cyan);
}

.friends-hero-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 10px;
}

.friends-bonus-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #ffb300, #ffe082);
  color: #1a1300;
  font-size: 11px;
  box-shadow: 0 0 14px rgba(255, 193, 7, 0.8);
}

.friends-bonus-icon {
  width: 18px;
  height: 18px;
}

.friends-bonus-amount {
  font-weight: 600;
}

.friends-bonus-text {
  font-size: 11px;
  opacity: 0.9;
}

.friends-hero-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.friends-main-btn {
  flex: 1;
  border-radius: var(--radius-pill);
  border: none;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 600;
  background: linear-gradient(135deg, #0069ff, #00e5ff);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.5);
}

.friends-secondary-btn {
  min-width: 60px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 229, 255, 0.8);
  background: rgba(2, 10, 24, 0.9);
  color: var(--text-main);
  font-size: 12px;
  cursor: pointer;
}

.friends-rewards-row {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 229, 255, 0.18);
}

.friends-rewards-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.friends-rewards-icon {
  width: 20px;
  height: 20px;
}

.friends-rewards-title {
  opacity: 0.8;
}

.friends-rewards-value {
  font-weight: 600;
  font-size: 12px;
}

.friends-top-card {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(4, 14, 30, 0.96);
  border: 1px solid rgba(0, 229, 255, 0.2);
}

.friends-top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 6px;
}

.friends-top-count {
  opacity: 0.8;
}

.friends-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.friends-empty {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px dashed rgba(0, 229, 255, 0.4);
  font-size: 11px;
  opacity: 0.9;
  text-align: center;
}

/* ======================================
   AIRDROP
====================================== */
.airdrop-center {
  margin-top: 40px;
  text-align: center;
}

.airdrop-icon {
  width: 72px;
  height: 72px;
}

/* ======================================
   SETTINGS
====================================== */
.setting-card {
  border-radius: 16px;
  border: 1px solid rgba(0, 229, 255, 0.18);
  background: rgba(4, 14, 30, 0.96);
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 13px;
}

.setting-value {
  opacity: 0.8;
}

.gift-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.gift-row input {
  flex: 1;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 229, 255, 0.4);
  background: rgba(2, 9, 20, 0.9);
  color: var(--text-main);
  padding: 6px 8px;
  font-size: 13px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.badge-chip {
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-size: 11px;
  border: 1px solid rgba(0, 229, 255, 0.4);
  background: rgba(2, 9, 20, 0.95);
}

.badge-chip.locked {
  opacity: 0.4;
}

.danger-btn {
  width: 100%;
  border-radius: var(--radius-pill);
  border: none;
  padding: 8px 0;
  margin-top: 10px;
  background: linear-gradient(135deg, var(--danger), #ff1744);
  color: #fff;
  cursor: pointer;
}

.settings-footer {
  margin-top: 8px;
  font-size: 11px;
  opacity: 0.7;
  text-align: center;
}

/* player stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.stat-card {
  border-radius: 14px;
  border: 1px solid rgba(0, 229, 255, 0.22);
  background: radial-gradient(circle at top, #04152a, #020813);
  padding: 8px 10px;
}

.stat-card-label {
  font-size: 11px;
  opacity: 0.8;
}

.stat-card-value {
  margin-top: 3px;
  font-size: 15px;
  font-weight: 600;
  color: #e3f2fd;
}

/* ======================================
   LEADERBOARD
====================================== */
.lb-list-new {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(4, 14, 30, 0.96);
  border: 1px solid rgba(0, 229, 255, 0.2);
}

.lb-rank {
  font-size: 16px;
  font-weight: 700;
  width: 28px;
  text-align: center;
}

.lb-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(0, 229, 255, 0.45);
}

.lb-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lb-info {
  flex: 1;
}

.lb-name {
  font-size: 14px;
  font-weight: 600;
}

.lb-ph {
  font-size: 11px;
  opacity: 0.8;
}

/* top 3 */
.lb-item.first {
  background: linear-gradient(90deg, #4c3f00, #1a1500);
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(255, 213, 79, 0.6);
}

.lb-item.second {
  background: linear-gradient(90deg, #2e3e47, #0c141a);
  border-color: #b0bec5;
}

.lb-item.third {
  background: linear-gradient(90deg, #4a2f00, #1b0f00);
  border-color: #ff9100;
}

.lb-item.normal {
  background: rgba(4, 14, 30, 0.8);
}

.lb-item.me {
  background: linear-gradient(90deg, #614f00, #221c00);
  border-color: #ffeb3b;
  box-shadow: 0 0 18px rgba(255, 235, 59, 0.6);
}

/* ======================================
   FORTUNE WHEEL
====================================== */
#screen-wheel {
  max-width: 360px;
  margin: 0 auto;
  text-align: center;
}

#screen-wheel .screen-title,
#screen-wheel .screen-subtitle {
  text-align: center;
}

#wheel-container {
  position: relative;
  width: 260px;
  height: 260px;
  margin: 16px auto 12px;
  overflow: visible;
}

#wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.7);
  transform-origin: 50% 50%;
  transition: transform 3.6s cubic-bezier(0.15, 0.85, 0.25, 1);
}

#wheel-arrow {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 22px solid var(--gold);
  filter: drop-shadow(0 0 6px rgba(255, 213, 79, 0.9));
  z-index: 20;
}

.wheel-info {
  text-align: center;
  font-size: 12px;
  margin-bottom: 8px;
}

#btn-spin-wheel {
  margin-top: 6px;
}

/* ======================================
   BOTTOM NAV
====================================== */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  max-width: 480px;
  width: 100%;
  bottom: 0;
  padding: 6px 14px 10px;
  background: linear-gradient(
    to top,
    #02040a 0%,
    rgba(2, 4, 10, 0.96) 60%,
    transparent 100%
  );
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
  z-index: 100;
}

.nav-item {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  transition: transform 0.12s ease-out, color 0.12s ease-out;
}

.nav-item img {
  width: 22px;
  height: 22px;
}

.nav-item.active span {
  color: #fff;
}

.nav-item:active {
  transform: scale(0.94);
}

.nav-home {
  position: relative;
  top: -10px;
}

.nav-home-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle, #013968 0%, #001326 70%, #000 100%);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.nav-home-circle img {
  width: 30px;
  height: 30px;
}

/* ======================================
   PHASE H — LOOT ANIMATION (Hamster style)
====================================== */
.loot-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}

.loot-card {
  width: min(360px, 92vw);
  border-radius: 22px;
  border: 1px solid rgba(0, 229, 255, 0.55);
  background: radial-gradient(circle at top, rgba(6, 20, 40, 0.98), rgba(2, 6, 16, 0.98));
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.35);
  padding: 18px 16px 16px;
  position: relative;
  overflow: hidden;
  transform: scale(0.92);
  opacity: 0;
  animation: lootPop 0.22s ease-out forwards;
}

@keyframes lootPop {
  to { transform: scale(1); opacity: 1; }
}

.loot-ring {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin: 4px auto 10px;
  border: 2px solid rgba(0, 229, 255, 0.65);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.35);
  position: relative;
  display: grid;
  place-items: center;
}

.loot-ring::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.18), transparent 60%);
  filter: blur(10px);
}

.loot-icon {
  width: 62px;
  height: 62px;
  border-radius: 14px;
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.25);
  display: grid;
  place-items: center;
  font-size: 34px;
  position: relative;
  animation: lootBounce 0.5s ease-out;
}

@keyframes lootBounce {
  0% { transform: translateY(10px) scale(0.95); opacity: 0.3; }
  60% { transform: translateY(-6px) scale(1.05); opacity: 1; }
  100% { transform: translateY(0) scale(1); }
}

.loot-title {
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.08em;
  margin: 0;
  opacity: 0.95;
}

.loot-amount {
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  margin: 6px 0 0;
  color: var(--gold);
  text-shadow: 0 0 14px rgba(255, 193, 7, 0.7);
}

.loot-sub {
  text-align: center;
  margin: 6px 0 0;
  font-size: 12px;
  opacity: 0.8;
}

.loot-spark {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.9);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.9);
  animation: lootSpark 0.7s ease-out forwards;
  pointer-events: none;
}

@keyframes lootSpark {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; }
}

/* ======================================
   GENERIC POPUPS
====================================== */
.popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 250;
}

.popup.hidden {
  display: none;
}

.popup-content {
  width: 90%;
  max-width: 320px;
  background: radial-gradient(circle at top, #041529, #020610);
  border-radius: 18px;
  padding: 12px 12px 14px;
  border: 1px solid rgba(0, 229, 255, 0.5);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.4);
}

.popup-content.wide {
  max-width: 360px;
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.popup-header h3 {
  margin: 0;
}

.popup-x {
  border: none;
  background: transparent;
  color: #9fb5ff;
  cursor: pointer;
  font-size: 16px;
}

.popup-sub {
  margin: 4px 0 10px;
  font-size: 12px;
  opacity: 0.8;
}

.popup-section-title {
  margin: 6px 0 4px;
  font-size: 13px;
}

/* daily login grid */
.daily-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.daily-cell {
  border-radius: 12px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  background: rgba(4, 14, 30, 0.96);
  font-size: 10px;
  text-align: center;
  padding: 4px 2px;
}

.daily-cell img {
  width: 18px;
  height: 18px;
}

.daily-cell.today {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(255, 193, 7, 0.8);
}

/* daily reward */
.daily-reward-center {
  text-align: center;
  margin-bottom: 8px;
}

.daily-reward-center img {
  width: 40px;
  height: 40px;
}

.daily-reward-amount {
  font-size: 24px;
  font-weight: 700;
  margin-top: 4px;
  color: var(--gold);
}

/* boost cards */
.boost-card {
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, #051a2f, #03101e);
  border-radius: 16px;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid rgba(0, 229, 255, 0.25);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.15);
}

.boost-icon {
  width: 42px;
  height: 42px;
  margin-right: 12px;
}

.boost-info {
  flex: 1;
}

.boost-name {
  font-size: 15px;
  font-weight: 600;
}

.boost-sub {
  font-size: 11px;
  opacity: 0.8;
  margin-top: 2px;
}

.boost-arrow {
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #007bff, #00e5ff);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

/* inbox list */
.inbox-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  font-size: 12px;
}

.inbox-list li {
  padding: 6px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ======================================
   TAP FLOAT (+COINS)
====================================== */
.tap-float {
  position: absolute;
  font-size: 26px;
  font-weight: 800;
  color: var(--gold);
  text-shadow:
    0 0 10px rgba(255, 193, 7, 0.95),
    0 0 18px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  opacity: 0;
  z-index: 5;
  animation: tapFloat 0.6s ease-out forwards;
}

@keyframes tapFloat {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-30px) scale(1.15);
  }
}

/* ======================================
   SPEED UI KIT (CARDS / BUTTONS / INPUTS)
====================================== */
.speed-card {
  border-radius: 18px;
  background: radial-gradient(circle at top left, #061628, #020813 60%, #01030a 100%);
  border: 1px solid var(--cyan-soft);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.8);
  padding: 10px 12px;
}

.speed-card.flat {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
}

.speed-section-title {
  margin: 14px 0 6px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.speed-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #0069ff, #00e5ff);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.6);
}

.speed-btn.secondary {
  background: rgba(3, 16, 32, 0.95);
  border: 1px solid rgba(0, 229, 255, 0.6);
  box-shadow: none;
}

.speed-btn.danger {
  background: linear-gradient(135deg, var(--danger), #ff1744);
  box-shadow: 0 0 18px rgba(255, 82, 82, 0.7);
}

.speed-btn.full {
  width: 100%;
}

.speed-input {
  width: 100%;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 229, 255, 0.35);
  background: rgba(2, 9, 20, 0.96);
  color: var(--text-main);
  padding: 7px 11px;
  font-size: 13px;
}

.speed-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  background: rgba(0, 229, 255, 0.16);
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.5);
}

.speed-chip {
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-size: 11px;
  background: rgba(3, 12, 25, 0.96);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.speed-chip.locked {
  opacity: 0.45;
}

.speed-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ======================================
   LARGE SCREENS
====================================== */
@media (min-width: 900px) {
  body {
    display: flex;
    justify-content: center;
  }

  .app {
    border-left: 1px solid rgba(0, 229, 255, 0.2);
    border-right: 1px solid rgba(0, 229, 255, 0.2);
  }
}
.frag-bar{
  height: 10px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0 2px;
}
.frag-bar-fill{
  height:100%;
  width:0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0,180,255,0.9), rgba(0,90,255,0.9));
  transition: width 0.25s ease;
}


/* =========================
   HIDE MINI GAMES (TEMP)
========================= */

.mini-games,
.mini-games-list,
.mini-game-card {
  display: none !important;
}
/* =========================
   LOOT BOXES UPGRADE
========================= */

.loot-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 12px;
}

.loot-row button {
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 14px;
  border: 1px solid rgba(0,229,255,0.35);
  background: linear-gradient(145deg, #061c26, #020b12);
  color: #00e5ff;
  box-shadow: inset 0 0 18px rgba(0,229,255,0.15);
  transition: all 0.25s ease;
}

.loot-row button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 22px rgba(0,229,255,0.35);
}
/* =========================
   MARKETPLACE UPGRADE
========================= */

.market-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 12px;
}

.market-row .loot-btn {
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 14px;
  border: 1px solid rgba(0,229,255,0.35);
  background: linear-gradient(145deg, #061c26, #020b12);
  color: #00e5ff;
  box-shadow: inset 0 0 18px rgba(0,229,255,0.15);
  transition: all 0.25s ease;
}

.market-row .loot-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 22px rgba(0,229,255,0.35);
}


.section-title {
  display: block;
}

.section-title:has(+ .mini-games-list) {
  display: none;
}
.task-icon{
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: rgba(0,229,255,0.12);
  border: 1px solid rgba(0,229,255,0.35);
}

.tiktok-icon{
  color:#ff4081;
}

.instagram-icon{
  color:#ff9800;
}
/* ===============================
   HERO GRID – LOCKED vs UNLOCKED
================================ */

/* الكرت */
.hero-grid-card {
  position: relative;
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, #0b1a24, #050b10);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s;
}

/* المفتوح */
.hero-grid-card.unlocked {
  box-shadow: 0 0 0 1px rgba(0,229,255,.15);
}

.hero-grid-card.unlocked:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 14px rgba(0,229,255,.35);
  cursor: pointer;
}

.hero-grid-card.locked {
  opacity: 0.75;              /* خفيف فقط */
  filter: none;               /* مهم: رجّع الألوان */
  cursor: pointer;            /* يسمح بالضغط */
}

.hero-grid-card.locked img {
  filter: brightness(0.75);   /* خفف الصورة فقط */
}

/* طبقة ظل خفيفة تعطي إحساس مغلوق */
.hero-grid-card.locked::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: radial-gradient(
    circle at top,
    rgba(0,0,0,0.15),
    rgba(0,0,0,0.45)
  );
  pointer-events: none;
}


/* لف الصورة */
.hero-img-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

/* أيقونة القفل */
.hero-lock {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0,0,0,.75);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #ffb300;
  box-shadow: 0 0 8px rgba(0,0,0,.6);
}

/* نص الشروط */
.hero-grid-lock {
  margin-top: 6px;
  font-size: 11px;
  color: #ff9800;
  text-align: center;
}
