/* =========================================================
   فهد | Kun — Gamer / Streamer landing
   Modern dark gaming aesthetic · glassmorphism · neon
   ========================================================= */

:root {
  --bg: #07070d;
  --bg-2: #0b0b16;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.10);
  --text: #f2f0ff;
  --muted: #a39fc4;
  --muted-2: #6f6b91;

  --purple: #9146ff;   /* Twitch */
  --violet: #7c3aed;
  --pink: #ff3d9a;
  --cyan: #22e0ff;
  --gold: #ffce4f;

  --grad: linear-gradient(120deg, #9146ff 0%, #ff3d9a 55%, #22e0ff 110%);
  --grad-soft: linear-gradient(120deg, rgba(145,70,255,.9), rgba(255,61,154,.85));

  --radius: 20px;
  --radius-sm: 14px;
  --maxw: 1120px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  --font-ar: 'Tajawal', 'Cairo', system-ui, sans-serif;
  --font-display: 'Cairo', 'Tajawal', sans-serif;
  --font-mono: 'Orbitron', 'Cairo', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ar);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--pink); color: #fff; }

/* ---------- Background ---------- */
.bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; background: var(--bg); }

.bg__aurora {
  position: absolute; inset: -30%;
  background:
    radial-gradient(40% 50% at 20% 20%, rgba(145, 70, 255, 0.45), transparent 60%),
    radial-gradient(35% 45% at 80% 25%, rgba(255, 61, 154, 0.32), transparent 60%),
    radial-gradient(45% 55% at 60% 85%, rgba(34, 224, 255, 0.22), transparent 60%);
  filter: blur(40px);
  animation: drift 22s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes drift {
  0%   { transform: translate3d(0,0,0) scale(1) rotate(0deg); }
  50%  { transform: translate3d(3%, -2%, 0) scale(1.08) rotate(4deg); }
  100% { transform: translate3d(-3%, 2%, 0) scale(1.04) rotate(-3deg); }
}

.bg__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(circle at 50% 35%, #000 0%, transparent 78%);
          mask-image: radial-gradient(circle at 50% 35%, #000 0%, transparent 78%);
}

.bg__noise {
  position: absolute; inset: 0; opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#particles { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Cursor glow ---------- */
.cursor-glow {
  position: fixed; top: 0; left: 0; width: 460px; height: 460px;
  border-radius: 50%; pointer-events: none; z-index: -1;
  background: radial-gradient(circle, rgba(145,70,255,.16), transparent 60%);
  transform: translate(-50%, -50%); transition: opacity .3s; opacity: 0;
}

/* ---------- Buttons ---------- */
.btn {
  --b: 0;
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-ar); font-weight: 700; font-size: 1rem;
  padding: .9rem 1.6rem; border-radius: 100px; cursor: pointer;
  border: 1px solid transparent; position: relative; isolation: isolate;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, background .25s;
  white-space: nowrap;
}
.btn .i { width: 1.15em; height: 1.15em; fill: currentColor; }
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px) scale(.99); }

.btn--primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 10px 30px -8px rgba(145,70,255,.7), inset 0 0 0 1px rgba(255,255,255,.12);
}
.btn--primary:hover { box-shadow: 0 18px 44px -10px rgba(255,61,154,.75), inset 0 0 0 1px rgba(255,255,255,.2); }

.btn--ghost {
  background: var(--surface); color: var(--text); border-color: var(--border);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover { background: var(--surface-2); border-color: rgba(255,255,255,.25); }

.btn--mini { padding: .58rem 1.1rem; font-size: .9rem; background: var(--surface); border-color: var(--border); }
.btn--mini:hover { background: var(--grad); border-color: transparent; }

.btn--pay {
  background: linear-gradient(120deg, #ffce4f, #ff9f1c); color: #2a1a00;
  font-weight: 800;
  box-shadow: 0 14px 36px -10px rgba(255,180,40,.6), inset 0 0 0 1px rgba(255,255,255,.25);
}
.btn--pay:hover { box-shadow: 0 20px 50px -12px rgba(255,180,40,.8); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 50;
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2.4rem);
  transition: background .3s, backdrop-filter .3s, border-color .3s, padding .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8,8,16,.72); backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border); padding-top: .7rem; padding-bottom: .7rem;
}
.nav__brand { display: flex; align-items: center; gap: .7rem; font-weight: 800; }
.nav__logo {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  overflow: hidden; background: #15101f; color: #fff; font-family: var(--font-mono); font-weight: 900;
  box-shadow: 0 6px 18px -6px rgba(145,70,255,.7), inset 0 0 0 1px rgba(255,255,255,.14);
}
.nav__logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nav__name { font-size: 1.1rem; letter-spacing: .2px; }
.nav__name i { color: var(--muted-2); font-style: normal; margin: 0 .25rem; }
.nav__links { display: flex; gap: .4rem; margin-inline-start: auto; }
.nav__links a {
  padding: .5rem .9rem; border-radius: 100px; color: var(--muted);
  font-weight: 600; font-size: .95rem; transition: color .2s, background .2s;
}
.nav__links a:hover { color: var(--text); background: var(--surface); }

/* ---------- Layout ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(4rem, 9vw, 7rem) clamp(1.1rem, 4vw, 2rem); }
.section__head { text-align: center; max-width: 620px; margin: 0 auto clamp(2.2rem, 5vw, 3.2rem); }
.kicker {
  display: inline-block; font-family: var(--font-mono); font-size: .72rem; font-weight: 700;
  letter-spacing: 3px; color: var(--cyan); padding: .35rem .8rem; border-radius: 100px;
  background: rgba(34,224,255,.08); border: 1px solid rgba(34,224,255,.2); margin-bottom: 1rem;
}
.section__head h2 { font-family: var(--font-display); font-size: clamp(1.8rem, 5vw, 2.7rem); font-weight: 900; line-height: 1.2; }
.section__head p { color: var(--muted); margin-top: .7rem; font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh; display: grid; place-items: center; text-align: center;
  padding: 6rem 1.2rem 3rem; position: relative;
}
.hero__inner { max-width: 760px; display: flex; flex-direction: column; align-items: center; }

.hero__badge {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .85rem; font-weight: 600; color: var(--muted);
  padding: .5rem 1rem; border-radius: 100px;
  background: var(--surface); border: 1px solid var(--border); backdrop-filter: blur(10px);
}
.hero__badge .dot {
  width: 9px; height: 9px; border-radius: 50%; background: #2bd576;
  box-shadow: 0 0 0 0 rgba(43,213,118,.6); animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(43,213,118,.55); }
  70% { box-shadow: 0 0 0 10px rgba(43,213,118,0); }
  100% { box-shadow: 0 0 0 0 rgba(43,213,118,0); }
}

.hero__avatar { position: relative; margin: 1.8rem 0 .4rem; width: 132px; height: 132px; }
.avatar-ring {
  position: absolute; inset: -7px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--purple), var(--pink), var(--cyan), var(--purple));
  animation: spin 6s linear infinite; filter: blur(.5px);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
}
@keyframes spin { to { transform: rotate(360deg); } }
.avatar {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #221a3d, #0c0b1a);
  border: 1px solid rgba(255,255,255,.1);
  font-family: var(--font-mono); font-weight: 900; font-size: 3.4rem;
  color: transparent; background-clip: padding-box;
  box-shadow: inset 0 0 30px rgba(145,70,255,.4);
}
.avatar span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar__status {
  position: absolute; bottom: 8px; inset-inline-start: 8px; width: 22px; height: 22px;
  border-radius: 50%; background: #2bd576; border: 4px solid var(--bg);
}

.hero__title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(3.2rem, 13vw, 6.6rem); line-height: 1; margin: .4rem 0;
  display: flex; align-items: center; gap: clamp(.6rem, 2vw, 1.2rem); flex-wrap: wrap; justify-content: center;
}
.hero__ar { color: var(--text); text-shadow: 0 0 40px rgba(145,70,255,.35); }
.hero__sep { color: var(--muted-2); font-weight: 300; }
.hero__en {
  font-family: var(--font-mono);
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  position: relative;
}

/* glitch */
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.glitch::before { background: linear-gradient(120deg, var(--cyan), var(--cyan)); -webkit-background-clip: text; clip-path: inset(0 0 60% 0); animation: glitch1 4s infinite linear alternate; }
.glitch::after  { background: linear-gradient(120deg, var(--pink), var(--pink)); -webkit-background-clip: text; clip-path: inset(60% 0 0 0); animation: glitch2 3.4s infinite linear alternate; }
@keyframes glitch1 { 0%,92%,100% { transform: translate(0); opacity:0;} 93% { transform: translate(-3px,-1px); opacity:.8;} 96%{transform:translate(2px,1px);opacity:.6;} }
@keyframes glitch2 { 0%,90%,100% { transform: translate(0); opacity:0;} 91% { transform: translate(3px,1px); opacity:.7;} 95%{transform:translate(-2px,-1px);opacity:.5;} }

.hero__tag { color: var(--muted); font-size: clamp(1rem, 2.4vw, 1.22rem); max-width: 560px; margin: 1rem auto 0; }

.hero__cta { display: flex; gap: .9rem; flex-wrap: wrap; justify-content: center; margin-top: 2rem; }

.hero__stats {
  display: flex; align-items: center; gap: clamp(1rem, 4vw, 2.2rem);
  margin-top: 2.6rem; padding: 1rem 1.6rem; border-radius: 100px;
  background: var(--surface); border: 1px solid var(--border); backdrop-filter: blur(10px);
}
.stat { display: flex; flex-direction: column; line-height: 1.2; }
.stat b { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: .78rem; color: var(--muted); }
.stat__div { width: 1px; height: 30px; background: var(--border); }

.hero__scroll {
  position: absolute; bottom: 1.8rem; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid var(--border); border-radius: 20px;
}
.hero__scroll span {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px; border-radius: 4px; background: var(--cyan);
  animation: scroll 1.8s infinite;
}
@keyframes scroll { 0%{opacity:0;top:8px;} 30%{opacity:1;} 60%{opacity:1;top:22px;} 100%{opacity:0;top:22px;} }

/* ---------- Live card ---------- */
.live-card {
  max-width: 960px; margin: 0 auto; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow); position: relative;
  padding: 10px;
}
.live-card::before {
  content: ""; position: absolute; inset: 0; padding: 1px; border-radius: var(--radius);
  background: var(--grad-soft); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: .5; pointer-events: none;
}
.live-card__player { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.live-card__player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-card__placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 1rem; color: var(--muted); }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--purple); animation: spin 1s linear infinite; }

/* ---------- Clips ---------- */
.clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; }
.clip {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: #000; box-shadow: var(--shadow);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s;
}
.clip:hover { transform: translateY(-5px); border-color: rgba(255,255,255,.22); }
.clip iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* facade (lightweight thumbnail until clicked) */
.clip--facade { cursor: pointer; background: linear-gradient(135deg, #1a1430, #0c0b1a); }
.clip__thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.clip--facade::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,7,13,.12), rgba(7,7,13,.5)); transition: background .3s; }
.clip--facade:hover .clip__thumb { transform: scale(1.06); }
.clip--facade:hover::after { background: linear-gradient(180deg, rgba(7,7,13,.02), rgba(7,7,13,.32)); }
.clip--facade:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.clip__play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2;
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); transition: transform .3s;
  box-shadow: 0 12px 30px -8px rgba(145,70,255,.8), inset 0 0 0 1px rgba(255,255,255,.25);
}
.clip--facade:hover .clip__play { transform: translate(-50%, -50%) scale(1.12); }
.clip__play svg { width: 24px; height: 24px; fill: #fff; margin-left: 3px; }
.clip__title {
  position: absolute; inset-inline: 0; bottom: 0; z-index: 2; padding: 1.6rem .9rem .7rem;
  font-size: .92rem; font-weight: 700; color: #fff; text-align: start;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(to top, rgba(0,0,0,.72), transparent);
}
.clips-empty {
  grid-column: 1 / -1; text-align: center; padding: clamp(2rem, 6vw, 3.4rem);
  border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface);
  display: flex; flex-direction: column; align-items: center; gap: 1.1rem;
}
.clips-empty p { color: var(--muted); font-size: 1.05rem; }
.clips-more { display: flex; justify-content: center; margin-top: 2.2rem; }
.clips-more .btn--ghost { color: var(--text); }
.clips-more .btn--ghost:hover { border-color: rgba(145,70,255,.5); color: #fff; }
.clips-more .i { width: 1.1em; height: 1.1em; fill: var(--purple); }

@media (max-width: 600px) { .clips { grid-template-columns: 1fr; } }

/* ---------- Socials ---------- */
.socials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.social {
  position: relative; display: flex; align-items: center; gap: 1rem; overflow: hidden;
  padding: 1.5rem; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); backdrop-filter: blur(10px);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s, background .3s;
}
.social:hover { transform: translateY(-6px); border-color: rgba(255,255,255,.22); background: var(--surface-2); }
.social__glow {
  position: absolute; inset: 0; opacity: 0; transition: opacity .35s; pointer-events: none;
  background: radial-gradient(60% 80% at 100% 0%, var(--c, var(--purple)), transparent 70%);
  filter: blur(10px);
}
.social:hover .social__glow { opacity: .35; }
.social__icon {
  flex: none; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: rgba(255,255,255,.05); border: 1px solid var(--border); transition: transform .3s;
}
.social:hover .social__icon { transform: scale(1.06) rotate(-4deg); }
.social__icon svg { width: 28px; height: 28px; fill: var(--c, #fff); }
.social__meta { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.social__plat { font-weight: 800; font-size: 1.15rem; }
.social__handle { color: var(--muted); font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: right; }
.social__cta {
  margin-inline-start: auto; flex: none; font-size: .85rem; font-weight: 700; color: var(--muted);
  display: inline-flex; align-items: center; gap: .25rem; transition: color .3s, gap .3s;
}
.social:hover .social__cta { color: var(--c, var(--text)); gap: .5rem; }
.social__cta i { font-style: normal; }

.social--ig { --c: #e1306c; }
.social--tt { --c: #25f4ee; }
.social--tw { --c: #9146ff; }

/* ---------- Support ---------- */
.support {
  position: relative; max-width: 860px; margin: 0 auto; overflow: hidden;
  border-radius: calc(var(--radius) + 6px); padding: clamp(2.2rem, 6vw, 4rem);
  text-align: center; border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(145,70,255,.14), rgba(255,61,154,.08) 60%, rgba(255,206,79,.06));
  box-shadow: var(--shadow);
}
.support__glow {
  position: absolute; width: 420px; height: 420px; border-radius: 50%; top: -180px; inset-inline-end: -120px;
  background: radial-gradient(circle, rgba(255,206,79,.35), transparent 65%); filter: blur(30px); pointer-events: none;
}
.support__content { position: relative; }
.support h2 { font-family: var(--font-display); font-size: clamp(1.9rem, 5vw, 2.8rem); font-weight: 900; margin-bottom: .6rem; }
.support p { color: var(--muted); max-width: 480px; margin: 0 auto 1.8rem; font-size: 1.05rem; }
.support .btn--pay { font-size: 1.08rem; padding: 1rem 2rem; }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--maxw); margin: 0 auto; padding: 2.5rem clamp(1.1rem, 4vw, 2rem) 3rem;
  border-top: 1px solid var(--border); text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 1.2rem;
}
.footer__brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.1rem; }
.footer__brand i { color: var(--muted-2); font-style: normal; }
.footer__socials { display: flex; gap: .7rem; }
.footer__socials a {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); transition: transform .25s, background .25s, border-color .25s;
}
.footer__socials a:hover { transform: translateY(-3px); background: var(--surface-2); border-color: rgba(255,255,255,.25); }
.footer__socials svg { width: 20px; height: 20px; fill: var(--muted); transition: fill .25s; }
.footer__socials a:hover svg { fill: var(--text); }
.footer__copy { color: var(--muted-2); font-size: .85rem; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .40s; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .socials { grid-template-columns: 1fr; }
  .nav__links { display: none; }
  /* لما تختفي روابط القائمة، خلّي زر الدعم يطفو على اليسار */
  .nav .btn--mini { margin-inline-start: auto; }
}
@media (max-width: 480px) {
  .hero__stats { gap: 1rem; padding: .8rem 1.1rem; }
  .stat b { font-size: 1.25rem; }
  .btn { font-size: .95rem; padding: .85rem 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
