/* =========================================================
   YOTOST — AI-Themed Toast Notification Library
   Core Styles + 10 Themes + Animations + 7 Extended Types
   ========================================================= */

/* ---------- CSS Custom Properties (Theme Variables) ---------- */

:root {
  --yto-bg: rgba(15, 15, 30, 0.92);
  --yto-border: 1px solid rgba(100, 140, 255, 0.35);
  --yto-shadow: 0 8px 32px rgba(80, 120, 255, 0.25);
  --yto-text: #e0e8ff;
  --yto-text-secondary: rgba(200, 210, 255, 0.7);
  --yto-accent: #6c8cff;
  --yto-accent-glow: 0 0 12px rgba(108, 140, 255, 0.4);
  --yto-progress-bg: rgba(108, 140, 255, 0.3);
  --yto-progress-fill: #6c8cff;
  --yto-icon-color: var(--yto-accent);
  --yto-backdrop: rgba(0, 0, 0, 0.3);
  --yto-border-radius: 12px;
  --yto-font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --yto-animation-duration: 0.4s;
  --yto-blur: blur(12px);
}

/* ---------- Themes ---------- */
[data-yto-theme="cyberpunk"] {
  --yto-bg: rgba(10, 0, 25, 0.95);
  --yto-border: 1px solid #ff00ff;
  --yto-shadow: 0 0 30px rgba(255, 0, 255, 0.4), 0 0 60px rgba(0, 255, 255, 0.15);
  --yto-text: #f0e0ff;
  --yto-text-secondary: rgba(255, 100, 255, 0.7);
  --yto-accent: #ff44ff;
  --yto-accent-glow: 0 0 15px #ff44ff;
  --yto-progress-bg: rgba(255, 68, 255, 0.3);
  --yto-progress-fill: #ff44ff;
  --yto-icon-color: #ff44ff;
  --yto-backdrop: rgba(255, 0, 255, 0.08);
  --yto-border-radius: 4px;
  --yto-blur: blur(8px);
}
[data-yto-theme="matrix"] {
  --yto-bg: rgba(0, 10, 0, 0.93);
  --yto-border: 1px solid #00ff41;
  --yto-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
  --yto-text: #b2ffba;
  --yto-text-secondary: rgba(0, 200, 50, 0.7);
  --yto-accent: #00ff41;
  --yto-accent-glow: 0 0 10px #00ff41;
  --yto-progress-bg: rgba(0, 255, 65, 0.2);
  --yto-progress-fill: #00ff41;
  --yto-icon-color: #00ff41;
  --yto-border-radius: 2px;
  --yto-blur: blur(5px);
  --yto-font-family: 'Courier New', monospace;
}
[data-yto-theme="quantum"] {
  --yto-bg: rgba(5, 0, 20, 0.92);
  --yto-border: 1px solid rgba(0, 200, 255, 0.5);
  --yto-shadow: 0 0 40px rgba(0, 180, 255, 0.2), 0 0 80px rgba(100, 0, 255, 0.1);
  --yto-text: #d0eeff;
  --yto-text-secondary: rgba(0, 200, 255, 0.6);
  --yto-accent: linear-gradient(135deg, #00c8ff, #8c00ff);
  --yto-progress-bg: rgba(0, 200, 255, 0.2);
  --yto-progress-fill: linear-gradient(90deg, #00c8ff, #8c00ff);
  --yto-icon-color: #00c8ff;
  --yto-backdrop: rgba(0, 180, 255, 0.05);
  --yto-border-radius: 16px;
  --yto-blur: blur(16px);
}
[data-yto-theme="aurora"] {
  --yto-bg: rgba(10, 12, 30, 0.9);
  --yto-border: 1px solid rgba(0, 255, 180, 0.4);
  --yto-shadow: 0 0 40px rgba(0, 255, 150, 0.2);
  --yto-text: #d0ffee;
  --yto-text-secondary: rgba(0, 220, 150, 0.6);
  --yto-accent: #00ffb0;
  --yto-accent-glow: 0 0 20px rgba(0, 255, 176, 0.3);
  --yto-progress-bg: rgba(0, 255, 180, 0.2);
  --yto-progress-fill: linear-gradient(90deg, #00ffb0, #7c6cff);
  --yto-icon-color: #00ffb0;
  --yto-border-radius: 18px;
  --yto-blur: blur(14px);
}
[data-yto-theme="hologram"] {
  --yto-bg: rgba(0, 20, 40, 0.85);
  --yto-border: 1px solid rgba(100, 200, 255, 0.25);
  --yto-shadow: 0 4px 30px rgba(100, 200, 255, 0.12);
  --yto-text: #c0e8ff;
  --yto-text-secondary: rgba(150, 210, 255, 0.5);
  --yto-accent: #64c8ff;
  --yto-accent-glow: 0 0 8px rgba(100, 200, 255, 0.25);
  --yto-progress-bg: rgba(100, 200, 255, 0.15);
  --yto-progress-fill: #64c8ff;
  --yto-icon-color: #64c8ff;
  --yto-backdrop: rgba(100, 200, 255, 0.04);
  --yto-border-radius: 8px;
  --yto-blur: blur(10px);
}
[data-yto-theme="deep-mind"] {
  --yto-bg: rgba(8, 8, 20, 0.94);
  --yto-border: 1px solid rgba(150, 120, 255, 0.3);
  --yto-shadow: 0 8px 40px rgba(100, 80, 200, 0.2);
  --yto-text: #ccccee;
  --yto-text-secondary: rgba(160, 140, 220, 0.6);
  --yto-accent: #9678ff;
  --yto-accent-glow: 0 0 15px rgba(150, 120, 255, 0.3);
  --yto-progress-bg: rgba(150, 120, 255, 0.2);
  --yto-progress-fill: linear-gradient(90deg, #9678ff, #c860ff);
  --yto-icon-color: #9678ff;
  --yto-border-radius: 14px;
  --yto-blur: blur(14px);
  --yto-font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}
[data-yto-theme="digital"] {
  --yto-bg: rgba(0, 5, 15, 0.95);
  --yto-border: 2px solid rgba(0, 255, 200, 0.5);
  --yto-shadow: 0 0 0 1px rgba(0, 255, 200, 0.1), 0 4px 20px rgba(0, 255, 200, 0.2);
  --yto-text: #b0f0e0;
  --yto-text-secondary: rgba(0, 200, 180, 0.6);
  --yto-accent: #00ffc8;
  --yto-accent-glow: 0 0 6px #00ffc8;
  --yto-progress-bg: rgba(0, 255, 200, 0.15);
  --yto-progress-fill: #00ffc8;
  --yto-icon-color: #00ffc8;
  --yto-border-radius: 0px;
  --yto-blur: blur(4px);
  --yto-font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
[data-yto-theme="void"] {
  --yto-bg: rgba(0, 0, 0, 0.96);
  --yto-border: 1px solid rgba(255, 255, 255, 0.08);
  --yto-shadow: 0 8px 60px rgba(0, 0, 0, 0.8);
  --yto-text: #ffffff;
  --yto-text-secondary: rgba(255, 255, 255, 0.4);
  --yto-accent: #ffffff;
  --yto-accent-glow: 0 0 8px rgba(255, 255, 255, 0.15);
  --yto-progress-bg: rgba(255, 255, 255, 0.08);
  --yto-progress-fill: #ffffff;
  --yto-icon-color: #ffffff;
  --yto-backdrop: rgba(255, 255, 255, 0.02);
  --yto-border-radius: 0px;
  --yto-blur: blur(20px);
}
[data-yto-theme="synthetic"] {
  --yto-bg: rgba(30, 20, 40, 0.9);
  --yto-border: 1px solid rgba(255, 160, 60, 0.35);
  --yto-shadow: 0 8px 32px rgba(255, 120, 0, 0.15);
  --yto-text: #ffe8d0;
  --yto-text-secondary: rgba(255, 180, 100, 0.6);
  --yto-accent: #ffa030;
  --yto-accent-glow: 0 0 15px rgba(255, 160, 48, 0.25);
  --yto-progress-bg: rgba(255, 160, 60, 0.2);
  --yto-progress-fill: linear-gradient(90deg, #ffa030, #ff5cc8);
  --yto-icon-color: #ffa030;
  --yto-backdrop: rgba(255, 160, 60, 0.06);
  --yto-border-radius: 20px;
  --yto-blur: blur(10px);
}

/* =========================================================
   LIGHT MODE — overrides via [data-yto-mode="light"]
   Auto-activated by JS via matchMedia when mode="auto"
   ========================================================= */

/* Default light (explicit — works regardless of OS) */
[data-yto-mode="light"] {
  --yto-bg: rgba(245, 248, 255, 0.92);
  --yto-border: 1px solid rgba(100, 140, 255, 0.25);
  --yto-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --yto-text: #1a1a2e;
  --yto-text-secondary: rgba(60, 60, 100, 0.65);
  --yto-accent: #5b7cfa;
  --yto-accent-glow: 0 0 8px rgba(91, 124, 250, 0.2);
  --yto-progress-bg: rgba(91, 124, 250, 0.15);
  --yto-progress-fill: #5b7cfa;
  --yto-icon-color: #5b7cfa;
  --yto-backdrop: rgba(255, 255, 255, 0.4);
  --yto-blur: blur(16px);
}
[data-yto-mode="light"][data-yto-theme="cyberpunk"] {
  --yto-bg: rgba(255, 240, 255, 0.95);
  --yto-border: 1px solid #d633d6;
  --yto-shadow: 0 4px 20px rgba(214, 51, 214, 0.12);
  --yto-text: #2d0a3e;
  --yto-text-secondary: rgba(150, 40, 150, 0.6);
  --yto-accent: #d633d6;
  --yto-accent-glow: 0 0 8px rgba(214, 51, 214, 0.2);
  --yto-progress-bg: rgba(214, 51, 214, 0.15);
  --yto-progress-fill: #d633d6;
  --yto-icon-color: #d633d6;
  --yto-backdrop: rgba(240, 220, 255, 0.3);
}
[data-yto-mode="light"][data-yto-theme="matrix"] {
  --yto-bg: rgba(235, 255, 235, 0.95);
  --yto-border: 1px solid #1a9e3a;
  --yto-shadow: 0 4px 16px rgba(26, 158, 58, 0.1);
  --yto-text: #0a2e0a;
  --yto-text-secondary: rgba(30, 120, 40, 0.6);
  --yto-accent: #1a9e3a;
  --yto-accent-glow: 0 0 6px rgba(26, 158, 58, 0.2);
  --yto-progress-bg: rgba(26, 158, 58, 0.12);
  --yto-progress-fill: #1a9e3a;
  --yto-icon-color: #1a9e3a;
  --yto-font-family: 'Courier New', monospace;
}
[data-yto-mode="light"][data-yto-theme="quantum"] {
  --yto-bg: rgba(235, 245, 255, 0.95);
  --yto-border: 1px solid rgba(0, 150, 220, 0.4);
  --yto-shadow: 0 4px 24px rgba(0, 120, 200, 0.1);
  --yto-text: #0a1a2e;
  --yto-text-secondary: rgba(0, 120, 180, 0.55);
  --yto-accent: #0096dc;
  --yto-progress-fill: linear-gradient(90deg, #0096dc, #7b2dcf);
  --yto-icon-color: #0096dc;
  --yto-backdrop: rgba(200, 230, 255, 0.3);
}
[data-yto-mode="light"][data-yto-theme="aurora"] {
  --yto-bg: rgba(235, 255, 248, 0.94);
  --yto-border: 1px solid rgba(0, 200, 140, 0.3);
  --yto-shadow: 0 4px 20px rgba(0, 160, 100, 0.08);
  --yto-text: #0a2e20;
  --yto-text-secondary: rgba(0, 160, 100, 0.5);
  --yto-accent: #00c87a;
  --yto-progress-fill: linear-gradient(90deg, #00c87a, #6b5bfa);
  --yto-icon-color: #00c87a;
  --yto-backdrop: rgba(200, 255, 230, 0.25);
}
[data-yto-mode="light"][data-yto-theme="hologram"] {
  --yto-bg: rgba(235, 248, 255, 0.92);
  --yto-border: 1px solid rgba(50, 170, 230, 0.2);
  --yto-shadow: 0 4px 16px rgba(50, 150, 200, 0.06);
  --yto-text: #0a2030;
  --yto-text-secondary: rgba(50, 150, 200, 0.5);
  --yto-accent: #3aa8e0;
  --yto-icon-color: #3aa8e0;
  --yto-backdrop: rgba(210, 240, 255, 0.2);
}
[data-yto-mode="light"][data-yto-theme="deep-mind"] {
  --yto-bg: rgba(240, 238, 255, 0.94);
  --yto-border: 1px solid rgba(120, 100, 220, 0.25);
  --yto-shadow: 0 4px 20px rgba(100, 80, 200, 0.08);
  --yto-text: #1a1030;
  --yto-text-secondary: rgba(100, 80, 180, 0.5);
  --yto-accent: #7b5cf8;
  --yto-progress-fill: linear-gradient(90deg, #7b5cf8, #c050e0);
  --yto-icon-color: #7b5cf8;
  --yto-backdrop: rgba(220, 210, 255, 0.25);
}
[data-yto-mode="light"][data-yto-theme="digital"] {
  --yto-bg: rgba(235, 250, 248, 0.95);
  --yto-border: 2px solid rgba(0, 200, 160, 0.35);
  --yto-shadow: 0 0 0 1px rgba(0, 200, 160, 0.06), 0 4px 16px rgba(0, 180, 140, 0.08);
  --yto-text: #0a2820;
  --yto-text-secondary: rgba(0, 160, 130, 0.5);
  --yto-accent: #00c8a0;
  --yto-icon-color: #00c8a0;
  --yto-font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
[data-yto-mode="light"][data-yto-theme="void"] {
  --yto-bg: rgba(255, 255, 255, 0.96);
  --yto-border: 1px solid rgba(0, 0, 0, 0.06);
  --yto-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --yto-text: #000000;
  --yto-text-secondary: rgba(60, 60, 60, 0.45);
  --yto-accent: #333333;
  --yto-accent-glow: none;
  --yto-progress-bg: rgba(0, 0, 0, 0.06);
  --yto-progress-fill: #333333;
  --yto-icon-color: #333333;
  --yto-backdrop: rgba(255, 255, 255, 0.9);
  --yto-blur: blur(20px);
}
[data-yto-mode="light"][data-yto-theme="synthetic"] {
  --yto-bg: rgba(255, 248, 240, 0.94);
  --yto-border: 1px solid rgba(220, 140, 40, 0.3);
  --yto-shadow: 0 4px 20px rgba(200, 120, 0, 0.08);
  --yto-text: #2e1a0a;
  --yto-text-secondary: rgba(180, 120, 40, 0.55);
  --yto-accent: #e89030;
  --yto-progress-fill: linear-gradient(90deg, #e89030, #e84ca8);
  --yto-icon-color: #e89030;
  --yto-backdrop: rgba(255, 235, 210, 0.25);
}

/* Auto mode — follows OS preference via JS matchMedia listener */
@media (prefers-color-scheme: light) {
  [data-yto-mode="auto"] {
    --yto-bg: rgba(245, 248, 255, 0.92);
    --yto-border: 1px solid rgba(100, 140, 255, 0.25);
    --yto-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --yto-text: #1a1a2e;
    --yto-text-secondary: rgba(60, 60, 100, 0.65);
    --yto-accent: #5b7cfa;
    --yto-accent-glow: 0 0 8px rgba(91, 124, 250, 0.2);
    --yto-progress-bg: rgba(91, 124, 250, 0.15);
    --yto-progress-fill: #5b7cfa;
    --yto-icon-color: #5b7cfa;
    --yto-backdrop: rgba(255, 255, 255, 0.4);
    --yto-blur: blur(16px);
  }
  [data-yto-mode="auto"][data-yto-theme="cyberpunk"] {
    --yto-bg: rgba(255, 240, 255, 0.95);
    --yto-border: 1px solid #d633d6;
    --yto-shadow: 0 4px 20px rgba(214, 51, 214, 0.12);
    --yto-text: #2d0a3e;
    --yto-text-secondary: rgba(150, 40, 150, 0.6);
    --yto-accent: #d633d6;
    --yto-accent-glow: 0 0 8px rgba(214, 51, 214, 0.2);
    --yto-progress-bg: rgba(214, 51, 214, 0.15);
    --yto-progress-fill: #d633d6;
    --yto-icon-color: #d633d6;
    --yto-backdrop: rgba(240, 220, 255, 0.3);
  }
  [data-yto-mode="auto"][data-yto-theme="matrix"] {
    --yto-bg: rgba(235, 255, 235, 0.95);
    --yto-border: 1px solid #1a9e3a;
    --yto-shadow: 0 4px 16px rgba(26, 158, 58, 0.1);
    --yto-text: #0a2e0a;
    --yto-text-secondary: rgba(30, 120, 40, 0.6);
    --yto-accent: #1a9e3a;
    --yto-accent-glow: 0 0 6px rgba(26, 158, 58, 0.2);
    --yto-progress-bg: rgba(26, 158, 58, 0.12);
    --yto-progress-fill: #1a9e3a;
    --yto-icon-color: #1a9e3a;
    --yto-font-family: 'Courier New', monospace;
  }
  [data-yto-mode="auto"][data-yto-theme="quantum"] {
    --yto-bg: rgba(235, 245, 255, 0.95);
    --yto-border: 1px solid rgba(0, 150, 220, 0.4);
    --yto-shadow: 0 4px 24px rgba(0, 120, 200, 0.1);
    --yto-text: #0a1a2e;
    --yto-text-secondary: rgba(0, 120, 180, 0.55);
    --yto-accent: #0096dc;
    --yto-progress-fill: linear-gradient(90deg, #0096dc, #7b2dcf);
    --yto-icon-color: #0096dc;
    --yto-backdrop: rgba(200, 230, 255, 0.3);
  }
  [data-yto-mode="auto"][data-yto-theme="aurora"] {
    --yto-bg: rgba(235, 255, 248, 0.94);
    --yto-border: 1px solid rgba(0, 200, 140, 0.3);
    --yto-shadow: 0 4px 20px rgba(0, 160, 100, 0.08);
    --yto-text: #0a2e20;
    --yto-text-secondary: rgba(0, 160, 100, 0.5);
    --yto-accent: #00c87a;
    --yto-progress-fill: linear-gradient(90deg, #00c87a, #6b5bfa);
    --yto-icon-color: #00c87a;
    --yto-backdrop: rgba(200, 255, 230, 0.25);
  }
  [data-yto-mode="auto"][data-yto-theme="hologram"] {
    --yto-bg: rgba(235, 248, 255, 0.92);
    --yto-border: 1px solid rgba(50, 170, 230, 0.2);
    --yto-shadow: 0 4px 16px rgba(50, 150, 200, 0.06);
    --yto-text: #0a2030;
    --yto-text-secondary: rgba(50, 150, 200, 0.5);
    --yto-accent: #3aa8e0;
    --yto-icon-color: #3aa8e0;
    --yto-backdrop: rgba(210, 240, 255, 0.2);
  }
  [data-yto-mode="auto"][data-yto-theme="deep-mind"] {
    --yto-bg: rgba(240, 238, 255, 0.94);
    --yto-border: 1px solid rgba(120, 100, 220, 0.25);
    --yto-shadow: 0 4px 20px rgba(100, 80, 200, 0.08);
    --yto-text: #1a1030;
    --yto-text-secondary: rgba(100, 80, 180, 0.5);
    --yto-accent: #7b5cf8;
    --yto-progress-fill: linear-gradient(90deg, #7b5cf8, #c050e0);
    --yto-icon-color: #7b5cf8;
    --yto-backdrop: rgba(220, 210, 255, 0.25);
  }
  [data-yto-mode="auto"][data-yto-theme="digital"] {
    --yto-bg: rgba(235, 250, 248, 0.95);
    --yto-border: 2px solid rgba(0, 200, 160, 0.35);
    --yto-shadow: 0 0 0 1px rgba(0, 200, 160, 0.06), 0 4px 16px rgba(0, 180, 140, 0.08);
    --yto-text: #0a2820;
    --yto-text-secondary: rgba(0, 160, 130, 0.5);
    --yto-accent: #00c8a0;
    --yto-icon-color: #00c8a0;
    --yto-font-family: 'JetBrains Mono', 'Fira Code', monospace;
  }
  [data-yto-mode="auto"][data-yto-theme="void"] {
    --yto-bg: rgba(255, 255, 255, 0.96);
    --yto-border: 1px solid rgba(0, 0, 0, 0.06);
    --yto-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --yto-text: #000000;
    --yto-text-secondary: rgba(60, 60, 60, 0.45);
    --yto-accent: #333333;
    --yto-accent-glow: none;
    --yto-progress-bg: rgba(0, 0, 0, 0.06);
    --yto-progress-fill: #333333;
    --yto-icon-color: #333333;
    --yto-backdrop: rgba(255, 255, 255, 0.9);
    --yto-blur: blur(20px);
  }
  [data-yto-mode="auto"][data-yto-theme="synthetic"] {
    --yto-bg: rgba(255, 248, 240, 0.94);
    --yto-border: 1px solid rgba(220, 140, 40, 0.3);
    --yto-shadow: 0 4px 20px rgba(200, 120, 0, 0.08);
    --yto-text: #2e1a0a;
    --yto-text-secondary: rgba(180, 120, 40, 0.55);
    --yto-accent: #e89030;
    --yto-progress-fill: linear-gradient(90deg, #e89030, #e84ca8);
    --yto-icon-color: #e89030;
    --yto-backdrop: rgba(255, 235, 210, 0.25);
  }
}

/* ---------- Container ---------- */
.yto-container {
  position: fixed; z-index: 999999; pointer-events: none;
  display: flex; flex-direction: column; gap: 10px; padding: 16px;
  max-height: 100vh; overflow: hidden;
}
.yto-container--top-right    { top: 0; right: 0; align-items: flex-end; }
.yto-container--top-left     { top: 0; left: 0; align-items: flex-start; }
.yto-container--top-center   { top: 0; left: 50%; transform: translateX(-50%); align-items: center; }
.yto-container--bottom-right { bottom: 0; right: 0; align-items: flex-end; flex-direction: column-reverse; }
.yto-container--bottom-left  { bottom: 0; left: 0; align-items: flex-start; flex-direction: column-reverse; }
.yto-container--bottom-center{ bottom: 0; left: 50%; transform: translateX(-50%); align-items: center; flex-direction: column-reverse; }

/* ---------- Toast Card ---------- */
.yto-toast {
  pointer-events: auto; position: relative;
  background: var(--yto-bg); border: var(--yto-border);
  border-radius: var(--yto-border-radius); box-shadow: var(--yto-shadow);
  backdrop-filter: var(--yto-blur); -webkit-backdrop-filter: var(--yto-blur);
  color: var(--yto-text); font-family: var(--yto-font-family);
  padding: 0; min-width: 300px; max-width: 420px; overflow: hidden;
  cursor: default; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.yto-toast:hover {
  transform: scale(1.02); box-shadow: var(--yto-accent-glow), var(--yto-shadow);
}

.yto-toast__inner {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
}
.yto-toast__icon {
  flex-shrink: 0; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  color: var(--yto-icon-color); margin-top: 1px;
}
.yto-toast__icon svg { width: 20px; height: 20px; }
.yto-toast__body { flex: 1; min-width: 0; }
.yto-toast__title {
  font-weight: 600; font-size: 14px; line-height: 1.4; margin-bottom: 2px;
  color: var(--yto-text);
}
.yto-toast__message {
  font-size: 13px; line-height: 1.4; color: var(--yto-text-secondary); word-break: break-word;
}
.yto-toast__close {
  flex-shrink: 0; width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: none; color: var(--yto-text-secondary);
  cursor: pointer; opacity: 0.5; transition: opacity 0.2s, transform 0.2s;
  border-radius: 4px; padding: 0; margin-top: 1px;
}
.yto-toast__close:hover { opacity: 1; transform: rotate(90deg); color: var(--yto-text); }

/* ---------- Progress Bar ---------- */
.yto-toast__progress {
  height: 3px; background: var(--yto-progress-bg); position: relative; overflow: hidden;
}
.yto-toast__progress-fill {
  height: 100%; width: 100%; background: var(--yto-progress-fill);
  transform-origin: left center; transition: none;
}

/* ---------- Glow border sweep ---------- */
.yto-toast::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit;
  background: conic-gradient(var(--yto-accent) 0deg, transparent 60deg, transparent 300deg, var(--yto-accent) 360deg);
  opacity: 0; transition: opacity 0.5s; z-index: -1;
}
.yto-toast--glow::before { opacity: 0.35; animation: yto-border-rotate 3s linear infinite; }
@keyframes yto-border-rotate { to { transform: rotate(360deg); } }

/* ---------- Type icon colors ---------- */
.yto-toast--success   .yto-toast__icon { color: #4ade80; }
.yto-toast--error     .yto-toast__icon { color: #ff4466; }
.yto-toast--warning   .yto-toast__icon { color: #fbbf24; }
.yto-toast--info      .yto-toast__icon { color: var(--yto-accent); }
.yto-toast--neural    .yto-toast__icon { color: #a78bfa; }
.yto-toast--thinking  .yto-toast__icon { color: #60a5fa; }
.yto-toast--training  .yto-toast__icon { color: #f472b6; }
.yto-toast--token     .yto-toast__icon { color: #34d399; }
.yto-toast--inception .yto-toast__icon { color: #c084fc; }
.yto-toast--singularity .yto-toast__icon { color: #fb923c; }
.yto-toast--loading   .yto-toast__icon { color: var(--yto-accent); }
.yto-toast--countdown .yto-toast__icon { color: #f59e0b; }
.yto-toast--multi-step .yto-toast__icon { color: #8b5cf6; }
.yto-toast--with-action .yto-toast__icon { color: #f97316; }
.yto-toast--gradient-sweep .yto-toast__icon { color: #ec4899; }
.yto-toast--safety-scan .yto-toast__icon { color: #10b981; }
.yto-toast--streaming .yto-toast__icon { color: #38bdf8; }
.yto-toast--prompt    .yto-toast__icon { color: #f472b6; }
.yto-toast--inference .yto-toast__icon { color: #818cf8; }
.yto-toast--deploy    .yto-toast__icon { color: #22d3ee; }
.yto-toast--experiment .yto-toast__icon { color: #e879f9; }
.yto-toast--metric    .yto-toast__icon { color: #fbbf24; }
.yto-toast--alert     .yto-toast__icon { color: #fb923c; }
.yto-toast--memory    .yto-toast__icon { color: #a78bfa; }
.yto-toast--feedback  .yto-toast__icon { color: #34d399; }
.yto-toast--dataset   .yto-toast__icon { color: #38bdf8; }

/* ---------- Icon animations ---------- */
.yto-toast--neural .yto-toast__icon,
.yto-toast--thinking .yto-toast__icon { animation: yto-pulse 1.5s ease-in-out infinite; }
@keyframes yto-pulse { 0%,100% { opacity: 0.6; transform: scale(0.95); } 50% { opacity: 1; transform: scale(1.1); } }

.yto-toast--training .yto-toast__icon { animation: yto-spin 2s linear infinite; }
@keyframes yto-spin { to { transform: rotate(360deg); } }

.yto-toast--singularity .yto-toast__icon { animation: yto-flicker 0.15s infinite alternate; }
@keyframes yto-flicker { 0% { opacity: 0.7; transform: scale(1); } 100% { opacity: 1; transform: scale(1.15); } }

.yto-toast--inception { animation: yto-shimmer 3s ease-in-out infinite; }
@keyframes yto-shimmer { 0%,100% { border-color: rgba(192, 132, 252, 0.3); } 50% { border-color: rgba(192, 132, 252, 0.8); } }

/* ---------- Loading Spinner ---------- */
.yto-toast__spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--yto-progress-bg);
  border-top-color: var(--yto-accent);
  border-radius: 50%; box-sizing: border-box;
  animation: yto-loading-spin 0.8s linear infinite;
}
@keyframes yto-loading-spin { to { transform: rotate(360deg); } }

.yto-toast--loading .yto-toast__progress-fill {
  width: 35%; animation: yto-loading-shimmer 1.4s ease-in-out infinite;
}
@keyframes yto-loading-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(330%); }
}

/* ---------- Countdown ---------- */
.yto-toast__countdown-number {
  font-size: 32px; font-weight: 700; text-align: center;
  color: var(--yto-accent); line-height: 1.1; margin: 4px 0 0;
  font-variant-numeric: tabular-nums;
}
.yto-toast__countdown-label {
  font-size: 11px; text-align: center;
  color: var(--yto-text-secondary); margin-bottom: 2px;
}

/* ---------- Multi-step ---------- */
.yto-toast__steps {
  display: flex; gap: 6px; margin: 6px 0 0;
}
.yto-toast__step {
  flex: 1; height: 4px; border-radius: 3px;
  background: var(--yto-progress-bg); transition: background 0.3s, box-shadow 0.3s;
}
.yto-toast__step--done { background: var(--yto-accent); }
.yto-toast__step--active { background: var(--yto-accent); box-shadow: var(--yto-accent-glow); }
.yto-toast__step-label {
  font-size: 11px; color: var(--yto-text-secondary); margin-top: 4px;
}

/* ---------- Action Buttons ---------- */
.yto-toast__actions {
  display: flex; gap: 8px; padding: 0 16px 12px; margin-top: -4px;
}
.yto-toast__action-btn {
  flex: 1; padding: 7px 14px; border-radius: 6px;
  border: 1px solid var(--yto-accent); background: transparent;
  color: var(--yto-accent); cursor: pointer; font-size: 12px;
  font-family: inherit; font-weight: 500;
  transition: all 0.2s; text-align: center;
}
.yto-toast__action-btn:hover { filter: brightness(1.3); background: rgba(255,255,255,0.05); }
.yto-toast__action-btn--primary {
  background: var(--yto-accent); color: var(--yto-bg); font-weight: 600;
}
.yto-toast__action-btn--primary:hover { filter: brightness(1.2); background: var(--yto-accent); }

/* ---------- Gradient Sweep ---------- */
.yto-toast--gradient-sweep {
  --yto-grad-1: 236, 72, 153;
  --yto-grad-2: 168, 85, 247;
  --yto-grad-3: 59, 130, 246;
}
.yto-toast--gradient-sweep .yto-toast__inner {
  position: relative; overflow: hidden;
}
.yto-toast--gradient-sweep .yto-toast__inner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg,
    rgba(var(--yto-grad-1),0.08),
    rgba(var(--yto-grad-2),0.14),
    rgba(var(--yto-grad-3),0.08)
  );
  background-size: 200% 100%;
  animation: yto-grad-sweep 3s ease infinite;
  pointer-events: none;
}
@keyframes yto-grad-sweep {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---------- Safety Scan ---------- */
.yto-toast--safety-scan { overflow: hidden; }
.yto-toast__scan-line {
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--yto-accent), transparent);
  animation: yto-scan 2.5s ease-in-out infinite; opacity: 0.7;
  pointer-events: none;
}
@keyframes yto-scan {
  0% { top: 0; opacity: 0.2; }
  50% { top: calc(100% - 2px); opacity: 0.8; }
  100% { top: 0; opacity: 0.2; }
}
.yto-toast__scan-findings { padding: 0 16px 10px; }
.yto-toast__scan-finding {
  font-size: 12px; padding: 2px 0; color: var(--yto-text-secondary);
  display: flex; align-items: center; gap: 6px;
}
.yto-toast__scan-finding::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--yto-accent); flex-shrink: 0;
}

/* ---------- Streaming / Typewriter ---------- */
.yto-toast--streaming .yto-toast__message::after {
  content: '▊'; animation: yto-blink 0.8s step-end infinite;
  color: var(--yto-accent); margin-left: 1px;
}
.yto-toast--streaming .yto-toast__message.yto-streaming--done::after {
  content: ''; animation: none;
}
@keyframes yto-blink { 50% { opacity: 0; } }

/* ---------- Sticky ---------- */
.yto-toast--sticky .yto-toast__progress { display: none; }

/* ---------- Animation Keyframes ---------- */
@keyframes yto-slideIn-right { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes yto-slideIn-left  { from { transform: translateX(-120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes yto-slideIn-up    { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes yto-slideIn-down  { from { transform: translateY(-40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes yto-fadeIn        { from { opacity: 0; } to { opacity: 1; } }
@keyframes yto-popIn         { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes yto-floatIn       { from { transform: translateY(20px) scale(0.95); opacity: 0; filter: blur(4px); } to { transform: translateY(0) scale(1); opacity: 1; filter: blur(0); } }

@keyframes yto-slideOut-right { from { transform: translateX(0); opacity: 1; } to { transform: translateX(120%); opacity: 0; } }
@keyframes yto-slideOut-left  { from { transform: translateX(0); opacity: 1; } to { transform: translateX(-120%); opacity: 0; } }
@keyframes yto-slideOut-up    { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-40px); opacity: 0; } }
@keyframes yto-slideOut-down  { from { transform: translateY(0); opacity: 1; } to { transform: translateY(40px); opacity: 0; } }
@keyframes yto-fadeOut        { from { opacity: 1; } to { opacity: 0; } }
@keyframes yto-popOut         { from { transform: scale(1); opacity: 1; } to { transform: scale(0.5); opacity: 0; } }
@keyframes yto-floatOut       { from { transform: translateY(0) scale(1); opacity: 1; filter: blur(0); } to { transform: translateY(-20px) scale(0.95); opacity: 0; filter: blur(4px); } }

.yto-animate--slide-in-right { animation: yto-slideIn-right var(--yto-animation-duration) cubic-bezier(0.16,1,0.3,1); }
.yto-animate--slide-in-left  { animation: yto-slideIn-left  var(--yto-animation-duration) cubic-bezier(0.16,1,0.3,1); }
.yto-animate--slide-in-up    { animation: yto-slideIn-up    var(--yto-animation-duration) cubic-bezier(0.16,1,0.3,1); }
.yto-animate--slide-in-down  { animation: yto-slideIn-down  var(--yto-animation-duration) cubic-bezier(0.16,1,0.3,1); }
.yto-animate--fade-in        { animation: yto-fadeIn        var(--yto-animation-duration) ease; }
.yto-animate--pop-in         { animation: yto-popIn         0.35s cubic-bezier(0.175,0.885,0.32,1.275); }
.yto-animate--float-in       { animation: yto-floatIn       var(--yto-animation-duration) cubic-bezier(0.16,1,0.3,1); }

.yto-animate--slide-out-right { animation: yto-slideOut-right var(--yto-animation-duration) cubic-bezier(0.16,1,0.3,1) forwards; }
.yto-animate--slide-out-left  { animation: yto-slideOut-left  var(--yto-animation-duration) cubic-bezier(0.16,1,0.3,1) forwards; }
.yto-animate--slide-out-up    { animation: yto-slideOut-up    var(--yto-animation-duration) cubic-bezier(0.16,1,0.3,1) forwards; }
.yto-animate--slide-out-down  { animation: yto-slideOut-down  var(--yto-animation-duration) cubic-bezier(0.16,1,0.3,1) forwards; }
.yto-animate--fade-out        { animation: yto-fadeOut        var(--yto-animation-duration) ease forwards; }
.yto-animate--pop-out         { animation: yto-popOut         0.3s cubic-bezier(0.175,0.885,0.32,1.275) forwards; }
.yto-animate--float-out       { animation: yto-floatOut       var(--yto-animation-duration) cubic-bezier(0.16,1,0.3,1) forwards; }

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
  .yto-toast { min-width: calc(100vw - 32px); max-width: calc(100vw - 32px); }
  .yto-container { padding: 8px; }
}
