/* ============================================
   🇨🇦 CANADA PROJECT - GLASSMORPHISM THEME
   Modern High-End Design System
   ============================================ */

/* ========== CSS VARIABLES ========== */
:root {
  /* Aurora Gradient Colors */
  --gradient-start: #0F2027;
  --gradient-mid: #203A43;
  --gradient-end: #2C5364;

  /* Canadian Colors */
  --canada-red: #FF3B3F;
  --canada-white: #F8FAFC;

  /* Glass Colors */
  --glass-white: rgba(255, 255, 255, 0.1);
  --glass-white-hover: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-border-strong: rgba(255, 255, 255, 0.3);

  /* Accent Colors */
  --accent-teal: #14B8A6;
  --accent-blue: #3B82F6;
  --accent-purple: #8B5CF6;
  --accent-green: #10B981;
  --accent-amber: #F59E0B;

  /* Shadows */
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-glass-lg: 0 12px 48px rgba(0, 0, 0, 0.15);
  --shadow-glass-xl: 0 20px 60px rgba(0, 0, 0, 0.2);
  --shadow-inner: inset 0 1px 0 rgba(255, 255, 255, 0.2);

  /* Blur */
  --blur-sm: blur(10px);
  --blur-md: blur(20px);
  --blur-lg: blur(40px);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode support */
[data-theme="dark"] {
  --glass-white: rgba(255, 255, 255, 0.05);
  --glass-white-hover: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.1);
}

/* ========== RESET & BASE ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ========== GRADIENT BACKGROUNDS ========== */
.bg-aurora {
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-mid) 50%, var(--gradient-end) 100%);
  position: relative;
}

.bg-aurora-animated {
  background: linear-gradient(135deg,
    var(--gradient-start) 0%,
    var(--gradient-mid) 50%,
    var(--gradient-end) 100%
  );
  background-size: 200% 200%;
  animation: aurora-shift 15s ease infinite;
}

@keyframes aurora-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Noise texture overlay for depth */
.bg-noise::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
}

/* ========== GLASS MORPHISM CARDS ========== */
.glass {
  background: var(--glass-white);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass), var(--shadow-inner);
  border-radius: 24px;
  transition: all var(--transition-smooth);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--glass-border-strong);
}

.glass-subtle {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Glass card hover effects */
.glass-hover:hover {
  background: var(--glass-white-hover);
  border-color: var(--glass-border-strong);
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.3),
    var(--shadow-inner);
  transform: translateY(-4px);
}

.glass-glow {
  box-shadow:
    var(--shadow-glass),
    0 0 40px rgba(59, 130, 246, 0.3),
    var(--shadow-inner);
}

.glass-glow-red {
  box-shadow:
    var(--shadow-glass),
    0 0 40px rgba(255, 59, 63, 0.3),
    var(--shadow-inner);
}

/* ========== GLASS BUTTONS ========== */
.btn-glass {
  background: var(--glass-white);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn-glass::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-glass:hover::before {
  width: 300px;
  height: 300px;
}

.btn-glass:hover {
  background: var(--glass-white-hover);
  border-color: var(--glass-border-strong);
  transform: scale(1.02);
}

.btn-glass:active {
  transform: scale(0.98);
}

/* Primary glass button */
.btn-glass-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.btn-glass-primary:hover {
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
}

/* Canada red button */
.btn-glass-red {
  background: linear-gradient(135deg, var(--canada-red), #FF6B6E);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  box-shadow: 0 8px 24px rgba(255, 59, 63, 0.4);
}

.btn-glass-red:hover {
  box-shadow: 0 12px 32px rgba(255, 59, 63, 0.5);
  transform: translateY(-2px);
}

/* ========== GLASS INPUTS ========== */
.input-glass {
  background: var(--glass-white);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px 16px;
  color: white;
  font-size: 16px;
  transition: all var(--transition-fast);
  width: 100%;
}

.input-glass::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.input-glass:focus {
  outline: none;
  border-color: var(--accent-blue);
  background: rgba(255, 255, 255, 0.15);
  box-shadow:
    0 0 0 3px rgba(59, 130, 246, 0.2),
    var(--shadow-glass);
}

.input-glass-light {
  background: rgba(255, 255, 255, 0.9);
  color: #1F2937;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.input-glass-light::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.input-glass-light:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ========== PROGRESS BARS ========== */
.progress-glass {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
  position: relative;
}

.progress-glass-fill {
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-teal));
  height: 100%;
  border-radius: 999px;
  transition: width var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.progress-glass-fill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
  }
  50% {
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.6);
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Animation classes */
.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.fade-in-scale {
  animation: fadeInScale 0.5s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.5s ease-out;
}

.slide-in-left {
  animation: slideInLeft 0.5s ease-out;
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Stagger animations for lists */
.stagger-children > * {
  animation: fadeIn 0.5s ease-out;
  animation-fill-mode: both;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.6s; }

/* ========== GLASS BADGES ========== */
.badge-glass {
  background: var(--glass-white);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-glass-success {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
  color: #10B981;
}

.badge-glass-warning {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.4);
  color: #F59E0B;
}

.badge-glass-danger {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #EF4444;
}

.badge-glass-info {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: #3B82F6;
}

/* ========== GLASS CHECKBOX ========== */
.checkbox-glass {
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--glass-white);
  backdrop-filter: blur(10px);
  border: 2px solid var(--glass-border);
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}

.checkbox-glass:checked {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-teal));
  border-color: transparent;
}

.checkbox-glass:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 14px;
}

.checkbox-glass:hover {
  border-color: var(--accent-blue);
  transform: scale(1.05);
}

/* ========== GLASS MODAL/OVERLAY ========== */
.overlay-glass {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-glass {
  background: var(--glass-white);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--shadow-glass-xl);
}

/* ========== GLASS TOAST ========== */
.toast-glass {
  background: var(--glass-white);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: var(--shadow-glass-lg);
  min-width: 300px;
  animation: slideInRight 0.4s ease-out;
}

/* ========== PARTICLE BACKGROUND ========== */
.particle-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.particle {
  position: absolute;
  pointer-events: none;
  opacity: 0.6;
}

/* Maple leaf animation */
@keyframes fall {
  0% {
    transform: translateY(-10vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(110vh) rotate(360deg);
    opacity: 0;
  }
}

/* ========== UTILITY CLASSES ========== */
.text-glass {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.text-glass-muted {
  color: rgba(255, 255, 255, 0.6);
}

.backdrop-blur-sm { backdrop-filter: blur(10px); }
.backdrop-blur-md { backdrop-filter: blur(20px); }
.backdrop-blur-lg { backdrop-filter: blur(40px); }

.shadow-glass { box-shadow: var(--shadow-glass); }
.shadow-glass-lg { box-shadow: var(--shadow-glass-lg); }
.shadow-glass-xl { box-shadow: var(--shadow-glass-xl); }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .glass {
    border-radius: 16px;
  }

  .btn-glass {
    padding: 10px 20px;
    border-radius: 10px;
  }
}

/* ========== SCROLLBAR STYLING ========== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
  background: var(--glass-white);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--glass-white-hover);
  background-clip: padding-box;
}

/* ========== LOADING STATES ========== */
.skeleton-glass {
  background: linear-gradient(
    90deg,
    var(--glass-white) 25%,
    rgba(255, 255, 255, 0.15) 50%,
    var(--glass-white) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 8px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.loading-spinner-glass {
  width: 40px;
  height: 40px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ========== TRANSITIONS ========== */
.transition-glass {
  transition: all var(--transition-smooth);
}

.transition-fast {
  transition: all var(--transition-fast);
}

.transition-slow {
  transition: all var(--transition-slow);
}

/* ========== HOVER GLOW EFFECTS ========== */
.hover-glow:hover {
  box-shadow:
    var(--shadow-glass),
    0 0 30px rgba(59, 130, 246, 0.4);
}

.hover-lift:hover {
  transform: translateY(-4px);
}

.hover-scale:hover {
  transform: scale(1.02);
}
