:root {
  /* Ultra-Premium Palette - Cyber-Crystal */
  --bg: #020408;
  --surface: hsla(220, 40%, 4%, 0.85);
  --surface-hover: hsla(220, 40%, 8%, 0.95);
  --border: hsla(190, 100%, 50%, 0.12);
  --border-glow: hsla(190, 100%, 50%, 0.5);
  --accent: #00f2ff;
  --accent-secondary: #ff00ea;
  --ultra-accent: #00ff95; /* Cyber Green */
  --accent-grad: linear-gradient(135deg, #00f2ff 0%, #ff00ea 50%, #00ff95 100%);
  --text: #f0f6fc;
  --muted: #aab4be;
  --green: #00ff95;
  --yellow: #ffcc00;
  --red: #ff3366;
  --blue: #0099ff;
  --blur: blur(32px);
  --card-shadow: 0 15px 60px rgba(0, 0, 0, 0.6);
  --panel-glow: 0 0 30px rgba(0, 242, 255, 0.05);
}

body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  perspective: 2000px; /* Enhanced 3D Perspective */
}

/* Hyper-Dynamic Background Beams */
body::before {
  content: '';
  position: fixed;
  top: -20%; left: -20%; width: 140%; height: 140%;
  background: 
    radial-gradient(circle at 5% 15%, hsla(190, 100%, 50%, 0.07) 0%, transparent 35%),
    radial-gradient(circle at 95% 85%, hsla(300, 100%, 50%, 0.07) 0%, transparent 35%),
    linear-gradient(45deg, hsla(160, 100%, 50%, 0.02) 0%, transparent 100%);
  z-index: -2;
  animation: nebulaShift 50s infinite alternate ease-in-out;
}

/* Moving Light Beam */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(120deg, transparent 30%, hsla(190, 100%, 50%, 0.03) 45%, hsla(300, 100%, 50%, 0.03) 55%, transparent 70%);
  background-size: 300% 300%;
  z-index: -1;
  pointer-events: none;
  animation: beamSweep 15s infinite linear;
}

@keyframes beamSweep {
  0% { background-position: -150% -150%; }
  100% { background-position: 150% 150%; }
}

@keyframes nebulaShift {
  0% { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.2) rotate(12deg); }
}

.wrap {
  width: 92%;
  max-width: 1540px;
  margin: 0 auto;
  padding: 60px 20px;
}

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.04em;
  font-weight: 800;
  text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.shine-text {
  background: linear-gradient(90deg, #fff, var(--accent), var(--accent-secondary), var(--ultra-accent), #fff);
  background-size: 400% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShine 10s linear infinite;
  filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.2));
}

@keyframes textShine {
  to { background-position: 400% center; }
}

/* Ultra-Premium Crystal Panel with Reactive 3D */
.panel, .card, .service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  padding: 36px;
  border-radius: 28px;
  box-shadow: var(--card-shadow), var(--panel-glow);
  transition: 
    transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 0.4s ease,
    box-shadow 0.6s ease,
    background 0.4s ease;
  transform-style: preserve-3d;
  position: relative;
  overflow: visible; /* Allow glows to spill */
  perspective: 1000px;
}

/* Inner Glow Effect */
.panel::before, .card::before, .service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  border-radius: inherit;
  background: radial-gradient(circle at center, hsla(190, 100%, 50%, 0.1), transparent 70%);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  z-index: -1;
}

/* Sweep Shimmer */
.panel::after, .card::after, .service-card::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: linear-gradient(45deg, transparent 40%, hsla(190, 100%, 50%, 0.15) 45%, hsla(300, 100%, 50%, 0.15) 55%, transparent 60%);
  transform: rotate(-45deg);
  transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  opacity: 0.3;
  z-index: 10;
}

.panel:hover, .card:hover, .service-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 40px 100px rgba(0, 242, 255, 0.2), 0 0 50px rgba(0, 242, 255, 0.15);
  transform: translateY(-15px) rotateX(8deg) rotateY(-5deg) scale(1.02);
  background: var(--surface-hover);
}

/* 3D Action Enhancement */
.card:hover > *, .service-card:hover > * {
  transform: translateZ(30px);
  transition: transform 0.4s ease;
}

.panel:hover::before, .card:hover::before, .service-card:hover::before {
  opacity: 1;
}

.panel:hover::after, .card:hover::after, .service-card:hover::after {
  left: 100%;
}

/* Arabic Specifics */
[lang="ar"], [dir="rtl"] {
  font-family: 'Cairo', 'Inter', sans-serif;
}

/* Ultra-Premium Buttons */
.btn {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--border);
  background: hsla(220, 40%, 15%, 0.6);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent-grad);
  border: none;
  color: white;
  box-shadow: 0 8px 25px rgba(0, 242, 255, 0.3), 0 0 10px rgba(255, 0, 234, 0.1);
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 15px 40px rgba(0, 242, 255, 0.5), 0 0 20px rgba(255, 0, 234, 0.3);
}

.btn:active {
  transform: scale(0.94) translateY(0);
}

/* Staggered Floating Entry */
@keyframes floatInUp {
  from { opacity: 0; transform: translateY(60px) rotateX(-10deg); filter: blur(10px); }
  to { opacity: 1; transform: translateY(0) rotateX(0); filter: blur(0); }
}

.stagger-item {
  animation: floatInUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* Premium Inputs */
input, textarea, select {
  background: hsla(0, 0%, 0%, 0.4);
  border: 1px solid var(--border);
  color: white;
  padding: 16px 22px;
  border-radius: 16px;
  transition: all 0.4s ease;
  font-size: 15px;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(0, 242, 255, 0.15), inset 0 2px 10px rgba(0,0,0,0.2);
  background: hsla(0, 0%, 0%, 0.6);
}

/* Interactive Tabs Evolution */
.tabs {
  background: hsla(220, 40%, 2%, 0.5);
  padding: 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.tab {
  border-radius: 14px;
  transition: cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
}

/* Result Box Appearance */
.result-box {
  background: hsla(0, 0%, 0%, 0.3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px;
  box-shadow: inset 0 2px 20px rgba(0,0,0,0.4);
}

/* Success Shimmer */
.success-glow {
  animation: successUltraFlash 1.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes successUltraFlash {
  0% { border-color: var(--green); box-shadow: 0 0 0 0 rgba(0, 255, 149, 0.6); }
  100% { border-color: var(--border); box-shadow: 0 0 100px 50px rgba(0, 255, 149, 0); }
}

/* Utilities */
.hidden {
  display: none !important;
}

.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.4s ease;
}

.modal-content {
  background: var(--surface);
  border: 1px solid var(--border-glow);
  padding: 40px;
  border-radius: 28px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.8);
  max-width: 500px;
  width: 90%;
  transform-style: preserve-3d;
  animation: modalSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(40px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── GLOBAL NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 60px;
  background: rgba(5,8,16,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,242,255,0.08);
}
.nav-logo { font-size: 22px; font-weight: 900; letter-spacing: -0.03em; color: #fff; font-family: 'Outfit', sans-serif; text-decoration: none;}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  color: rgba(255,255,255,0.6); text-decoration: none; font-size: 15px; font-weight: 600;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-cta {
  background: var(--accent-grad);
  color: #000; font-weight: 800; font-size: 14px;
  padding: 10px 24px; border-radius: 50px; text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 242, 255, 0.2);
}
.nav-cta:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 10px 25px rgba(0, 242, 255, 0.3); }

/* Unified Table styling for inner pages */
.table-glow {
  width: 100%; border-collapse: separate; border-spacing: 0 8px;
}
.table-glow th {
  text-align: right; padding: 12px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 1px;
}
.table-glow td {
  padding: 16px; background: rgba(255,255,255,0.02);
  border-top: 1px solid rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.2s;
}
.table-glow tr:hover td { background: rgba(255,255,255,0.04); border-color: rgba(0,242,255,0.1); }
.table-glow td:first-child { border-right: 1px solid rgba(255,255,255,0.05); border-radius: 0 12px 12px 0; }
.table-glow tr:hover td:first-child { border-right-color: rgba(0,242,255,0.3); }
.table-glow td:last-child { border-left: 1px solid rgba(255,255,255,0.05); border-radius: 12px 0 0 12px; }

@media(max-width:768px) {
  nav { padding: 16px 24px; }
  .nav-links { display: none; }
}
