/* === BRASOV.TATTOO EPIC GLOBAL STYLES - PERFORMANCE OPTIMIZED === */
/* 🔥 ZERO LAG + SMOOTH ANIMATIONS + HARDWARE ACCELERATION 🔥 */

/* Import fonturi artistice */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Orbitron:wght@400;500;600;700;800;900&family=Bebas+Neue&display=swap');

/* === EPIC CSS VARIABLES SYSTEM === */
:root {
  /* 🎨 Primary Color Palette - Ultra Premium */
  --primary-dark: #000000;
  --secondary-dark: #0a0a0a;
  --tertiary-dark: #111111;
  --primary-light: #ffffff;
  --secondary-light: #f8fafc;
  
  /* 🌟 Epic Control Center Colors */
  --accent-gold: #fbbf24;          /* Epic Gold */
  --accent-electric: #00d4ff;      /* Electric Blue */
  --accent-red: #ff375f;           /* Vibrant Red */
  --accent-purple: #af52de;        /* Epic Purple */
  --accent-green: #32d74b;         /* Fresh Green */
  --accent-pink: #ff2d92;          /* Hot Pink */
  --accent-orange: #ff9500;        /* Electric Orange */
  
  /* 🔥 EPIC Glassmorphism Variables */
  --glass-ultra: rgba(255, 255, 255, 0.15);
  --glass-premium: rgba(255, 255, 255, 0.12);
  --glass-standard: rgba(255, 255, 255, 0.08);
  --glass-subtle: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-border-light: rgba(255, 255, 255, 0.1);
  --glass-white: rgba(255, 255, 255, 0.12);
  --glass-light: rgba(255, 255, 255, 0.08);
  
  /* ⚡ Typography Colors */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.85);
  --text-muted: rgba(255, 255, 255, 0.6);
  --text-subtle: rgba(255, 255, 255, 0.4);
  --text-dark: #0a0a0a;
  
  /* 🌟 OPTIMIZED Glow Effects - Reduced intensity */
  --glow-electric: 0 0 20px rgba(0, 212, 255, 0.4);
  --glow-gold: 0 0 25px rgba(251, 191, 36, 0.4);
  --glow-purple: 0 0 22px rgba(175, 82, 222, 0.4);
  --glow-red: 0 0 18px rgba(255, 55, 95, 0.4);
  --glow-green: 0 0 20px rgba(50, 215, 75, 0.4);
  --glow-white: 0 0 25px rgba(255, 255, 255, 0.3);
  --glow-epic: 0 0 30px rgba(0, 212, 255, 0.2);
  --glow-neon: 0 0 15px rgba(0, 212, 255, 0.3);
  
  /* 🚀 OPTIMIZED Transitions - Faster for performance */
  --transition-epic: 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  --transition-smooth: 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --transition-elastic: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  
  /* 📐 Border Radius System */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-epic: 40px;
  --border-radius: 16px;
  --border-radius-lg: 24px;
  
  /* 🎯 Typography System */
  --font-display: 'Bebas Neue', 'Orbitron', sans-serif;
  --font-heading: 'Orbitron', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'SF Mono', 'Monaco', monospace;
  --font-accent: 'Orbitron', sans-serif;
  
  /* 🎨 OPTIMIZED Background Gradients - Simplified */
  --bg-epic: 
    linear-gradient(135deg, 
      rgba(0, 0, 0, 0.98) 0%, 
      rgba(5, 5, 10, 0.96) 25%,
      rgba(8, 8, 15, 0.98) 50%,
      rgba(3, 3, 8, 0.97) 75%,
      rgba(0, 0, 0, 0.99) 100%);
  
  /* 🔥 OPTIMIZED Section Gradients */
  --section-gradient-1: linear-gradient(135deg, 
    rgba(0, 212, 255, 0.05) 0%, 
    rgba(175, 82, 222, 0.03) 100%);
  --section-gradient-2: linear-gradient(135deg, 
    rgba(251, 191, 36, 0.05) 0%, 
    rgba(255, 55, 95, 0.03) 100%);
  --section-gradient-3: linear-gradient(135deg, 
    rgba(50, 215, 75, 0.05) 0%, 
    rgba(0, 212, 255, 0.03) 100%);
}

/* === OPTIMIZED BASE RESET & EPIC SETUP === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  
  /* 🚀 CRITICAL: Hardware acceleration for all elements */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* 🔥 OPTIMIZED HTML & BODY SETUP */
html {
  overflow-x: hidden;
  max-width: 100vw;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  
  /* Performance optimizations */
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--primary-dark);
  font-family: var(--font-body);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  width: 100vw;
  max-width: 100vw;
  line-height: 1.6;
  
  /* 🎨 SIMPLIFIED BACKGROUND - Better performance */
  background: var(--bg-epic);
  background-attachment: fixed;
  
  /* Performance enhancements */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  
  /* Hardware acceleration */
  will-change: scroll-position;
  transform: translateZ(0);
}

/* 🌟 OPTIMIZED ANIMATED BACKGROUND OVERLAY - Reduced complexity */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 25% 25%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(255, 55, 95, 0.06) 0%, transparent 50%);
  z-index: 1;
  pointer-events: none;
  animation: optimizedBackgroundPulse 15s ease-in-out infinite;
  opacity: 0.6;
  
  /* Hardware acceleration */
  will-change: opacity;
  transform: translateZ(0);
}

@keyframes optimizedBackgroundPulse {
  0%, 100% { 
    opacity: 0.6; 
  }
  50% { 
    opacity: 0.8; 
  }
}

/* === OPTIMIZED PARTICLE SYSTEM - Reduced count and complexity === */
#particle-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* 🔥 OPTIMIZED Particle Animations - Simpler transforms */
.particle-gold {
  background: radial-gradient(circle, rgba(251, 191, 36, 0.6), rgba(251, 191, 36, 0.2));
  animation: optimizedGoldFloat 8s ease-in-out infinite;
}

.particle-electric {
  background: radial-gradient(circle, rgba(0, 212, 255, 0.7), rgba(0, 212, 255, 0.2));
  animation: optimizedElectricZap 6s ease-in-out infinite;
}

.particle-purple {
  background: radial-gradient(circle, rgba(175, 82, 222, 0.6), rgba(175, 82, 222, 0.2));
  animation: optimizedPurpleFlow 10s ease-in-out infinite;
}

.particle-red {
  background: radial-gradient(circle, rgba(255, 55, 95, 0.7), rgba(255, 55, 95, 0.2));
  animation: optimizedRedPulse 7s ease-in-out infinite;
}

@keyframes optimizedGoldFloat {
  0%, 100% { 
    transform: translateZ(0) translateY(0); 
    opacity: 0.7;
  }
  50% { 
    transform: translateZ(0) translateY(-10px); 
    opacity: 1;
  }
}

@keyframes optimizedElectricZap {
  0%, 100% { 
    opacity: 0.6; 
    transform: translateZ(0) scale(1);
  }
  50% { 
    opacity: 1; 
    transform: translateZ(0) scale(1.1);
  }
}

@keyframes optimizedPurpleFlow {
  0%, 100% { 
    transform: translateZ(0) translateX(0); 
    opacity: 0.7;
  }
  50% { 
    transform: translateZ(0) translateX(15px); 
    opacity: 1;
  }
}

@keyframes optimizedRedPulse {
  0%, 100% { 
    transform: translateZ(0) scale(1); 
    opacity: 0.7;
  }
  50% { 
    transform: translateZ(0) scale(1.2); 
    opacity: 1;
  }
}

/* === OPTIMIZED LOADING SCREEN === */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, var(--primary-dark) 0%, #0d1117 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: all var(--transition-smooth);
}

.loading-content {
  text-align: center;
  color: var(--text-primary);
  animation: optimizedLoadingEntrance 1s ease-out;
}

.loading-logo {
  margin-bottom: 2rem;
  font-size: 4rem;
  animation: optimizedLogoSpin 2s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.5));
}

.loading-text {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-electric), var(--accent-gold));
  background-size: 200% 200%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2rem;
  letter-spacing: 3px;
  animation: optimizedTextShimmer 2s ease-in-out infinite;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top: 4px solid var(--accent-electric);
  border-radius: 50%;
  animation: optimizedSpin 1s linear infinite;
  margin: 0 auto 1.5rem;
}

.loading-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 1px;
  animation: optimizedPulse 2s ease-in-out infinite;
}

@keyframes optimizedLoadingEntrance {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes optimizedLogoSpin {
  0%, 100% { transform: translateZ(0) rotateY(0deg); }
  50% { transform: translateZ(0) rotateY(180deg); }
}

@keyframes optimizedTextShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes optimizedSpin {
  to { transform: translateZ(0) rotate(360deg); }
}

@keyframes optimizedPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* === OPTIMIZED TYPOGRAPHY SYSTEM === */

/* 🔥 OPTIMIZED H2 Headers */
h2, .epic-heading-2 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem) !important;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  position: relative;
  
  /* 🌟 OPTIMIZED GRADIENT TEXT */
  background: linear-gradient(
    135deg,
    var(--accent-electric) 0%,
    var(--accent-gold) 50%,
    var(--accent-purple) 100%
  );
  background-size: 200% 200%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  
  /* 🔥 OPTIMIZED ANIMATIONS */
  animation: optimizedGradientShift 4s ease-in-out infinite;
  
  /* ⚡ OPTIMIZED TEXT SHADOW */
  filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.3));
  
  /* Hardware acceleration */
  will-change: background-position;
  transform: translateZ(0);
}

h2:hover, .epic-heading-2:hover {
  filter: drop-shadow(0 0 25px rgba(0, 212, 255, 0.5));
  transform: translateZ(0) scale(1.02);
}

/* 🌟 OPTIMIZED H2 Underline Effect */
h2::after, .epic-heading-2::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-electric));
  border-radius: 2px;
  animation: optimizedUnderlineGrow 1.5s ease-out 0.5s forwards;
}

@keyframes optimizedGradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes optimizedUnderlineGrow {
  0% { width: 0; }
  100% { width: 120px; }
}

/* 📝 Enhanced paragraph styling */
p, .description, .text-content {
  text-align: justify;
  text-justify: inter-word;
  line-height: 1.8;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  hyphens: auto;
  word-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* === OPTIMIZED SECTION LAYOUT SYSTEM === */

/* 🔥 OPTIMIZED Section Base */
section {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 100%;
  padding: 5rem 2rem 4rem;
  margin-bottom: 0;
  overflow-x: hidden;
  
  /* 🌟 OPTIMIZED GLASSMORPHISM */
  background: var(--glass-premium);
  backdrop-filter: blur(25px) saturate(150%);
  border: 1px solid var(--glass-border-light);
  
  /* ⚡ OPTIMIZED SHADOWS */
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 10px 30px rgba(0, 0, 0, 0.12);
  
  /* 🎨 OPTIMIZED TRANSITION */
  transition: all var(--transition-smooth);
  
  /* Hardware acceleration */
  will-change: transform;
  transform: translateZ(0);
}

section:hover {
  background: var(--glass-ultra);
  backdrop-filter: blur(30px) saturate(180%);
  border-color: rgba(0, 212, 255, 0.2);
  
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 15px 40px rgba(0, 0, 0, 0.15),
    0 0 50px rgba(0, 212, 255, 0.1);
  
  transform: translateZ(0) translateY(-2px);
}

/* 🔥 OPTIMIZED Section Content Container */
section .section-content {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 0 1.5rem;
  position: relative;
  z-index: 5;
}

/* 🌟 OPTIMIZED Section Background Overlays */
section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--section-gradient-1);
  opacity: 0.3;
  pointer-events: none;
  z-index: 1;
  transition: opacity var(--transition-smooth);
}

section:nth-child(even)::before {
  background: var(--section-gradient-2);
}

section:nth-child(3n)::before {
  background: var(--section-gradient-3);
}

section:hover::before {
  opacity: 0.5;
}

/* === OPTIMIZED SECTION TITLES === */
.section-title {
  text-align: center;
  margin-bottom: 5rem;
  position: relative;
  animation: optimizedTitleEntrance 1s ease-out;
}

.section-title h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 900;
  margin-bottom: 1.5rem;
  line-height: 0.8;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  position: relative;
  
  /* 🔥 OPTIMIZED GRADIENT TEXT */
  background: linear-gradient(
    135deg,
    var(--accent-electric) 0%,
    var(--accent-gold) 50%,
    var(--accent-purple) 100%
  );
  background-size: 200% 200%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  
  /* ⚡ OPTIMIZED ANIMATIONS */
  animation: optimizedTitleGradient 6s ease-in-out infinite;
  
  /* Hardware acceleration */
  will-change: background-position;
  transform: translateZ(0);
}

.section-title h1::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 5px;
  background: linear-gradient(90deg, 
    var(--accent-electric), 
    var(--accent-gold)
  );
  border-radius: 3px;
  animation: optimizedTitleLine 3s ease-in-out infinite;
}

.section-title p {
  font-size: clamp(1rem, 2vw, 1.4rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
  letter-spacing: 0.5px;
  font-weight: 600;
}

@keyframes optimizedTitleEntrance {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes optimizedTitleGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes optimizedTitleLine {
  0%, 100% { 
    transform: translateX(-50%) scaleX(1);
  }
  50% { 
    transform: translateX(-50%) scaleX(1.2);
  }
}

/* === OPTIMIZED CARD SYSTEM === */

/* 🔥 OPTIMIZED Glass Cards */
.glass-card {
  position: relative;
  overflow: hidden;
  transition: all var(--transition-smooth);
  cursor: pointer;
  border-radius: var(--radius-lg);
  
  /* 🌟 OPTIMIZED GLASSMORPHISM */
  background: var(--glass-premium);
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--glass-border-light);
  
  /* ⚡ OPTIMIZED SHADOWS */
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 8px 25px rgba(0, 0, 0, 0.1);
  
  /* Hardware acceleration */
  will-change: transform;
  transform: translateZ(0);
}

.glass-card:hover {
  transform: translateZ(0) translateY(-8px) scale(1.02);
  background: var(--glass-ultra);
  backdrop-filter: blur(25px) saturate(180%);
  border-color: rgba(0, 212, 255, 0.3);
  
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 15px 40px rgba(0, 0, 0, 0.15),
    0 0 50px rgba(0, 212, 255, 0.1);
}

/* 🌟 OPTIMIZED Card Shimmer Effect */
.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
  transition: left var(--transition-smooth);
  z-index: 2;
  will-change: transform;
  transform: translateZ(0);
}

.glass-card:hover::before {
  left: 100%;
}

/* 🎯 Dark Glass Cards */
.glass-card-dark {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(25px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 12px 35px rgba(0, 0, 0, 0.2);
}

.glass-card-dark:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 18px 50px rgba(0, 0, 0, 0.25),
    0 0 60px rgba(251, 191, 36, 0.2);
}

/* === OPTIMIZED ENHANCED COMPONENTS === */

/* 🔥 OPTIMIZED Avatars */
.enhanced-avatar {
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid transparent;
  background: linear-gradient(135deg, var(--accent-electric), var(--accent-gold));
  padding: 4px;
  transition: all var(--transition-smooth);
  
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
  
  /* Hardware acceleration */
  will-change: transform;
  transform: translateZ(0);
}

.enhanced-avatar:hover {
  transform: translateZ(0) scale(1.1) rotate(5deg);
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-purple));
  box-shadow: 0 0 50px rgba(251, 191, 36, 0.4);
}

.enhanced-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transition: all var(--transition-smooth);
  filter: brightness(0.9) contrast(1.2) saturate(1.2);
  
  /* Hardware acceleration */
  will-change: filter, transform;
  transform: translateZ(0);
}

.enhanced-avatar:hover img {
  filter: brightness(1.1) contrast(1.4) saturate(1.4);
  transform: translateZ(0) scale(1.05);
}

/* 🎨 OPTIMIZED Images */
.enhanced-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--glass-border-light);
  transition: all var(--transition-smooth);
  background: var(--glass-standard);
  backdrop-filter: blur(20px);
  aspect-ratio: 3/2;
  
  /* Hardware acceleration */
  will-change: transform;
  transform: translateZ(0);
}

.enhanced-image:hover {
  border-color: rgba(0, 212, 255, 0.5);
  transform: translateZ(0) translateY(-5px) scale(1.02);
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.2);
}

.enhanced-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all var(--transition-smooth);
  filter: brightness(0.9) contrast(1.2) saturate(1.2);
  
  /* Hardware acceleration */
  will-change: filter, transform;
  transform: translateZ(0);
}

.enhanced-image:hover img {
  filter: brightness(1) contrast(1.3) saturate(1.3);
  transform: translateZ(0) scale(1.05);
}

/* === OPTIMIZED LOADING STATES === */
.loading-container {
  text-align: center;
  padding: 4rem 2rem;
  animation: optimizedLoadingPulse 2s ease-in-out infinite;
}

.loading-text {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-electric), var(--accent-gold));
  background-size: 200% 200%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: optimizedTextShimmer 2s ease-in-out infinite;
}

.loading-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.loading-dot {
  width: 12px;
  height: 12px;
  background: var(--accent-electric);
  border-radius: 50%;
  animation: optimizedDotBounce 1.4s ease-in-out infinite both;
  
  /* Hardware acceleration */
  will-change: transform;
  transform: translateZ(0);
}

.loading-dot:nth-child(1) { animation-delay: -0.3s; }
.loading-dot:nth-child(2) { animation-delay: -0.15s; }
.loading-dot:nth-child(3) { animation-delay: 0s; }

@keyframes optimizedLoadingPulse {
  0%, 100% { 
    opacity: 1; 
    transform: translateZ(0) scale(1);
  }
  50% { 
    opacity: 0.7; 
    transform: translateZ(0) scale(1.02);
  }
}

@keyframes optimizedDotBounce {
  0%, 80%, 100% {
    transform: translateZ(0) scale(0);
  }
  40% {
    transform: translateZ(0) scale(1.2);
  }
}

/* === OPTIMIZED ERROR & DEACTIVATED STATES === */
.section-deactivated {
  text-align: center;
  padding: 5rem 3rem;
  color: var(--text-muted);
  background: var(--glass-subtle);
  backdrop-filter: blur(15px);
  border-radius: var(--radius-xl);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  margin: 2rem;
  transition: all var(--transition-smooth);
}

.section-deactivated:hover {
  border-color: rgba(255, 55, 95, 0.4);
  background: rgba(255, 55, 95, 0.05);
}

.deactivated-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.8;
  animation: optimizedIconFloat 3s ease-in-out infinite;
}

.error-state {
  text-align: center;
  padding: 4rem 3rem;
  color: var(--accent-red);
  background: rgba(255, 55, 95, 0.1);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  border: 2px solid rgba(255, 55, 95, 0.3);
}

.error-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  animation: optimizedErrorShake 2s ease-in-out infinite;
}

@keyframes optimizedIconFloat {
  0%, 100% { transform: translateZ(0) translateY(0); }
  50% { transform: translateZ(0) translateY(-8px); }
}

@keyframes optimizedErrorShake {
  0%, 100% { transform: translateZ(0) translateX(0); }
  25% { transform: translateZ(0) translateX(-3px); }
  75% { transform: translateZ(0) translateX(3px); }
}

/* === ENHANCED MOBILE RESPONSIVE === */
@media (max-width: 768px) {
  /* Critical mobile fixes */
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  
  body {
    width: 100vw !important;
  }

  /* Optimized mobile sections */
  section {
    padding: 3rem 1.5rem 2.5rem;
    background: var(--glass-standard);
    backdrop-filter: blur(15px);
    overflow-x: hidden !important;
  }

  .section-content {
    padding: 0 1rem;
    max-width: 100%;
    overflow-x: hidden !important;
  }

  .section-title {
    margin-bottom: 3rem;
  }

  .section-title h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
  }

  /* Optimized mobile H2 */
  h2, .epic-heading-2 {
    font-size: clamp(2rem, 7vw, 3.5rem) !important;
  }

  /* Mobile typography */
  p, .description, .text-content {
    font-size: 0.9rem;
    line-height: 1.7;
  }

  /* Mobile glassmorphism cards */
  .glass-card, .glass-card-dark {
    background: var(--glass-standard);
    backdrop-filter: blur(15px) saturate(140%);
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
  }

  /* Enhanced images mobile */
  .enhanced-image {
    aspect-ratio: 3/2;
    max-width: 100%;
  }
  
  /* Reduce particle count on mobile */
  .particle:nth-child(n+4) {
    display: none;
  }
}

@media (max-width: 480px) {
  section {
    padding: 2.5rem 1rem 2rem;
    background: var(--glass-subtle);
    overflow-x: hidden !important;
  }

  .section-content {
    padding: 0 0.5rem;
    overflow-x: hidden !important;
  }

  .section-title h1 {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  h2, .epic-heading-2 {
    font-size: clamp(1.8rem, 8vw, 2.8rem) !important;
  }

  .loading-container {
    padding: 3rem 1.5rem;
  }

  /* Mobile card adjustments */
  .glass-card, .glass-card-dark {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    padding: 1.5rem;
  }

  .enhanced-image {
    aspect-ratio: 3/2;
  }
  
  /* Hide all particles on very small screens */
  .particle {
    display: none;
  }
}

/* === CRITICAL PERFORMANCE OPTIMIZATIONS === */

/* Hardware acceleration for key elements */
.enhanced-avatar img,
.enhanced-image img,
.glass-card,
.section-title h1,
h2, .epic-heading-2,
.loading-spinner,
.particle {
  will-change: transform, filter, opacity;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .particle {
    display: none !important;
  }
  
  .glass-card::before {
    display: none !important;
  }
  
  body::before {
    animation: none !important;
  }
}

/* High contrast accessibility */
@media (prefers-contrast: high) {
  .glass-card,
  .enhanced-avatar,
  .enhanced-image {
    border-width: 3px;
    background: rgba(255, 255, 255, 0.25);
  }
  
  .section-title h1,
  h2, .epic-heading-2 {
    color: var(--accent-electric);
    -webkit-text-fill-color: var(--accent-electric);
    background: none;
  }
}

/* === FINAL TOUCHES === */

/* Optimized focus states */
*:focus {
  outline: 3px solid var(--accent-electric);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Optimized selection */
::selection {
  background: rgba(0, 212, 255, 0.3);
  color: var(--text-primary);
}

/* Optimized scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--glass-subtle);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--accent-electric), var(--accent-gold));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-purple));
}

/* Optimized smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Overflow protection */
.container, 
.section-content {
  overflow-x: hidden !important;
  max-width: 100%;
}

/* Final optimized body entrance */
body {
  animation: optimizedBodyEntrance 1.2s ease-out;
}

@keyframes optimizedBodyEntrance {
  0% {
    opacity: 0;
    transform: translateZ(0) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateZ(0) scale(1);
  }
}