/**
 * LUMAVINE.AI - GLASS MORPHISM CONSISTENCY FIXES
 * Standardizes glass morphism effects across the entire platform
 * Following design system standards: blur(10-20px), rgba(255,255,255,0.03-0.08)
 */

/* =====================================================
   GLASS MORPHISM STANDARD CLASSES
   ===================================================== */

.glass {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.glass-md {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* =====================================================
   HOVER STATES
   ===================================================== */

.glass:hover,
.glass-hover:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.glass-md:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.glass-strong:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

/* =====================================================
   ACCESSIBILITY - REDUCED MOTION
   ===================================================== */

@media (prefers-reduced-motion: reduce) {
  .glass,
  .glass-md,
  .glass-strong,
  .glass-dark {
    transition: none;
  }
}

/* =====================================================
   BROWSER FALLBACKS
   ===================================================== */

@supports not (backdrop-filter: blur(10px)) {
  .glass {
    background: rgba(255, 255, 255, 0.08);
  }

  .glass-md {
    background: rgba(255, 255, 255, 0.12);
  }

  .glass-strong {
    background: rgba(255, 255, 255, 0.16);
  }

  .glass-dark {
    background: rgba(0, 0, 0, 0.5);
  }
}

/* =====================================================
   PERFORMANCE OPTIMIZATION
   ===================================================== */

.glass,
.glass-md,
.glass-strong,
.glass-dark {
  will-change: auto;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* =====================================================
   RESPONSIVE ADJUSTMENTS
   ===================================================== */

@media (max-width: 768px) {
  /* Reduce blur on mobile for better performance */
  .glass {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .glass-md {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .glass-strong {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .glass-dark {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

/* =====================================================
   SPECIFIC COMPONENT FIXES
   ===================================================== */

/* Modal overlays */
.modal-overlay {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Card components */
.card-glass {
  background: rgba(22, 29, 40, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.card-glass:hover {
  background: rgba(28, 36, 48, 0.9);
  border-color: rgba(255, 255, 255, 0.12);
}

/* Navigation elements */
.nav-glass {
  background: rgba(15, 15, 20, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Sidebar elements */
.sidebar-glass {
  background: rgba(26, 26, 36, 0.95);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Game UI elements */
.game-panel-glass {
  background: rgba(8, 8, 15, 0.95);
  border: 2px solid rgba(0, 245, 255, 0.4);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 0 40px rgba(0, 245, 255, 0.15);
}

/* =====================================================
   TRANSITION UTILITIES
   ===================================================== */

.glass-transition {
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.glass-transition-fast {
  transition: background 0.15s ease, border-color 0.15s ease;
}

.glass-transition-slow {
  transition: background 0.4s ease, border-color 0.4s ease;
}
