/* ==============================================================================
   Soul Engine — Dual Theme System & Brand Color Architecture
   Engineered by Navigo Tech Solutions
   ============================================================================== */

:root {
  /* Daylight Palette (Light Mode) */
  --bg-canvas: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #ffffff;
  --border-subtle: #e2e8f0;
  --border-active: #cbd5e1;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --brand-emerald: #059669;
  --brand-teal: #0d9488;
  --brand-cyan: #0891b2;
  --brand-amber: #d97706;
  --brand-rose: #e11d48;
  --radar-bg: #f1f5f9;
  --radar-line: rgba(15, 23, 42, 0.08);
}

html.dark {
  /* Obsidian Night Palette (Dark Mode) */
  --bg-canvas: #090d14;
  --bg-card: #0f1523;
  --bg-card-hover: #151c2e;
  --bg-input: #090d14;
  --border-subtle: #1f2942;
  --border-active: #2d3a58;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --brand-emerald: #10b981;
  --brand-teal: #14b8a6;
  --brand-cyan: #06b6d4;
  --brand-amber: #f59e0b;
  --brand-rose: #f43f5e;
  --radar-bg: #090d14;
  --radar-line: rgba(255, 255, 255, 0.06);
}

/* Base Body Transition & Canvas Gradient */
body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(16, 185, 129, 0.08), transparent 70%),
    radial-gradient(ellipse 60% 40% at 85% 100%, rgba(6, 182, 212, 0.06), transparent 60%);
  background-attachment: fixed;
}

html.dark body {
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(16, 185, 129, 0.12), transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(6, 182, 212, 0.08), transparent 60%);
}

/* Smooth transitions for theme toggle */
.theme-transition {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

/* Brand Glyph Glow */
.brand-glow {
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.35);
}

.brand-glow-cyan {
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.35);
}

/* Ambient Glass Panel */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
}

.glass-panel:hover {
  border-color: rgba(16, 185, 129, 0.3);
}

/* Interactive Pill Preset */
.preset-pill {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.preset-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(16, 185, 129, 0.5);
}

/* Coordinate Radar Grid */
.radar-grid {
  background-color: var(--radar-bg);
  background-image: 
    linear-gradient(to right, var(--radar-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--radar-line) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Pulse Target Animation */
@keyframes pulseGlow {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
    box-shadow: 0 0 22px rgba(16, 185, 129, 0.85);
  }
}

.radar-target-dot {
  animation: pulseGlow 2.4s infinite ease-in-out;
}

/* Shimmer Border */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer-border {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.2) 0%, rgba(6, 182, 212, 0.5) 50%, rgba(16, 185, 129, 0.2) 100%);
  background-size: 200% 100%;
  animation: shimmer 6s infinite linear;
}

/* Color Swatch Card */
.swatch-card {
  transition: all 0.25s ease;
}
.swatch-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-canvas);
}
::-webkit-scrollbar-thumb {
  background: var(--border-active);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-emerald);
}

/* IDE Editor Gutter & Line Numbers */
.ide-editor-container {
  position: relative;
  display: flex;
}

.ide-line-numbers {
  user-select: none;
  text-align: right;
  padding: 0.75rem 0.5rem 0.75rem 0.75rem;
  color: #64748b;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8125rem;
  line-height: 1.625;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

html:not(.dark) .ide-line-numbers {
  color: #94a3b8;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

/* Pulse Heartbeat Node */
.pulse-heartbeat {
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: heartbeat 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes heartbeat {
  to {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
}

/* Slop Tag Pill Hover */
.slop-tag {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.slop-tag:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
}

/* High-Trust Editorial Elevation */
.editorial-card {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.editorial-card:hover {
  box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.08);
}

html.dark .editorial-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.5);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  max-width: 90vw;
  width: 22rem;
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.875rem;
  font-size: 0.8125rem;
  line-height: 1.25rem;
  font-weight: 500;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: translateY(1rem);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-item.toast-show {
  transform: translateY(0);
  opacity: 1;
}

.toast-item.toast-hide {
  transform: translateY(0.5rem) scale(0.95);
  opacity: 0;
}

.toast-success {
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

html:not(.dark) .toast-success {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.toast-error {
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

html:not(.dark) .toast-error {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

/* Code Snippet Box with Copy Button */
.code-box-wrapper {
  position: relative;
  group: true;
}

.code-copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  opacity: 0.75;
  transition: all 0.2s ease;
}

.code-box-wrapper:hover .code-copy-btn {
  opacity: 1;
}

/* Interactive Russell Radar Cursor */
.radar-interactive {
  cursor: crosshair;
}

/* Mobile Nav Drawer */
.mobile-nav-pill {
  transition: all 0.2s ease;
}
.mobile-nav-pill.active {
  background-color: rgba(16, 185, 129, 0.15);
  color: #10b981;
  font-weight: 700;
}

/* ==============================================================================
   The Psychological Aura Orb (Fluid Emotional Visualizer)
   ============================================================================== */
.aura-orb-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.aura-canvas {
  filter: drop-shadow(0 0 28px rgba(16, 185, 129, 0.35));
  transition: filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  cursor: pointer;
}

.aura-canvas:hover {
  transform: scale(1.03);
  filter: drop-shadow(0 0 40px rgba(16, 185, 129, 0.55));
}

.aura-halo-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: haloBreath 4s infinite ease-in-out;
}

@keyframes haloBreath {
  0%, 100% {
    transform: scale(0.95);
    opacity: 0.35;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.7;
  }
}

.orb-state-badge {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==============================================================================
   Community Ratings & Interactive Star System ("Rate Soul")
   ============================================================================== */
.star-rating-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.star-btn {
  background: transparent;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.15s ease, filter 0.15s ease;
  user-select: none;
  padding: 0.25rem;
}

.star-btn:hover {
  transform: scale(1.28);
}

.star-btn.star-active {
  color: #f59e0b;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.55));
}

.star-btn.star-hover {
  color: #fbbf24;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.65));
}

.review-card {
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.review-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.review-stars {
  color: #f59e0b;
  letter-spacing: 2px;
}

