:root {
  --bg-main: #050509;
  --bg-secondary: #070717;
  --accent: #8a5cff;
  --accent-soft: rgba(138, 92, 255, 0.3);
  --text-main: #f5f5f5;
  --text-soft: #b0a9d9;
  --danger: #ff4b81;
  --noise-opacity: 0.12;
  --transition-fast: 0.3s ease;
  --transition-med: 0.6s ease;
  --transition-slow: 1.5s ease;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
}

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

html,
body {
  width: 100%;
  height: 100%;
  background: #000;
  color: var(--text-main);
  font-family: var(--font-main);
}

body {
  overflow: hidden;
}

#gateway {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at top, #151531 0, #050509 40%, #000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ضوضاء خفيفة جدا في الخلفية */
.bg-noise {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='noStitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

/* الخط اللي في النص */
.center-line {
  position: absolute;
  width: 60%;
  max-width: 520px;
  height: 2px;
  background: linear-gradient(
    to right,
    transparent,
    var(--accent-soft),
    var(--accent),
    var(--accent-soft),
    transparent
  );
  box-shadow: 0 0 18px rgba(138, 92, 255, 0.8);
  animation: line-pulse 3.2s ease-in-out infinite;
}

@keyframes line-pulse {
  0% {
    opacity: 0.1;
    transform: scaleX(0.8);
  }
  40% {
    opacity: 0.9;
    transform: scaleX(1);
  }
  100% {
    opacity: 0.2;
    transform: scaleX(0.85);
  }
}

/* النص الصغير تحت الخط */
.status-text {
  position: absolute;
  top: 55%;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
  opacity: 0.7;
}

/* زرار ENTER */
.enter-btn {
  position: absolute;
  top: 62%;
  padding: 0.6rem 1.6rem;
  border-radius: 999px;
  border: 1px solid rgba(138, 92, 255, 0.6);
  background: rgba(5, 5, 9, 0.9);
  color: var(--text-main);
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(18px);
  box-shadow: 0 0 25px rgba(138, 92, 255, 0.25);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    opacity var(--transition-fast);
}

.enter-btn:hover {
  transform: translateY(-1px) scale(1.02);
  background: rgba(17, 12, 36, 0.98);
  box-shadow: 0 0 38px rgba(138, 92, 255, 0.45);
}

.enter-btn:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 0 15px rgba(138, 92, 255, 0.25);
}

/* seal — الرمز اللي في النص */
.seal {
  position: absolute;
  width: 180px;
  height: 180px;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity var(--transition-med),
    transform var(--transition-med);
}

.seal-circle {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(138, 92, 255, 0.55);
  box-shadow: 0 0 25px rgba(138, 92, 255, 0.4);
}

.seal-cross {
  position: absolute;
  inset: 0;
}
.seal-cross::before,
.seal-cross::after {
  content: "";
  position: absolute;
  background: rgba(138, 92, 255, 0.5);
  border-radius: 999px;
}
.seal-cross::before {
  width: 1px;
  height: 80%;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
}
.seal-cross::after {
  height: 1px;
  width: 80%;
  left: 10%;
  top: 50%;
  transform: translateY(-50%);
}

/* dots حوالين الدائرة */
.seal-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(138, 92, 255, 0.9);
  transform-origin: center;
}

.dot-1 {
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
}
.dot-2 {
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
}
.dot-3 {
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
}
.dot-4 {
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
}

/* universe layer */
.universe {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, #151531 0, #050509 40%, #000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

.universe-inner {
  text-align: center;
  max-width: 520px;
  padding: 1.8rem;
}

.universe-title {
  font-size: 1.4rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: #f7f3ff;
}

.universe-sub {
  font-size: 0.9rem;
  color: var(--text-soft);
  margin-bottom: 2rem;
}

.universe-paths {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}

.path-btn {
  border-radius: 999px;
  border: 1px solid rgba(138, 92, 255, 0.6);
  background: rgba(6, 5, 16, 0.95);
  color: var(--text-main);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.path-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(138, 92, 255, 0.55);
  background: rgba(22, 15, 48, 0.98);
}

.universe-note {
  font-size: 0.8rem;
  color: var(--text-soft);
  opacity: 0.7;
}

/* overlay بتاع "entering foxmind layer" */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 3, 8, 0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-med);
}

.loading-line {
  width: 50%;
  max-width: 420px;
  height: 2px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(138, 92, 255, 0.2),
    var(--accent),
    rgba(138, 92, 255, 0.2),
    transparent
  );
  animation: loading-scan 2.5s ease-in-out infinite;
}

@keyframes loading-scan {
  0% {
    transform: scaleX(0.4);
    opacity: 0.2;
  }
  40% {
    transform: scaleX(1);
    opacity: 1;
  }
  100% {
    transform: scaleX(0.5);
    opacity: 0.3;
  }
}

.loading-text {
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
}

/* helper classes */
.hidden {
  display: none;
}

.show-flex {
  display: flex !important;
}

.show-block {
  display: block !important;
}

.fade-in {
  opacity: 1 !important;
}

@media (max-width: 600px) {
  .center-line {
    width: 80%;
  }

  .status-text {
    font-size: 0.7rem;
  }

  .enter-btn {
    font-size: 0.78rem;
  }

  .universe-inner {
    padding: 1.2rem;
  }

  .universe-title {
    font-size: 1.1rem;
    letter-spacing: 0.22em;
  }

  .universe-sub {
    font-size: 0.78rem;
  }

  .path-btn {
    padding: 0.5rem 1rem;
    font-size: 0.72rem;
  }
}
