:root{
  --bg-deep:#0a0714;
  --bg-mid:#140b2e;
  --purple:#7b2ff7;
  --purple-2:#a259ff;
  --blue:#3b6cff;
  --gold:#ffcc33;
  --gold-2:#ffe27a;
  --white:#f5f3ff;
  --muted:#b8aede;
  --card-bg:rgba(255,255,255,0.04);
  --card-border:rgba(162,89,255,0.35);
  --radius-lg:22px;
  --radius-md:16px;
  --shadow-glow:0 0 24px rgba(123,47,247,0.45);
  --nav-h:72px;
}

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

html{
  scroll-behavior:smooth;
  background:var(--bg-deep);
}

body{
  font-family:'Tajawal', sans-serif;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(123,47,247,0.35), transparent 60%),
    radial-gradient(ellipse 70% 50% at 90% 20%, rgba(59,108,255,0.25), transparent 60%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 45%, var(--bg-deep) 100%);
  color:var(--white);
  min-height:100vh;
  position:relative;
  overflow-x:hidden;
  padding-bottom:calc(var(--nav-h) + 16px);
}

.bg-fx{position:absolute; inset:0; height:100%; z-index:0; pointer-events:none; overflow:hidden;}
.orb{position:absolute; border-radius:50%; filter:blur(60px); opacity:.5;}
.orb-1{width:340px; height:340px; background:var(--purple); top:-100px; right:-80px;}
.orb-2{width:280px; height:280px; background:var(--blue); bottom:10%; left:-100px;}
.orb-3{width:220px; height:220px; background:var(--gold); opacity:.15; top:40%; right:20%;}
.sparkle{position:absolute; color:var(--gold-2); opacity:.6; font-size:14px; animation:twinkle 3.5s ease-in-out infinite;}
.s1{top:8%; left:12%; animation-delay:0s;}
.s2{top:20%; right:15%; animation-delay:.6s;}
.s3{top:55%; left:6%; animation-delay:1.2s;}
.s4{top:70%; right:10%; animation-delay:1.8s;}
.s5{top:35%; left:45%; animation-delay:2.4s;}
@keyframes twinkle{0%,100%{opacity:.15; transform:scale(.8);} 50%{opacity:.9; transform:scale(1.15);}}

.wrap{
  max-width:520px;
  margin:0 auto;
  padding:0 14px;
  position:relative;
  z-index:1;
}

/* Header */
.topbar{
  max-width:520px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:14px;
  position:sticky;
  top:0;
  z-index:50;
  background:linear-gradient(180deg, rgba(10,7,20,0.85), rgba(10,7,20,0.55));
  backdrop-filter:blur(10px);
}

.icon-btn{
  width:44px; height:44px;
  border-radius:12px;
  border:1px solid var(--card-border);
  background:var(--card-bg);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:4px;
  cursor:pointer;
}
.icon-btn span{width:18px; height:2px; background:var(--gold-2); border-radius:2px;}

.wallet-chip{
  flex:1;
  max-width:220px;
  display:flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 16px;
  border-radius:30px;
  border:1px solid var(--card-border);
  background:linear-gradient(135deg, rgba(123,47,247,0.25), rgba(59,108,255,0.15));
  color:var(--white);
  font-weight:700;
  cursor:pointer;
  text-decoration:none;
}
.wallet-chip .plus{
  width:20px; height:20px; border-radius:50%;
  background:var(--gold); color:#1a0b2e;
  display:flex; align-items:center; justify-content:center;
  font-size:14px; font-weight:900;
}
.wallet-cur{color:var(--gold-2); font-size:12px;}

.brand img{
  height:42px; width:42px; object-fit:cover; border-radius:50%;
  border:2px solid var(--gold);
  box-shadow:var(--shadow-glow);
}

/* Hero */
.hero{
  margin-top:6px;
  border-radius:var(--radius-lg);
  overflow:hidden;
  border:1px solid var(--card-border);
  box-shadow:var(--shadow-glow);
  position:relative;
}
.hero-slide img{width:100%; display:block; object-fit:cover; aspect-ratio:16/9;}
.hero-dots{
  position:absolute; bottom:10px; left:50%; transform:translateX(-50%);
  display:flex; gap:6px;
}
.dot{width:7px; height:7px; border-radius:50%; background:rgba(255,255,255,0.4);}
.dot.active{background:var(--gold); width:20px; border-radius:6px;}

/* Badges */
.badges{
  display:flex; justify-content:space-between; gap:10px;
  margin-top:14px;
}
.badge{
  flex:1;
  display:flex; align-items:center; justify-content:center; gap:6px;
  padding:10px 6px;
  border-radius:14px;
  border:1px solid var(--card-border);
  background:var(--card-bg);
  font-size:13px; font-weight:700; color:var(--gold-2);
}
.badge-ic{font-size:15px;}

/* Marquee */
.marquee-box{
  margin-top:14px;
  border-radius:14px;
  border:1px solid var(--card-border);
  background:var(--card-bg);
  overflow:hidden;
  padding:10px 0;
}
.marquee-track{
  display:flex;
  white-space:nowrap;
  width:max-content;
  animation:scrollrtl 22s linear infinite;
  font-size:13px;
  color:var(--muted);
}
@keyframes scrollrtl{
  0%{transform:translateX(0);}
  100%{transform:translateX(-50%);}
}

/* Section titles */
.section-title{
  margin-top:26px;
  margin-bottom:14px;
  text-align:center;
  font-size:17px;
  letter-spacing:1px;
  color:var(--gold-2);
  display:flex; align-items:center; justify-content:center; gap:8px;
}

/* Category grid */
.cat-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
.cat-card{
  display:block;
  border-radius:var(--radius-md);
  overflow:hidden;
  border:1px solid var(--card-border);
  background:var(--card-bg);
  text-decoration:none;
  color:var(--white);
  transition:transform .2s ease, box-shadow .2s ease;
}
.cat-card:hover{ transform:translateY(-4px); box-shadow:var(--shadow-glow); }
.cat-img{ position:relative; aspect-ratio:1/1; overflow:hidden; display:flex; align-items:center; justify-content:center; }
.cat-emoji{ font-size:44px; filter:drop-shadow(0 0 14px rgba(255,204,51,0.35)); }
.cat-bg-1{ background:radial-gradient(circle at 30% 20%, rgba(123,47,247,0.55), transparent 60%), linear-gradient(135deg,#1c0f3a,#0a0714); }
.cat-bg-2{ background:radial-gradient(circle at 70% 20%, rgba(59,108,255,0.5), transparent 60%), linear-gradient(135deg,#0f1d3a,#0a0714); }
.cat-bg-3{ background:radial-gradient(circle at 30% 70%, rgba(255,204,51,0.35), transparent 60%), linear-gradient(135deg,#241a0a,#0a0714); }
.cat-bg-4{ background:radial-gradient(circle at 70% 70%, rgba(162,89,255,0.5), transparent 60%), linear-gradient(135deg,#1c0f3a,#0a0714); }
.cat-bg-5{ background:radial-gradient(circle at 50% 30%, rgba(59,108,255,0.5), rgba(123,47,247,0.35), transparent 65%), linear-gradient(135deg,#0f1230,#0a0714); }
.cat-bg-6{ background:radial-gradient(circle at 50% 50%, rgba(255,204,51,0.3), transparent 60%), linear-gradient(135deg,#1a1030,#0a0714); }
.cat-overlay{
  position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(10,7,20,0) 40%, rgba(10,7,20,0.9) 100%);
  display:flex; flex-direction:column; align-items:center; justify-content:flex-end;
  padding:12px;
  text-align:center;
}
.cat-brand{ font-weight:900; color:var(--gold); font-size:13px; letter-spacing:2px; }
.cat-name{ font-weight:700; font-size:15px; margin-top:2px; }
.cat-icons{
  display:flex; flex-wrap:wrap; gap:6px;
  padding:10px;
  justify-content:center;
}
.cip{
  font-size:10px; font-weight:700;
  padding:4px 8px;
  border-radius:8px;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.1);
  color:var(--muted);
}

/* Game strip */
.strip-row{
  display:flex; flex-wrap:wrap; gap:8px; justify-content:center;
}
.strip-item{
  padding:10px 14px;
  border-radius:12px;
  background:linear-gradient(135deg, rgba(123,47,247,0.25), rgba(255,204,51,0.08));
  border:1px solid var(--card-border);
  font-size:12px; font-weight:700; color:var(--white);
}

/* Footer */
.site-footer{
  margin-top:32px;
  text-align:center;
  padding:20px 0 10px;
  color:var(--muted);
  font-size:12px;
}
.footer-logo{
  width:56px; height:56px; object-fit:cover; border-radius:50%;
  border:2px solid var(--gold);
  margin-bottom:10px;
}

/* Bottom nav */
.bottom-nav{
  position:fixed; bottom:0; left:0; right:0;
  max-width:520px; margin:0 auto;
  height:var(--nav-h);
  display:flex; align-items:center; justify-content:space-between;
  padding:8px 18px;
  background:rgba(15,9,32,0.9);
  backdrop-filter:blur(14px);
  border-top:1px solid var(--card-border);
  z-index:60;
}
.bottom-nav a{
  display:flex; flex-direction:column; align-items:center; gap:3px;
  color:var(--muted);
  text-decoration:none;
  font-size:10px;
  flex:1;
}
.bn-ic{font-size:19px;}
.bn-main{
  width:52px; height:52px;
  border-radius:50%;
  background:linear-gradient(135deg, var(--purple), var(--blue));
  color:var(--white) !important;
  display:flex; align-items:center; justify-content:center;
  margin-top:-26px;
  box-shadow:var(--shadow-glow);
  border:2px solid var(--gold);
  flex:none;
}
.bn-main .bn-ic{font-size:22px;}

/* Drawer */
.drawer-overlay{
  position:fixed; inset:0; background:rgba(0,0,0,0.55);
  opacity:0; pointer-events:none; transition:opacity .25s ease;
  z-index:90;
}
.drawer-overlay.show{ opacity:1; pointer-events:auto; }

.drawer{
  position:fixed; top:0; right:0; bottom:0;
  width:82%; max-width:320px;
  background:linear-gradient(180deg, var(--bg-mid), var(--bg-deep));
  border-left:1px solid var(--card-border);
  z-index:100;
  transform:translateX(100%);
  transition:transform .3s ease;
  padding:26px 18px;
  overflow-y:auto;
}
.drawer.open{ transform:translateX(0); }

.drawer-head{ text-align:center; margin-bottom:20px; }
.drawer-logo{
  width:72px; height:72px; object-fit:cover; border-radius:50%;
  border:2px solid var(--gold); margin-bottom:10px;
  box-shadow:var(--shadow-glow);
}
.drawer-head h3{ color:var(--gold-2); font-size:18px; }
.drawer-head p{ color:var(--muted); font-size:12px; margin-top:6px; }

.drawer-list{ list-style:none; display:flex; flex-direction:column; gap:6px; }
.drawer-list .sep{ height:1px; background:var(--card-border); margin:10px 0; }
.drawer-list a{
  display:flex; align-items:center; gap:10px;
  color:var(--white); text-decoration:none;
  padding:12px 14px;
  border-radius:12px;
  font-weight:600; font-size:14px;
  border:1px solid transparent;
}
.drawer-list a:hover{ background:var(--card-bg); border-color:var(--card-border); }
.drawer-list .ic{ font-size:16px; }

.drawer-close{
  position:absolute; top:16px; left:16px;
  width:34px; height:34px; border-radius:50%;
  background:var(--card-bg); border:1px solid var(--card-border);
  color:var(--white); font-size:16px; cursor:pointer;
}

@media (min-width:600px){
  .cat-grid{ grid-template-columns:repeat(3,1fr); }
}
