/* ========================================
   Mystic Oracle - Design System
   Style: Warm Cream + Spiritual Crimson/Gold
   ======================================== */

:root {
  /* === Core Colors === */
  --bg-deep: #F5F0E8;
  --bg-base: #F5F0E8;
  --bg-elevated: #EDE8DF;
  --bg-surface: #E5E0D6;
  --bg-card: rgba(0, 0, 0, 0.03);
  --bg-card-hover: rgba(0, 0, 0, 0.06);

  /* === Text === */
  --text-primary: #3D1515;
  --text-secondary: #5C2828;
  --text-muted: #7A4530;
  --text-accent: #9F1239;

  /* === Brand Colors === */
  --purple-primary: #7C3AED;
  --purple-light: #A78BFA;
  --purple-dark: #5B21B6;
  --purple-glow: rgba(124, 58, 237, 0.25);
  --gold-primary: #A16207;
  --gold-light: #D4A017;
  --gold-glow: rgba(212, 160, 23, 0.2);
  --red-accent: #DC2626;

  /* === Semantic === */
  --accent: #7C3AED;
  --accent-hover: #8B5CF6;
  --accent-glow: rgba(124, 58, 237, 0.3);
  --gold: #D4A017;
  --gold-hover: #E5B02A;
  --success: #22C55E;
  --warning: #F59E0B;
  --error: #EF4444;

  /* === Borders === */
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-default: rgba(0, 0, 0, 0.12);
  --border-accent: rgba(124, 58, 237, 0.3);

  /* === Spacing (8dp rhythm) === */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 96px;

  /* === Typography === */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-display: 'Inter', var(--font-sans);
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* === Radius === */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* === Shadows === */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 40px var(--accent-glow);
  --shadow-gold-glow: 0 0 40px var(--gold-glow);

  /* === Transitions === */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* === Z-index === */
  --z-base: 0;
  --z-above: 10;
  --z-sticky: 100;
  --z-overlay: 1000;
  --z-modal: 10000;
}

/* === Animations === */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
  50% { box-shadow: 0 0 40px var(--accent-glow), 0 0 80px rgba(124, 58, 237, 0.1); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes blob-move {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -50px) scale(1.1); }
  50% { transform: translate(-20px, 20px) scale(0.9); }
  75% { transform: translate(20px, 40px) scale(1.05); }
}

/* === Utility Classes === */
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-pulse-glow { animation: pulse-glow 3s ease-in-out infinite; }
.animate-shimmer { animation: shimmer 2s linear infinite; }
.animate-rotate-slow { animation: rotate-slow 20s linear infinite; }
.animate-fade-in-up { animation: fade-in-up 0.6s var(--ease-out) forwards; }
.animate-slide-in-right { animation: slide-in-right 0.6s var(--ease-out) forwards; }

.glass {
  background: rgba(0, 0, 0, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
}

.glass-hover:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: var(--border-default);
}

.gradient-text-purple {
  background: linear-gradient(135deg, #A78BFA 0%, #7C3AED 50%, #C4B5FD 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-gold {
  background: linear-gradient(135deg, #D4A017 0%, #A16207 50%, #E5B02A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-border {
  position: relative;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--purple-primary), var(--gold-light));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: #9F1239; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #881337; }

/* Selection */
::selection { background: rgba(159, 18, 57, 0.2); color: #1A0808; }
