/**
 * Premium Theme CSS
 * Modern, luxury-inspired design system
 * Inspired by premium automotive and lifestyle brands
 */

/* ============================================
   CSS VARIABLES - Premium Color Palette
   ============================================ */
:root {
  /* Primary Colors - Deep, Rich Tones */
  --color-primary: #1a1a2e;
  --color-primary-light: #16213e;
  --color-primary-dark: #0f0f1e;
  
  /* Accent Colors - Vibrant Purple/Blue */
  --color-accent: #6c63ff;
  --color-accent-light: #8b84ff;
  --color-accent-dark: #5548e0;
  
  /* Secondary Colors - Teal/Cyan */
  --color-secondary: #00d4ff;
  --color-secondary-light: #33ddff;
  --color-secondary-dark: #00b8e6;
  
  /* Tertiary Colors - Pink/Magenta */
  --color-tertiary: #ff6b9d;
  --color-tertiary-light: #ff8fb3;
  --color-tertiary-dark: #e6527d;
  
  /* Neutral Colors */
  --color-white: #ffffff;
  --color-off-white: #f8f9fa;
  --color-light-gray: #e9ecef;
  --color-gray: #adb5bd;
  --color-dark-gray: #6c757d;
  
  /* Status Colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #3b82f6;
  
  /* Gradient Backgrounds */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-tertiary: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-success: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  --gradient-accent: linear-gradient(135deg, #6c63ff 0%, #5548e0 100%);
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-xxl: 4rem;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.25);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 400ms ease-in-out;
}

/* ============================================
   GLOBAL STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-primary);
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  /* Fixed backgrounds repaint on every scroll; use scroll for better perf */
  background-attachment: scroll;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(108, 99, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(79, 172, 254, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255, 107, 157, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Admin page bespoke background */
body.admin-page {
  background:
    radial-gradient(1300px 900px at 12% 18%, rgba(118, 91, 194, 0.32), transparent 60%),
    radial-gradient(1200px 820px at 84% 12%, rgba(67, 137, 123, 0.28), transparent 62%),
    linear-gradient(135deg, #e8ecff 0%, #f7f2ff 38%, #e6f7f1 72%, #dff1ff 100%);
  background-attachment: scroll;
}

body.admin-page::before {
  background:
    radial-gradient(560px at 22% 32%, rgba(118, 91, 194, 0.34), transparent 64%),
    radial-gradient(680px at 78% 22%, rgba(67, 137, 123, 0.34), transparent 66%);
  opacity: 0.9;
  filter: blur(4px);
}

body.admin-page::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    conic-gradient(from 120deg, rgba(118, 91, 194, 0.18), rgba(67, 137, 123, 0.12), rgba(118, 91, 194, 0.18));
  mix-blend-mode: screen;
  opacity: 0.6;
}

@keyframes backgroundPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

/* Ensure content is above background */
.app, main, section, div {
  position: relative;
  z-index: 1;
}

/* Prevent horizontal overflow on all elements */
* {
  max-width: 100%;
}

img, video, iframe {
  max-width: 100%;
  height: auto;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--color-primary);
}

h1 {
  font-size: 3.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.5rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 2rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
  font-family: var(--font-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

p {
  margin-bottom: var(--spacing-sm);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-accent-dark);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-family: var(--font-primary);
  font-size: 0.9375rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left var(--transition-base);
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--color-white);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-accent {
  background: var(--gradient-accent);
  color: var(--color-white);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.4);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 99, 255, 0.6);
}

.btn-secondary {
  background: var(--gradient-tertiary);
  color: var(--color-white);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 172, 254, 0.6);
}

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-outline:hover {
  background: var(--gradient-accent);
  color: var(--color-white);
  border-color: transparent;
}

.btn-ghost {
  background: transparent;
  color: var(--color-accent);
  border-color: transparent;
}

.btn-ghost:hover {
  background: rgba(108, 99, 255, 0.1);
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow:
    0 10px 40px rgba(108, 99, 255, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-base);
  position: relative;
  overflow: visible;
  border: 2px solid rgba(108, 99, 255, 0.2);
  animation: cardFadeIn 0.6s ease-out;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-accent);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient-accent);
  border-radius: var(--radius-lg);
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: -1;
}

.card:hover {
  box-shadow:
    0 20px 60px rgba(108, 99, 255, 0.3),
    0 5px 15px rgba(0, 0, 0, 0.15);
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(108, 99, 255, 0.5);
}

.card:hover::after {
  opacity: 0.1;
}

.card-header {
  border-bottom: 2px solid var(--color-light-gray);
  padding-bottom: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  background: linear-gradient(to right, rgba(108, 99, 255, 0.05), transparent);
  margin: calc(-1 * var(--spacing-lg)) calc(-1 * var(--spacing-lg)) var(--spacing-md);
  padding: var(--spacing-md) var(--spacing-lg);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0;
  color: var(--color-primary);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.card-body {
  padding: var(--spacing-md) 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.card-footer {
  border-top: 2px solid var(--color-light-gray);
  padding-top: var(--spacing-md);
  margin-top: var(--spacing-md);
  background: linear-gradient(to right, transparent, rgba(108, 99, 255, 0.05));
  margin: var(--spacing-md) calc(-1 * var(--spacing-lg)) calc(-1 * var(--spacing-lg));
  padding: var(--spacing-md) var(--spacing-lg);
}

/* Card Variants */
.card-gradient {
  background: var(--gradient-primary);
  color: var(--color-white);
}

.card-gradient .card-title {
  color: var(--color-white);
}

.card-accent {
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.1), rgba(79, 172, 254, 0.1));
  border-color: var(--color-accent);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-bottom: var(--spacing-xs);
  word-wrap: break-word;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.875rem 1rem;
  font-family: var(--font-primary);
  font-size: 1rem;
  color: var(--color-primary);
  background: var(--color-white);
  border: 2px solid var(--color-light-gray);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  box-sizing: border-box;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1);
  background: linear-gradient(to right, rgba(108, 99, 255, 0.02), var(--color-white));
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.form-input::placeholder,
.form-select::placeholder,
.form-textarea::placeholder {
  color: var(--color-gray);
}

/* Form validation states */
.form-input:invalid:not(:placeholder-shown),
.form-select:invalid:not(:placeholder-shown),
.form-textarea:invalid:not(:placeholder-shown) {
  border-color: var(--color-error);
}

.form-input:valid:not(:placeholder-shown),
.form-select:valid:not(:placeholder-shown),
.form-textarea:valid:not(:placeholder-shown) {
  border-color: var(--color-success);
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(108, 99, 255, 0.1);
  padding: var(--spacing-md) 0;
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.1);
}

.navbar-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

/* Performance mode: strip heavy shadows/blur for low-power or reduced-motion users */
:root.performance-mode {
  --shadow: none;
  --shadow-soft: none;
  --glow-strong: none;
  --glow-soft: none;
}

.performance-mode .card,
.performance-mode .navbar,
.performance-mode .portal-card,
.performance-mode .feature-card,
.performance-mode .workflow-card,
.performance-mode .stat-pill,
.performance-mode .pill,
.performance-mode .hero-card {
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  transition: transform var(--transition-base);
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.navbar-nav {
  display: flex;
  gap: var(--spacing-lg);
  list-style: none;
  flex-wrap: wrap;
}

.navbar-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
  transition: all var(--transition-base);
  position: relative;
  padding: 0.5rem 0;
}

.navbar-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--gradient-accent);
  transition: width var(--transition-base);
  border-radius: 2px;
}

.navbar-link:hover {
  color: var(--color-accent);
}

.navbar-link:hover::after,
.navbar-link.active::after {
  width: 100%;
}

.navbar-link.active {
  color: var(--color-accent);
  font-weight: 600;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: var(--color-white);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(108, 99, 255, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(79, 172, 254, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(255, 107, 157, 0.2) 0%, transparent 50%);
  animation: heroGlow 10s ease-in-out infinite;
}

@keyframes heroGlow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: var(--spacing-xl);
  animation: fadeIn 1s ease-out;
}

.hero-title {
  font-size: 4rem;
  margin-bottom: var(--spacing-md);
  color: var(--color-white);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-xl);
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.hero-cta {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: var(--spacing-xxl) var(--spacing-lg);
  position: relative;
  overflow: hidden;
}

.section-dark {
  background: var(--gradient-dark);
  color: var(--color-white);
}

.section-dark::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(108, 99, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(79, 172, 254, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.section-accent {
  background: var(--gradient-accent);
  color: var(--color-white);
}

.section-accent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.section-gradient {
  background: var(--gradient-tertiary);
  color: var(--color-white);
}

.section-light {
  background: linear-gradient(to bottom, var(--color-off-white), var(--color-white));
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 var(--spacing-md);
  box-sizing: border-box;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.section-subtitle {
  font-size: 1.25rem;
  color: var(--color-gray);
  max-width: 600px;
  margin: 0 auto;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.section-dark .section-title,
.section-accent .section-title,
.section-gradient .section-title {
  color: var(--color-white);
}

.section-dark .section-subtitle,
.section-accent .section-subtitle,
.section-gradient .section-subtitle {
  color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   GRID SYSTEM
   ============================================ */
.grid {
  display: grid;
  gap: var(--spacing-lg);
  width: 100%;
  max-width: 100%;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
}

/* Stagger animation for grid items */
.grid > * {
  animation: gridItemFadeIn 0.6s ease-out backwards;
}

.grid > *:nth-child(1) { animation-delay: 0.1s; }
.grid > *:nth-child(2) { animation-delay: 0.2s; }
.grid > *:nth-child(3) { animation-delay: 0.3s; }
.grid > *:nth-child(4) { animation-delay: 0.4s; }
.grid > *:nth-child(5) { animation-delay: 0.5s; }
.grid > *:nth-child(6) { animation-delay: 0.6s; }

@keyframes gridItemFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsive grid adjustments */
@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center {
  text-align: center;
}

.text-accent {
  color: var(--color-accent);
}

.bg-dark {
  background: var(--color-primary);
  color: var(--color-white);
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn var(--transition-slow) ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in {
  animation: slideIn var(--transition-slow) ease-out;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .section {
    padding: var(--spacing-xl) var(--spacing-md);
  }
  
  .navbar-nav {
    gap: var(--spacing-md);
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   LOADING STATES
   ============================================ */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 3px solid var(--color-light-gray);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast {
  position: fixed;
  bottom: var(--spacing-lg);
  right: var(--spacing-lg);
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-base);
  z-index: 9999;
}

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

.toast-success {
  background: var(--color-success);
}

.toast-error {
  background: var(--color-error);
}

.toast-warning {
  background: var(--color-warning);
}

.toast-info {
  background: var(--color-info);
}

/* Made with Bob */

/* ============================================
   ADDITIONAL ANIMATIONS & INTERACTIONS
   ============================================ */

/* Pulse animation for important elements */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Bounce animation */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.bounce {
  animation: bounce 1s ease-in-out infinite;
}

/* Shimmer effect for loading */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* Glow effect on hover */
.glow-on-hover {
  transition: all var(--transition-base);
}

.glow-on-hover:hover {
  box-shadow: 
    0 0 20px rgba(108, 99, 255, 0.6),
    0 0 40px rgba(108, 99, 255, 0.4),
    0 0 60px rgba(108, 99, 255, 0.2);
}

/* Rotate on hover */
.rotate-on-hover {
  transition: transform var(--transition-base);
}

.rotate-on-hover:hover {
  transform: rotate(5deg) scale(1.05);
}

/* Scale up on hover */
.scale-on-hover {
  transition: transform var(--transition-base);
}

.scale-on-hover:hover {
  transform: scale(1.1);
}

/* Slide in from left */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

/* Slide in from right */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

/* Zoom in */
@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.zoom-in {
  animation: zoomIn 0.5s ease-out;
}

/* Floating animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.float {
  animation: float 3s ease-in-out infinite;
}

/* Gradient animation */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-animate {
  background-size: 200% 200%;
  animation: gradientShift 5s ease infinite;
}

/* Text gradient animation */
.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}

/* Interactive button effects */
button, .btn, a.btn {
  position: relative;
  overflow: hidden;
}

button::after, .btn::after, a.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:active::after, .btn:active::after, a.btn:active::after {
  width: 300px;
  height: 300px;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Selection styling */
::selection {
  background: var(--color-accent);
  color: var(--color-white);
}

::-moz-selection {
  background: var(--color-accent);
  color: var(--color-white);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--color-off-white);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-accent);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-dark);
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* Prevent text selection on buttons */
button, .btn {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

/* Smooth transitions for all interactive elements */
a, button, input, select, textarea, .card, .btn {
  transition: all var(--transition-base);
}

/* Hover lift effect for clickable items */
a:not(.btn):hover,
button:not(.btn):hover {
  transform: translateY(-2px);
}

/* Active state for all buttons */
button:active, .btn:active {
  transform: scale(0.95);
}

/* Disabled state */
button:disabled, .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Loading spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(108, 99, 255, 0.1);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-light-gray) 25%,
    var(--color-off-white) 50%,
    var(--color-light-gray) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

/* Tooltip */
[data-tooltip] {
  position: relative;
  cursor: help;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  z-index: 1000;
}

[data-tooltip]:hover::before {
  opacity: 1;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
  background: var(--gradient-accent);
  color: var(--color-white);
}

/* Alert */
.alert {
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  border-left: 4px solid;
  animation: slideInLeft 0.3s ease-out;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--color-success);
  color: var(--color-success);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--color-error);
  color: var(--color-error);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--color-warning);
  color: var(--color-warning);
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--color-info);
  color: var(--color-info);
}
