/* ===== Reset + Variables ===== */
:root {
  --bg: #07080d;
  --bg2: #10131c;
  --card-bg: rgba(20, 26, 40, 0.62);
  --card-border: rgba(255, 255, 255, 0.07);
  --line: #1d2331;
  --text: #ecebe6;
  --muted: #8b90a0;
  --gold: #d4a94e;
  --gold-bright: #ecc66a;
  --gold-dim: #a8843a;
  --gold-glow: rgba(212, 169, 78, 0.15);
  --urantia: #7c9cff;
  --urantia-glow: rgba(124, 156, 255, 0.14);
  --bible: #7bd88f;
  --bible-glow: rgba(123, 216, 143, 0.14);
  --quran: #e0b366;
  --quran-glow: rgba(224, 179, 102, 0.14);
  --radius: 16px;
  --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --max-w: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  /* Космические туманности: глубокое небо + цветные облака */
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -18%, rgba(212, 169, 78, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 55% 45% at 12% 85%, rgba(96, 120, 220, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 45% 40% at 88% 72%, rgba(150, 90, 200, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse 35% 30% at 70% 30%, rgba(224, 179, 102, 0.04) 0%, transparent 50%),
    radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1.4px);
  background-size: auto, auto, auto, auto, 3px 3px;
  background-attachment: fixed, fixed, fixed, fixed, scroll;
}

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; width: 100%; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: #e0c070; }

/* ===== Canvas космоса: позади всего контента ===== */
#space {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== Туманность: AI-фон с параллаксом и оверлеем ===== */
#nebula {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url('../assets/nebula.jpg');
  background-size: cover;
  background-position: center;
}
/* оверлей: края затемняются, центр читаемый (один слой) */
#nebula::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 70% at 50% 36%, rgba(5, 6, 10, 0.08) 0%, rgba(5, 6, 10, 0.62) 72%, rgba(5, 6, 10, 0.93) 100%);
}

/* Контент поверх канваса */
body > main, body > footer, .topbar, .tabs-nav { position: relative; z-index: 1; }
