/* ═══════════════════════════════════════════════════════════
   LYDIA INTERACTIVE EXPERIENCE — main.css
   Design tokens, resets, globals, RTL foundation
═══════════════════════════════════════════════════════════ */

/* ── Google Fonts (fallback if offline) ─────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&family=Outfit:wght@300;400;600;700;900&display=swap');

/* ── Design Tokens ──────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-base:         #07060f;
  --bg-deep:         #0d0b1a;
  --bg-card:         rgba(255, 255, 255, 0.045);
  --bg-card-hover:   rgba(255, 255, 255, 0.07);
  --bg-card-border:  rgba(255, 255, 255, 0.09);
  --bg-option:       rgba(255, 255, 255, 0.05);
  --bg-option-hover: rgba(255, 45, 120, 0.12);

  /* Accent Colors */
  --pink:         #ff2d78;
  --pink-light:   #ff6fa0;
  --pink-dark:    #cc1a5c;
  --purple:       #a855f7;
  --purple-light: #c084fc;
  --purple-dark:  #7c3aed;
  --cyan:         #00f0ff;
  --cyan-dim:     rgba(0, 240, 255, 0.6);

  /* Text */
  --text-primary:  #f0e6ff;
  --text-secondary: #c4b5e0;
  --text-muted:    #8a7fa0;
  --text-dim:      #4e4460;
  --text-accent:   #ff2d78;

  /* Glow Effects */
  --glow-pink:   0 0 20px rgba(255, 45, 120, 0.55), 0 0 50px rgba(255, 45, 120, 0.2);
  --glow-purple: 0 0 20px rgba(168, 85, 247, 0.5), 0 0 50px rgba(168, 85, 247, 0.15);
  --glow-cyan:   0 0 20px rgba(0, 240, 255, 0.45), 0 0 50px rgba(0, 240, 255, 0.15);
  --glow-card:   0 8px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06);

  /* Borders */
  --border-glass: 1px solid rgba(255, 255, 255, 0.09);
  --border-pink:  1px solid rgba(255, 45, 120, 0.35);
  --border-purple: 1px solid rgba(168, 85, 247, 0.35);

  /* Sizing */
  --radius-sm:   12px;
  --radius-md:   20px;
  --radius-lg:   28px;
  --radius-xl:   40px;
  --radius-full: 9999px;
  --card-max-w:  440px;

  /* Spacing */
  --gap-xs: 8px;
  --gap-sm: 16px;
  --gap-md: 24px;
  --gap-lg: 36px;
  --gap-xl: 52px;

  /* Typography */
  --font-arabic: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  --font-accent: 'Outfit', monospace;

  /* Font sizes */
  --fs-xs:  0.75rem;
  --fs-sm:  0.875rem;
  --fs-md:  1rem;
  --fs-lg:  1.25rem;
  --fs-xl:  1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.75rem;

  /* Transitions */
  --t-fast:   150ms ease;
  --t-normal: 350ms ease;
  --t-slow:   600ms cubic-bezier(0.16, 1, 0.3, 1);
  --t-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* ── HTML & Body ────────────────────────────────────────── */
html {
  direction: rtl;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-arabic);
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Particles Canvas ───────────────────────────────────── */
#particles-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

/* ── Ambient Background Orbs ────────────────────────────── */
.ambient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
  animation: ambientFloat 12s ease-in-out infinite;
}

.ambient-orb--1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--pink), transparent 70%);
  top: -150px;
  right: -150px;
  animation-delay: 0s;
}

.ambient-orb--2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--purple), transparent 70%);
  bottom: -100px;
  left: -100px;
  animation-delay: -4s;
}

.ambient-orb--3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--cyan), transparent 70%);
  top: 50%;
  left: 60%;
  transform: translate(-50%, -50%);
  animation-delay: -8s;
  opacity: 0.1;
}

@keyframes ambientFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -20px) scale(1.05); }
  66%       { transform: translate(-20px, 30px) scale(0.95); }
}

/* ── Glass Card ─────────────────────────────────────────── */
.glass-card {
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: var(--glow-card);
  position: relative;
  overflow: hidden;
}

/* Subtle shimmer on glass card top edge */
.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  pointer-events: none;
}

/* ── Screen Base ────────────────────────────────────────── */
.screen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gap-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-normal);
}

.screen--active {
  opacity: 1;
  pointer-events: all;
}

.screen__content {
  width: 100%;
  max-width: var(--card-max-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-md);
  position: relative;
  z-index: 2;
}

/* ── Typography Helpers ─────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-arabic);
  line-height: 1.35;
}

.accent {
  color: var(--pink);
  font-weight: 700;
}

/* ── Scrollbar (hidden) ─────────────────────────────────── */
::-webkit-scrollbar { display: none; }

/* ── Focus visible ──────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Selection ──────────────────────────────────────────── */
::selection {
  background: rgba(255, 45, 120, 0.25);
  color: var(--text-primary);
}

/* ── Utility ─────────────────────────────────────────────── */
.u-hidden { display: none !important; }
.u-invisible { visibility: hidden; opacity: 0; pointer-events: none; }
