/*
  النسخة المعدلة التي تحل جميع المشاكل المطلوبة مع الحفاظ على الطابع الفضائي
*/
:root {
  /* Deep Space Core Palette */
  --bg: #000000;
  --nebula-core: #5d40d4;
  --nebula-cyan: #00e5ff;
  --nebula-pink: #ff00c8;
  --nebula-green: #00ff9d;
  --nebula-purple: #7a5cff;
  --stellar-white: #e6e6ff;
  --stellar-mute: rgba(230, 230, 255, 0.65);
  --quantum-glass: rgba(6, 8, 16, 0.82);
  --quantum-glass-strong: rgba(4, 6, 12, 0.92);
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --container-max: 1400px;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-deep: 0 35px 140px rgba(26, 10, 60, 0.92);
  --shadow-nebula: 0 0 45px rgba(93, 64, 212, 0.22);
  --shadow-nebula-cyan: 0 0 35px rgba(0, 229, 255, 0.22);
  --shadow-nebula-green: 0 0 30px rgba(0, 255, 157, 0.18);
  --fast: 120ms;
  --medium: 280ms;
  --slow: 520ms;
  --ultra-slow: 1040ms;
  --quantum: cubic-bezier(0.2, 0.8, 0.3, 1);
  --stellar: cubic-bezier(0.1, 0.9, 0.2, 1);
}
/* ========== COSMIC FOUNDATION ========== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Fira Code', 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: all var(--medium) var(--quantum);
  animation: none;
}
html, body {
  height: 100%;
  overflow-x: hidden;
  background-color: #000000;
  color: var(--stellar-white);
  line-height: 1.55;
  overscroll-behavior: none;
  touch-action: manipulation;
}
/* ========== DEEP SPACE CANVAS (Quantum Vacuum) ========== */
#deep-space {
  position: fixed;
  inset: 0;
  z-index: -10;
  pointer-events: none;
  background: 
    radial-gradient(1800px 900px at 10% 10%, rgba(93, 64, 212, 0.07), transparent 70%),
    radial-gradient(1600px 800px at 90% 90%, rgba(0, 229, 255, 0.05), transparent 70%),
    radial-gradient(2200px 1100px at 50% 30%, rgba(255, 0, 200, 0.035), transparent 80%),
    linear-gradient(180deg, #000000, #02010a 30%, #05020a 100%);
  animation: deepSpacePulse var(--ultra-slow) ease-in-out infinite alternate;
}
@keyframes deepSpacePulse {
  0% { opacity: 0.75; }
  100% { opacity: 0.95; }
}
/* ========== HYPER-REALISTIC STARFIELD (Quantum Fluctuation) ========== */
#starfield {
  position: fixed;
  inset: 0;
  z-index: -9;
  pointer-events: none;
  background-image:
    radial-gradient(2.0px 2.0px at 5% 15%, rgba(255, 255, 255, 0.99), transparent 45%),
    radial-gradient(1.8px 1.8px at 25% 35%, rgba(255, 255, 255, 0.94), transparent 42%),
    radial-gradient(1.6px 1.6px at 45% 55%, rgba(255, 255, 255, 0.88), transparent 40%),
    radial-gradient(1.4px 1.4px at 65% 75%, rgba(255, 255, 255, 0.84), transparent 38%),
    radial-gradient(1.2px 1.2px at 85% 85%, rgba(255, 255, 255, 0.80), transparent 35%),
    radial-gradient(0.8px 0.8px at 15% 75%, rgba(255, 255, 255, 0.75), transparent 30%),
    radial-gradient(0.6px 0.6px at 75% 25%, rgba(255, 255, 255, 0.70), transparent 28%);
  background-size: cover;
  animation: starsPulse 22s linear infinite;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.06));
}
@keyframes starsPulse {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 0.99; }
}
/* ========== NEBULA CLOUDS (Interstellar Medium) ========== */
#nebula-clouds {
  position: fixed;
  inset: 0;
  z-index: -8;
  pointer-events: none;
  background: 
    linear-gradient(120deg, 
      rgba(93, 64, 212, 0.16), 
      rgba(0, 229, 255, 0.12), 
      rgba(255, 0, 200, 0.10),
      rgba(0, 255, 157, 0.08));
  filter: blur(48px) saturate(160%);
  mix-blend-mode: screen;
  opacity: 0.28;
  animation: nebulaFlow 36s linear infinite;
  transform: translateZ(0);
  will-change: transform;
}
@keyframes nebulaFlow {
  0% { 
    transform: translate(-30%, -30%) rotate(7deg);
    background-position: 0% 0%;
  }
  50% { 
    transform: translate(30%, 30%) rotate(-5deg);
    background-position: 100% 100%;
  }
  100% { 
    transform: translate(-30%, -30%) rotate(7deg);
    background-position: 0% 0%;
  }
}
/* ========== COSMIC PARTICLES (Quantum Dust) ========== */
#cosmic-particles {
  position: fixed;
  inset: 0;
  z-index: -7;
  pointer-events: none;
  transform: translateZ(0);
  will-change: transform;
}
.particle {
  position: absolute;
  border-radius: 50%;
  filter: blur(1.4px);
  mix-blend-mode: screen;
  background: 
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.99), transparent 70%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.99), rgba(200, 240, 255, 0.94));
  box-shadow: 
    0 0 18px rgba(0, 240, 255, 0.14),
    0 0 36px rgba(0, 255, 157, 0.10);
  animation: particleFloat linear infinite;
  opacity: 0.8;
  transform: translateZ(0);
  will-change: transform;
}
@keyframes particleFloat {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); }
  100% { 
    transform: translate(var(--tx, 0), var(--ty, 0)) rotate(var(--rotate, 0)) scale(var(--scale, 1));
  }
}
/* ========== EVENT HORIZON (Black Hole Visualization) ========== */
#event-horizon {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  z-index: -6;
  pointer-events: none;
  top: 12%;
  right: 12%;
  background: 
    radial-gradient(circle, 
      transparent 35%, 
      rgba(0, 0, 0, 0.85) 65%,
      rgba(93, 64, 212, 0.38) 80%,
      rgba(0, 229, 255, 0.18) 92%,
      transparent 100%),
    conic-gradient(
      from var(--angle, 0deg),
      transparent,
      rgba(255, 0, 200, 0.28),
      rgba(0, 229, 255, 0.18),
      rgba(0, 255, 157, 0.12),
      transparent 30%
    );
  filter: blur(4px) contrast(1.3);
  animation: blackHoleSpin 50s linear infinite;
  opacity: 0.22;
  transform: translateZ(0);
  will-change: transform, background;
  mix-blend-mode: overlay;
}
@keyframes blackHoleSpin {
  from { --angle: 0deg; }
  to { --angle: 360deg; }
}
/* ========== GRAVITATIONAL LENSING (Space-Time Curvature) ========== */
#gravitational-lensing {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  top: 8%;
  right: 8%;
  background: 
    radial-gradient(circle at 50% 50%,
      transparent 40%,
      rgba(93, 64, 212, 0.07) 60%,
      rgba(0, 229, 255, 0.05) 75%,
      rgba(0, 255, 157, 0.03) 85%,
      transparent 100%);
  filter: blur(10px);
  opacity: 0.14;
  animation: lensingPulse 26s ease-in-out infinite;
  transform: translateZ(0);
  will-change: transform, opacity;
}
@keyframes lensingPulse {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.12; }
  50% { transform: scale(1.08) rotate(3deg); opacity: 0.18; }
}
/* ========== QUANTUM INTERFACE CONTAINER (Space Station Hull) ========== */
.cosmic-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 48px 36px;
  position: relative;
  z-index: 1;
  animation: containerGlow 10s ease-in-out infinite alternate;
  transform: translateZ(0);
  will-change: box-shadow;
}
@keyframes containerGlow {
  0% { box-shadow: 0 0 45px rgba(93, 64, 212, 0.12); }
  100% { box-shadow: 0 0 70px rgba(0, 229, 255, 0.18); }
}
/* ========== COSMIC HEADER (Stellar Observatory) ========== */
header {
  text-align: center;
  padding: 64px 0 40px;
  margin-bottom: 40px;
  position: relative;
  z-index: 2;
  animation: headerPulse 8s ease-in-out infinite alternate;
  transform: translateZ(0);
  will-change: filter;
}
@keyframes headerPulse {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.12); }
}
.logo-glow {
  font-family: 'Orbitron', monospace;
  font-size: clamp(2.6rem, 6.4vw, 4.8rem);
  font-weight: 900;
  background: 
    linear-gradient(90deg, 
      var(--nebula-core), 
      var(--nebula-purple),
      var(--nebula-core),
      var(--nebula-purple)),
    radial-gradient(circle at 20% 30%, 
      rgba(255, 255, 255, 0.35), 
      transparent 40%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 
    0 0 24px rgba(93, 64, 212, 0.25),
    0 0 48px rgba(0, 229, 255, 0.2),
    0 0 72px rgba(0, 255, 157, 0.15),
    0 0 100px rgba(122, 92, 255, 0.3);
  letter-spacing: 4px;
  margin-bottom: 12px;
  line-height: 1;
  position: relative;
  animation: logoGlow 5s ease-in-out infinite alternate;
  transform: translateZ(0);
  will-change: text-shadow;
}
@keyframes logoGlow {
  0% { 
    text-shadow: 
      0 0 24px rgba(93, 64, 212, 0.25), 
      0 0 48px rgba(0, 229, 255, 0.15), 
      0 0 72px rgba(0, 255, 157, 0.1),
      0 0 80px rgba(122, 92, 255, 0.2);
  }
  100% { 
    text-shadow: 
      0 0 30px rgba(93, 64, 212, 0.35), 
      0 0 54px rgba(0, 229, 255, 0.25), 
      0 0 80px rgba(0, 255, 157, 0.2),
      0 0 110px rgba(122, 92, 255, 0.4);
  }
}
.tagline {
  color: var(--stellar-mute);
  margin-top: 12px;
  font-weight: 300;
  font-size: 1.2rem;
  max-width: 760px;
  margin: 0 auto 16px;
  position: relative;
  line-height: 1.6;
  letter-spacing: 0.5px;
}
.tagline::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2.5px;
  background: linear-gradient(90deg, transparent, var(--nebula-cyan), transparent);
  border-radius: 1.25px;
}
/* ========== QUANTUM SCANNER INTERFACE (Stellar Console) ========== */
.scanner-interface {
  background: 
    linear-gradient(180deg, 
      rgba(6, 8, 14, 0.96), 
      rgba(10, 12, 22, 0.98)),
    radial-gradient(circle at 15% 15%, 
      rgba(93, 64, 212, 0.08), 
      transparent 40%),
    radial-gradient(circle at 85% 85%, 
      rgba(0, 255, 157, 0.05), 
      transparent 35%);
  border-radius: var(--radius-xl);
  padding: 42px;
  border: 1px solid rgba(122, 92, 255, 0.18);
  box-shadow: 
    var(--shadow-deep),
    0 0 36px rgba(93, 64, 212, 0.12);
  position: relative;
  overflow: visible;
  z-index: 2;
  transition: all var(--medium) var(--quantum);
  backdrop-filter: blur(14px);
  transform: translateZ(0);
  will-change: transform, box-shadow;
  border-image: linear-gradient(to bottom, rgba(93, 64, 212, 0.2), transparent 80%) 1;
}
.scanner-interface::before {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: calc(var(--radius-xl) - 2px);
  background: linear-gradient(45deg, transparent, rgba(93, 64, 212, 0.05), transparent, rgba(0, 255, 157, 0.04));
  z-index: -1;
  pointer-events: none;
}
.scanner-interface:focus-within {
  box-shadow: 
    0 50px 160px rgba(122, 92, 255, 0.2),
    0 0 60px rgba(0, 255, 157, 0.12);
  transform: translateY(-4px);
  border-color: rgba(0, 255, 157, 0.28);
}
/* ========== QUANTUM GRID OVERLAY (Stellar Cartography) ========== */
.scanner-interface::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(90deg, rgba(122, 92, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 255, 157, 0.025) 1px, transparent 1px),
    radial-gradient(circle, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 240px 240px, 240px 240px, 40px 40px;
  opacity: 0.09;
  pointer-events: none;
  z-index: -1;
  animation: gridPulse 10s ease-in-out infinite alternate;
  transform: translateZ(0);
  will-change: opacity;
}
@keyframes gridPulse {
  0% { opacity: 0.07; }
  100% { opacity: 0.11; }
}
/* ========== QUANTUM INPUT GROUP (Navigation Console) ========== */
.input-group {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
  z-index: 3;
  position: relative;
}
.input-group::before {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(93, 64, 212, 0.18), transparent);
  border-radius: 0.75px;
}
.url-input {
  flex: 1;
  min-width: 300px;
  padding: 18px 24px;
  border-radius: 16px;
  border: 2px solid rgba(122, 92, 255, 0.18);
  background: 
    linear-gradient(180deg, 
      rgba(8, 10, 18, 0.78), 
      rgba(6, 8, 14, 0.70)),
    radial-gradient(circle at 10% 20%, 
      rgba(93, 64, 212, 0.09), 
      transparent 40%);
  color: var(--stellar-white);
  font-size: 17px;
  transition: all var(--fast) var(--quantum);
  backdrop-filter: blur(9px);
  line-height: 1.55;
  word-break: break-word;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.18);
  position: relative;
  z-index: 2;
  font-family: 'Fira Code', monospace, system-ui;
}
.url-input::placeholder {
  color: rgba(230, 230, 255, 0.55);
  font-style: italic;
  opacity: 0.9;
}
.url-input:focus {
  outline: none;
  border-color: var(--nebula-green);
  box-shadow: 
    0 0 34px rgba(0, 255, 157, 0.16),
    0 0 46px rgba(0, 229, 255, 0.12);
  transform: translateY(-2px);
  z-index: 3;
}
/* ========== QUANTUM SCAN BUTTON (Propulsion System) ========== */
.scan-btn {
  padding: 16px 30px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  background: 
    linear-gradient(135deg, 
      var(--nebula-core), 
      var(--nebula-cyan),
      var(--nebula-pink)),
    radial-gradient(circle at 20% 30%, 
      rgba(255, 255, 255, 0.18), 
      transparent 40%);
  color: white;
  font-weight: 800;
  min-width: 200px;
  transition: all var(--fast) var(--quantum);
  white-space: nowrap;
  box-shadow: 
    0 10px 28px rgba(93, 64, 212, 0.3),
    0 0 36px rgba(0, 255, 157, 0.18);
  position: relative;
  overflow: hidden;
  z-index: 2;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
}
.scan-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: 0.9s;
  z-index: -1;
}
.scan-btn:hover::before {
  left: 100%;
}
.scan-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(40%);
  box-shadow: none;
  transform: none;
}
/* ========== QUANTUM PULSE ICON ANIMATION (Propulsion Thrusters) ========== */
.btn-icon {
  display: inline-block;
  transform-origin: center;
  animation: btnPulse 1.8s ease-in-out infinite;
  position: relative;
  z-index: 3;
  font-size: 1.35em;
}
@keyframes btnPulse {
  0%, 100% { 
    transform: scale(1);
    filter: drop-shadow(0 0 10px rgba(0, 255, 157, 0.5)); 
  }
  50% { 
    transform: scale(1.12);
    filter: drop-shadow(0 0 14px rgba(0, 255, 157, 0.7)); 
  }
}
/* ========== ENHANCED QUANTUM LOADING EFFECTS (Warp Drive) ========== */
.loading-container {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 26px 20px;
  margin-top: 18px;
  z-index: 3;
  position: relative;
}
.pulse-ring {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 6px solid rgba(0, 0, 0, 0.12);
  border-top: 6px solid var(--nebula-cyan);
  box-shadow: 
    0 0 46px rgba(0, 240, 255, 0.18),
    inset 0 0 24px rgba(93, 64, 212, 0.15);
  animation: spin 1.2s linear infinite;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}
.pulse-ring::before {
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 2px dashed rgba(0, 255, 157, 0.25);
}
.pulse-ring::after {
  content: '';
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  border: 1px solid rgba(0, 229, 255, 0.2);
}
@keyframes spin {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.05);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}
.loading-text {
  font-weight: 900;
  color: var(--nebula-cyan);
  margin-bottom: 10px;
  font-size: 1.35rem;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.35);
  animation: textGlow 2.2s ease-in-out infinite alternate;
  letter-spacing: 0.5px;
}
@keyframes textGlow {
  0% { text-shadow: 0 0 10px rgba(0, 240, 255, 0.25); }
  100% { text-shadow: 0 0 14px rgba(0, 240, 255, 0.45); }
}
.loading-subtext {
  color: var(--stellar-mute);
  font-size: 1.1rem;
  max-width: 360px;
  line-height: 1.55;
  letter-spacing: 0.25px;
}
/* ========== QUANTUM PROGRESS BAR (Warp Speedometer) ========== */
.progress-container {
  width: 100%;
  max-width: 640px;
  height: 16px;
  background: 
    rgba(255, 255, 255, 0.05),
    linear-gradient(0deg, 
      rgba(93, 64, 212, 0.09), 
      transparent 50%, 
      rgba(0, 255, 157, 0.07));
  border-radius: 16px;
  overflow: hidden;
  margin-top: 20px;
  position: relative;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(122, 92, 255, 0.1);
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: 
    linear-gradient(90deg, 
      var(--nebula-pink), 
      var(--nebula-cyan),
      var(--nebula-green)),
    radial-gradient(circle at var(--progress), 50%, 
      rgba(255, 255, 255, 0.25) 0%, 
      transparent 40%);
  border-radius: 16px;
  transition: width var(--medium) var(--quantum);
  box-shadow: 
    0 9px 32px rgba(0, 240, 255, 0.16),
    inset 0 2px 8px rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  will-change: width;
}
.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 80%
  );
  animation: progressShine 2.2s infinite;
  transform: translateZ(0);
  will-change: transform;
}
@keyframes progressShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
/* ========== QUANTUM QUICK OVERVIEW (Stellar Dashboard) ========== */
.quick-overview {
  margin-top: 28px;
  margin-bottom: 32px;
  z-index: 2;
  position: relative;
}
.quick-overview::before {
  content: '';
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 5px;
  background: linear-gradient(90deg, transparent, var(--nebula-cyan), transparent);
  border-radius: 2.5px;
}
.section-title {
  font-size: 1.55rem;
  color: var(--nebula-green);
  margin-bottom: 22px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  text-shadow: 0 0 12px rgba(0, 255, 157, 0.25);
  position: relative;
  animation: titleGlow 3.5s ease-in-out infinite alternate;
}
@keyframes titleGlow {
  0% { text-shadow: 0 0 10px rgba(0, 255, 157, 0.2); }
  100% { text-shadow: 0 0 14px rgba(0, 255, 157, 0.35); }
}
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 14px;
}
.overview-card {
  background: 
    linear-gradient(180deg, 
      rgba(6, 8, 16, 0.78), 
      rgba(4, 6, 12, 0.72));
  radial-gradient(circle at 15% 15%, 
      rgba(93, 64, 212, 0.07), 
      transparent 40%);
  border-radius: 16px;
  padding: 22px;
  text-align: center;
  border: 1px solid rgba(122, 92, 255, 0.12);
  transition: all var(--fast) var(--quantum);
  min-height: 112px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.28);
  transform: translateZ(0);
  will-change: transform, box-shadow;
  border-image: linear-gradient(to bottom, rgba(0, 255, 157, 0.1), transparent) 1;
}
.overview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--nebula-pink), var(--nebula-cyan), var(--nebula-green));
  opacity: 0;
  transition: opacity var(--fast);
}
.overview-card:hover {
  transform: translateY(-9px);
  border-color: var(--nebula-green);
  box-shadow: 
    0 28px 70px rgba(0, 255, 157, 0.15),
    0 0 34px rgba(0, 229, 255, 0.1);
  background: 
    linear-gradient(180deg, 
      rgba(8, 10, 18, 0.84), 
      rgba(6, 8, 14, 0.78)),
    radial-gradient(circle at 15% 15%, 
      rgba(93, 64, 212, 0.12), 
      transparent 40%);
}
.overview-card:hover::before {
  opacity: 1;
}
.card-icon {
  font-size: 2.0rem;
  margin-bottom: 12px;
  display: block;
  position: relative;
  animation: iconFloat 6s ease-in-out infinite;
}
@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.card-icon::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3.5px;
  background: linear-gradient(90deg, var(--nebula-pink), var(--nebula-green));
  border-radius: 1.75px;
  opacity: 0;
  transition: opacity var(--fast);
}
.overview-card:hover .card-icon::after {
  opacity: 1;
}
.card-title {
  color: var(--stellar-mute);
  font-weight: 800;
  margin-bottom: 10px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.card-value {
  font-weight: 900;
  color: var(--nebula-green);
  word-break: break-word;
  font-size: 1.15rem;
  line-height: 1.35;
  text-shadow: 0 0 7px rgba(0, 255, 157, 0.2);
  animation: valuePulse 3.5s ease-in-out infinite alternate;
  letter-spacing: 0.25px;
}
@keyframes valuePulse {
  0% { text-shadow: 0 0 6px rgba(0, 255, 157, 0.15); }
  100% { text-shadow: 0 0 9px rgba(0, 255, 157, 0.3); }
}
/* ========== TABS & CONTENT (Stellar Navigation) ========== */
.tabs-container {
  margin-top: 22px;
  background: 
    linear-gradient(180deg, 
      rgba(3, 5, 10, 0.94), 
      rgba(6, 8, 18, 0.88));
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(122, 92, 255, 0.08);
  z-index: 2;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transform: translateZ(0);
  will-change: transform;
}
.tabs-nav {
  display: flex;
  gap: 50px;
  overflow-x: auto;
  background: rgba(6, 8, 12, 0.94);
  border-bottom: 1px solid rgba(122, 92, 255, 0.06);
  min-height: 110px;
  align-items: center;
  justify-content: flex-start; /* تم تغييره من center إلى flex-start */
  margin: 0 auto;
  max-width: 95%;
  min-width: 0;
  flex-wrap: nowrap;
  scroll-behavior: smooth; /* إضافة سلوك تمرير ناعم */
}
.tabs-nav::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
.tabs-nav::-webkit-scrollbar-thumb {
  background: 
    linear-gradient(180deg, 
      rgba(93, 64, 212, 0.26), 
      rgba(0, 229, 255, 0.16),
      rgba(0, 255, 157, 0.12));
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
.tab-btn {
  flex: 0 1 auto;
  min-width: 250px;
  padding: 32px 48px;
  background: transparent;
  border: none;
  color: var(--stellar-white);
  cursor: pointer;
  font-weight: 800;
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  transition: all var(--fast) var(--quantum);
  white-space: nowrap;
  font-size: 1.2rem;
  position: relative;
  z-index: 2;
  border-radius: 24px;
  margin: 0 20px;
  box-shadow: 0 8px 30px rgba(93, 64, 212, 0.3);
  letter-spacing: 0.5px;
}
.tab-btn:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 15px 40px rgba(93, 64, 212, 0.4);
}
.tab-btn.active {
  transform: translateY(-5px) scale(1.04);
  box-shadow: 0 12px 35px rgba(0, 255, 157, 0.35);
}
.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 4px;
  background: linear-gradient(90deg, var(--nebula-pink), var(--nebula-cyan));
  border-radius: 2px;
  transition: transform var(--fast) var(--quantum);
  transform-origin: center;
}
.tab-btn:hover::after {
  transform: translateX(-50%) scaleX(1);
}
.tab-btn.active::after {
  transform: translateX(-50%) scaleX(1);
  background: var(--nebula-green);
}
.tab-content {
  display: none;
  padding: 25px;
  animation: fadeIn var(--fast) var(--stellar);
  min-height: 150px;
}
.tab-content.active {
  display: block;
}
@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(8px);
  }
  to { 
    opacity: 1; 
    transform: translateY(0);
  }
}
/* ========== INFO GRID (Stellar Cartography Data) ========== */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  align-items: start;
  padding: 0 24px;
}
.info-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px;
  border-radius: 16px;
  background: 
    linear-gradient(180deg, 
      rgba(7, 9, 16, 0.76), 
      rgba(4, 6, 12, 0.68));
  border: 1px solid rgba(122, 92, 255, 0.06);
  transition: all var(--fast) var(--quantum);
  min-height: 62px;
  line-height: 1.4;
  gap: 14px;
  word-break: break-word;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  margin-bottom: 15px;
}
.info-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to right, var(--nebula-green), transparent);
  opacity: 0;
  transition: opacity var(--fast);
}
.info-item:hover {
  transform: translateY(-7px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55);
  border-color: rgba(0, 255, 157, 0.08);
}
.info-item:hover::before {
  opacity: 1;
}
.info-label {
  font-weight: 600;
  color: var(--stellar-white);
  font-size: 0.98rem;
  max-width: 55%;
  word-break: break-word;
  line-height: 1.4;
}
.info-value {
  color: var(--nebula-cyan);
  font-weight: 700;
  max-width: 45%;
  text-align: left;
  direction: ltr;
  font-size: 1.05rem;
  word-break: break-word;
  white-space: normal;
  line-height: 1.4;
  text-shadow: 0 0 4px rgba(0, 229, 255, 0.15);
}
/* For long values (addresses/hash) allow overflow wrapping and monospace readability */
.info-value.mono {
  font-family: 'Fira Code', monospace;
  font-size: 0.95rem;
  word-break: break-all;
  white-space: normal;
}
/* status dot */
.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
  flex: 0 0 auto;
  box-shadow: 0 0 8px currentColor;
}
.status-success { background: var(--success); }
.status-warning { background: var(--warning); }
.status-error { background: var(--error); }
/* ========== TECHNOLOGY CARDS (Stellar Technology Matrix) ========== */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  align-items: start;
}
.tech-card {
  padding: 20px;
  border-radius: 16px;
  background: 
    linear-gradient(180deg, 
      rgba(6, 8, 18, 0.8), 
      rgba(4, 6, 14, 0.72));
  border: 1px solid rgba(122, 92, 255, 0.08);
  cursor: pointer;
  transition: all var(--fast) var(--quantum);
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
  overflow: visible;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  transform: translateZ(0);
  will-change: transform, box-shadow;
}
.tech-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--nebula-pink), var(--nebula-cyan));
  opacity: 0;
  transition: opacity var(--fast);
}
.tech-card:hover {
  transform: translateY(-9px);
  box-shadow: 0 30px 70px rgba(0, 200, 255, 0.08);
  border-color: var(--nebula-green);
}
.tech-card:hover::before {
  opacity: 1;
}
.tech-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--stellar-white);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
  word-break: break-word;
  text-shadow: 0 0 6px rgba(93, 64, 212, 0.2);
}
.tech-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.tech-version {
  color: var(--stellar-mute);
  font-weight: 600;
  white-space: normal;
  font-size: 0.95rem;
}
.tech-confidence {
  padding: 7px 12px;
  border-radius: 18px;
  font-weight: 700;
  background: rgba(0, 255, 157, 0.1);
  color: var(--nebula-green);
  min-width: 60px;
  text-align: center;
  flex: 0 0 auto;
  font-size: 0.95rem;
  box-shadow: 0 0 10px rgba(0, 255, 157, 0.15);
}
.confidence-bar {
  width: 100%;
  height: 14px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}
.confidence-fill {
  height: 100%;
  width: 10%;
  background: linear-gradient(90deg, var(--nebula-green), var(--nebula-cyan));
  box-shadow: 0 7px 22px rgba(0, 255, 157, 0.08) inset;
  transition: width var(--medium) var(--quantum);
  transform: translateZ(0);
  will-change: width;
}
/* expanded raw content should not overflow parent */
.tech-card-expanded {
  padding: 14px;
}
.tech-raw {
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  color: var(--stellar-white);
  background: rgba(2, 2, 6, 0.76);
  padding: 14px;
  border-radius: 10px;
  max-height: 380px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid rgba(122, 92, 255, 0.08);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
}
/* ========== JSON SECTION (Stellar Data Core) ========== */
.json-section {
  margin-top: 22px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(122, 92, 255, 0.06);
  background: 
    linear-gradient(180deg, 
      rgba(6, 8, 18, 0.88), 
      rgba(3, 4, 10, 0.86));
  z-index: 2;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.json-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid rgba(122, 92, 255, 0.06);
  gap: 14px;
}
.copy-btn {
  padding: 11px 16px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--nebula-core), var(--nebula-green));
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  transition: all var(--fast) var(--quantum);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.98rem;
  box-shadow: 0 6px 18px rgba(93, 64, 212, 0.25);
}
.copy-btn.copied {
  background: linear-gradient(135deg, var(--success), var(--nebula-cyan));
  transform: scale(1.03);
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.3);
}
.json-container {
  max-height: 560px;
  overflow: auto;
  background: rgba(2, 2, 6, 0.8);
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}
.json-content {
  white-space: pre-wrap;
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  color: var(--stellar-white);
  word-break: break-word;
  line-height: 1.5;
  letter-spacing: 0.2px;
}
/* ========== EVIDENCE ITEMS (Stellar Evidence Matrix) ========== */
.evidence-item {
  padding: 14px 18px;
  border-radius: 12px;
  background: 
    linear-gradient(180deg, 
      rgba(7, 9, 16, 0.72), 
      rgba(5, 7, 13, 0.66));
  border: 1px solid rgba(122, 92, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  word-break: break-all;
  transition: all var(--fast) var(--quantum);
}
.evidence-item.path {
  color: var(--stellar-white);
  font-weight: 800;
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  word-break: break-all;
  flex: 1;
}
.evidence-item.meta {
  color: var(--stellar-mute);
  font-size: 13px;
  white-space: nowrap;
  margin-left: 12px;
  min-width: 120px;
}
/* ========== FOOTER (Stellar Observatory) ========== */
footer {
  margin-top: 52px;
  text-align: center;
  padding: 32px;
  border-radius: 12px;
  border-top: 1px solid rgba(122, 92, 255, 0.06);
  background: 
    linear-gradient(180deg, 
      rgba(4, 6, 10, 0.76), 
      rgba(3, 4, 8, 0.72));
  color: var(--stellar-mute);
  position: relative;
  z-index: 2;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.3);
}
.creator-info {
  margin-bottom: 20px;
  text-align: center;
}
.creator-name {
  color: var(--nebula-green);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(0, 255, 157, 0.2);
  font-size: 1.3rem;
  display: block;
  margin: 12px auto;
}
.creator-blurb {
  font-size: 0.95rem;
  max-width: 600px;
  margin: 8px auto 0;
  line-height: 1.5;
  text-align: center;
}
.team-info {
  margin: 24px 0 16px;
  text-align: center;
}
.team-name {
  color: var(--nebula-cyan);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.2);
  font-size: 1.3rem;
  display: block;
  margin: 12px auto;
}
.social-links {
  margin: 16px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.social-link {
  display: inline-block;
  color: var(--nebula-cyan);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all var(--fast) var(--quantum);
  background: rgba(93, 64, 212, 0.06);
  border: 1px solid rgba(122, 92, 255, 0.1);
  font-weight: 500;
  max-width: 300px;
  width: 100%;
  text-align: center;
}
.social-link:hover {
  background: rgba(0, 255, 157, 0.08);
  color: var(--nebula-green);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 255, 157, 0.1);
}
.copyright-info {
  margin-top: 24px;
  font-size: 0.9rem;
  opacity: 0.85;
  text-align: center;
}
/* ========== SCROLLBAR POLISH (Stellar Navigation Track) ========== */
.json-container::-webkit-scrollbar, 
.modal::-webkit-scrollbar, 
.tech-raw::-webkit-scrollbar,
.tabs-nav::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
.json-container::-webkit-scrollbar-thumb, 
.modal::-webkit-scrollbar-thumb, 
.tech-raw::-webkit-scrollbar-thumb,
.tabs-nav::-webkit-scrollbar-thumb {
  background: 
    linear-gradient(180deg, 
      rgba(93, 64, 212, 0.26), 
      rgba(0, 229, 255, 0.16),
      rgba(0, 255, 157, 0.12));
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
.json-container::-webkit-scrollbar-track,
.tabs-nav::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
}
/* ========== FOCUS & ACCESSIBILITY (Stellar Navigation Focus) ========== */
:focus {
  outline: 3.5px solid rgba(0, 255, 157, 0.15);
  outline-offset: 2.5px;
  border-radius: 7px;
  box-shadow: 0 0 12px rgba(0, 255, 157, 0.25);
}
.tab-btn:focus, 
.scan-btn:focus, 
.copy-btn:focus {
  box-shadow: 
    0 7px 24px rgba(0, 255, 157, 0.08), 
    0 0 16px rgba(0, 255, 157, 0.2);
  transform: translateY(-2.5px);
}
/* ========== RESPONSIVE TWEAKS (Stellar Navigation Adaptation) ========== */
@media (max-width: 1280px) {
  .cosmic-container { padding: 32px; }
  .logo-glow { font-size: clamp(2.2rem, 6.6vw, 3.8rem); }
  .info-label { max-width: 54%; }
  .info-value { max-width: 46%; }
}
@media (max-width: 1024px) {
  .input-group { flex-direction: column; gap: 16px; }
  .tab-btn { min-width: 130px; padding: 12px 20px; flex: 1 0 45%; }
  .info-grid { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: 1fr; }
  .overview-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .scanner-interface { padding: 32px; }
}
@media (max-width: 768px) {
  .logo-glow { font-size: clamp(1.8rem, 7.2vw, 3.0rem); }
  .tagline { font-size: 1.05rem; }
  .scanner-interface { padding: 28px 24px; }
  .input-group { gap: 14px; }
  .url-input { padding: 16px 20px; font-size: 16px; }
  .scan-btn { padding: 14px 24px; min-width: 160px; }
  .loading-container { padding: 20px 16px; }
  .pulse-ring { width: 100px; height: 100px; }
  .info-item { flex-direction: column; align-items: flex-start; gap: 10px; }
  .info-label { max-width: 100%; }
  .info-value { max-width: 100%; text-align: left; }
  .overview-grid { grid-template-columns: 1fr; }
  .tab-btn { min-width: 120px; padding: 10px 16px; flex: 1 0 48%; }
  footer { padding: 26px; }
  /* Centered footer elements for mobile */
  .creator-info, .team-info, .social-links {
    text-align: center;
  }
  .social-links {
    flex-direction: column;
  }
}
@media (max-width: 480px) {
  .cosmic-container { padding: 24px 18px; }
  .logo-glow { font-size: clamp(1.6rem, 8.2vw, 2.6rem); letter-spacing: 2px; }
  .tagline { font-size: 0.95rem; }
  .scanner-interface { padding: 24px 20px; }
  .url-input { padding: 14px 18px; font-size: 15px; }
  .scan-btn { padding: 12px 20px; min-width: 140px; font-size: 0.95rem; }
  .loading-text { font-size: 1.15rem; }
  .loading-subtext { font-size: 0.95rem; }
  .pulse-ring { width: 90px; height: 90px; }
  .section-title { font-size: 1.35rem; }
  .card-value { font-size: 1.05rem; }
  .info-label { font-size: 0.92rem; }
  .info-value { font-size: 0.92rem; }
}
/* تحسينات للشاشات الكبيرة */
@media (min-width: 1600px) {
  .tabs-nav {
    gap: 55px;
    padding: 35px 55px;
  }
  .tab-btn {
    min-width: 260px;
    padding: 36px 52px;
    font-size: 1.25rem;
  }
}
/* تحسينات للشاشات المتوسطة */
@media (max-width: 1200px) {
  .tabs-nav {
    gap: 35px;
    padding: 25px 35px;
    min-height: 95px;
  }
  .tab-btn {
    min-width: 200px;
    padding: 26px 36px;
    margin: 0 12px;
    font-size: 1.15rem;
  }
}
/* تحسينات للشاشات الصغيرة */
@media (max-width: 1024px) {
  .tabs-nav {
    gap: 25px;
    padding: 20px 25px;
    min-height: 85px;
  }
  .tab-btn {
    min-width: 170px;
    padding: 22px 32px;
    margin: 0 10px;
    font-size: 1.1rem;
    gap: 18px;
    border-radius: 20px;
  }
}
@media (max-width: 768px) {
  .tabs-nav {
    gap: 20px;
    padding: 16px 20px;
    min-height: 80px;
  }
  .tab-btn {
    min-width: 150px;
    padding: 20px 28px;
    margin: 0 8px;
    font-size: 1.05rem;
    gap: 16px;
    border-radius: 20px;
  }
}
@media (max-width: 480px) {
  .tabs-nav {
    gap: 15px;
    padding: 14px 16px;
    min-height: 75px;
  }
  .tab-btn {
    min-width: 130px;
    padding: 18px 24px;
    margin: 0 6px;
    font-size: 1rem; 
    gap: 14px;
    border-radius: 18px;
  }
}
/* Touch-friendly elements for mobile */
@media (hover: none) and (pointer: coarse) {
  .tab-btn, .scan-btn, .copy-btn {
    min-height: 48px;
  }
  .url-input {
    font-size: 16px;
  }
}
/* ========== REDUCED MOTION (Stellar Navigation Comfort) ========== */
@media (prefers-reduced-motion: reduce) {
  * { 
    animation-duration: 0.01ms!important;
    animation-iteration-count: 1!important; 
    transition-duration: 0.01ms!important; 
  }
  #starfield, #nebula-clouds, #cosmic-particles, #event-horizon, #gravitational-lensing {
    display: none!important;
  }
  .btn-icon, .pulse-ring {
    animation: none!important;
  }
}
/* ========== PRINT (Stellar Data Archive) ========== */
@media print {
  body { 
    background: #fff;
    color: #000; 
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #starfield, #nebula-clouds, #cosmic-particles, 
  #event-horizon, #gravitational-lensing, 
  .scanner-interface::after { 
    display: none!important;
  }
  .scanner-interface {
    box-shadow: none!important;
    border: 1px solid #ccc!important;
  }
  .tech-raw, .json-content {
    background: #f8f8f8!important;
    color: #333!important;
  }
  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}