:root {
  --on: 0;
  --opening: hsl(210, calc((10 + var(--on) * 70) * 1%), calc((18 + var(--on) * 68) * 1%));
  --base-top: hsl(210, calc(var(--on) * 25%), calc((30 + var(--on) * 38) * 1%));
  --base-side: hsl(210, calc(var(--on) * 25%), calc((15 + var(--on) * 35) * 1%));
  --post: hsl(210, calc(var(--on) * 20%), calc((18 + var(--on) * 35) * 1%));
  --shade-l: hsl(210, calc(var(--on) * 35%), calc((28 + var(--on) * 55) * 1%));
  --shade-m: hsl(210, calc(var(--on) * 35%), calc((16 + var(--on) * 32) * 1%));
  --shade-d: hsl(210, calc(var(--on) * 35%), calc((9 + var(--on) * 18) * 1%));
  --blend-a: hsla(210, calc(var(--on) * 30%), calc((45 + var(--on) * 50) * 1%), 0.85);
  --blend-b: hsla(210, calc(var(--on) * 30%), calc((18 + var(--on) * 28) * 1%), 0.25);
  --blend-c: hsla(210, calc(var(--on) * 30%), calc((18 + var(--on) * 28) * 1%), 0.50);
  --glow-a: hsla(200, 100%, 50%, 0.85);
  --cord-l: calc((38 + var(--on) * 52) * 1%);

  --galactic: #000814;
  --neon: #0044ff;
  --neon-glow: #00b4ff;
  --card-bg: rgba(0, 20, 39, 0.72);
  --white: #f0e6ff;
  --ease-spring: 0.88s cubic-bezier(0.22, 1, 0.36, 1);
}

body { margin: 0; background: var(--galactic); font-family: "Rajdhani", sans-serif; overflow: hidden; }
.top-nav { position: fixed; top: 20px; left: 20px; z-index: 1000; }
.login-trigger { background: transparent; border: 1px solid var(--neon-glow); color: var(--neon-glow); padding: 8px 25px; border-radius: 50px; cursor: pointer; text-decoration: none; font-family: "Orbitron", sans-serif; transition: 0.3s; }
.login-trigger:hover { background: var(--neon-glow); color: #000; box-shadow: 0 0 20px var(--neon-glow); }

#app { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 36px; z-index: 10; }
.brand-label { font-family: "Orbitron"; font-size: 3rem; background: linear-gradient(135deg, #fff, var(--neon-glow)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.brand-line { height: 1px; width: 240px; background: var(--neon-glow); margin: 10px auto; }

.stage { position: relative; width: 360px; height: 460px; perspective: 850px; }
.card { position: absolute; inset: 0; border-radius: 20px; background: var(--card-bg); backdrop-filter: blur(24px); border: 1px solid rgba(0, 180, 255, 0.3); padding: 34px; text-align: right; transform-style: preserve-3d; direction: rtl; }
.ghost { position: absolute; inset: 0; border-radius: 20px; opacity: 0; }
.ghost-1 { background: rgba(0, 20, 60, 0.5); }
.ghost-2 { background: rgba(0, 10, 40, 0.4); }

.scene { display: flex; align-items: center; gap: 80px; }
.lamp { height: 46vmin; min-height: 300px; overflow: visible !important; }
.lamp-cord { stroke: hsl(210, 0%, var(--cord-l)); transition: stroke .1s; }
.fill-opening { fill: var(--opening); }
.fill-base-side { fill: var(--base-side); }
.fill-post { fill: var(--post); }
.fill-shade { fill: var(--shade-d); }
#js-card { width: 320px; padding: 32px; background: rgba(0, 20, 40, 0.8); backdrop-filter: blur(28px); border-radius: 22px; opacity: 0; transform: scale(.9) translateX(12px); transition: all var(--ease-spring); }
#js-card.is-active { opacity: 1; transform: scale(1) translateX(0); pointer-events: auto; }
.field label { display: block; font-size: .7rem; color: var(--neon-glow); margin-bottom: 5px; }
.field input { width: 100%; padding: 10px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; color: #fff; margin-bottom: 15px; }
.btn-submit { width: 100%; padding: 12px; background: var(--neon); color: #fff; border: none; border-radius: 10px; cursor: pointer; }

#starfield, #speed-lines { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#flash { position: fixed; inset: 0; z-index: 50; background: #fff; opacity: 0; pointer-events: none; }
.controls { display: flex; gap: 20px; align-items: center; z-index: 20; direction: ltr; }
.ctrl-btn { width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--neon); background: transparent; color: var(--neon-glow); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.dot { width: 6px; height: 6px; background: rgba(255,255,255,0.2); border-radius: 50%; cursor: pointer;}
.dot.active { background: var(--neon-glow); width: 24px; border-radius: 3px; }

.card-icon { font-size: 2.8rem; margin-bottom: 16px; filter: drop-shadow(0 0 10px var(--neon)); line-height: 1; }
.card-tag { font-family: "Orbitron", monospace; font-size: 0.58rem; letter-spacing: 0.25em; color: var(--neon-glow); opacity: 0.65; text-transform: uppercase; margin-bottom: 10px; }
.card-title { font-family: "Rajdhani", sans-serif; font-size: 1.4rem; font-weight: 700; line-height: 1.3; color: #fff; margin-bottom: 14px; text-shadow: 0 0 22px rgba(0, 180, 255, 0.55); }
.card-body { font-size: 0.95rem; line-height: 1.7; color: rgba(230, 240, 255, 0.7); flex: 1; }
.card-footer { margin-top: 22px; display: flex; align-items: center; justify-content: space-between; direction: ltr; }
.card-btn { font-family: "Orbitron", monospace; font-size: 0.62rem; letter-spacing: 0.2em; color: var(--neon-glow); border: 1px solid rgba(0, 180, 255, 0.4); padding: 7px 18px; border-radius: 40px; background: rgba(0, 180, 255, 0.09); cursor: pointer; transition: all 0.25s; text-transform: uppercase; }
.card-btn:hover { background: rgba(0, 180, 255, 0.26); box-shadow: 0 0 20px rgba(0, 180, 255, 0.5); border-color: var(--neon-glow); color: #fff; }
.card-index { font-family: "Orbitron", monospace; font-size: 0.58rem; color: rgba(0, 180, 255, 0.5); letter-spacing: 0.15em; }
.card-accent { position: absolute; top: 0; left: 10%; right: 10%; height: 2px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, transparent, var(--neon-glow), var(--accent), var(--neon-glow), transparent); box-shadow: 0 0 14px var(--neon), 0 0 30px var(--neon-dim); }

/* =========================================
   📱 إعدادات توافق الجوال للمنصة الرئيسية (Responsive)
   تمت إضافتها هنا للحفاظ على الكود الأصلي بالأعلى
   ========================================= */
@media (max-width: 768px) {
  #app { gap: 20px; }
  .brand-label { font-size: 2.2rem; }
  .brand-line { width: 180px; }
  .stage { width: 88vw; height: 60vh; max-height: 420px; min-height: 380px; }
  .card { padding: 25px 20px; }
  .card-icon { font-size: 2.2rem; margin-bottom: 10px; }
  .card-title { font-size: 1.2rem; margin-bottom: 10px; }
  .card-body { font-size: 0.85rem; line-height: 1.5; }
  .controls { transform: scale(0.9); }
}
@media (max-width: 400px) {
  .brand-label { font-size: 1.8rem; }
  .stage { height: 55vh; min-height: 340px; }
}