/**
 * Piano Admin - Design System
 * Sistema de diseño unificado con variables CSS
 * Versión: 2.0
 */

:root {
  /* ========================================
     COLORES PRINCIPALES
     ======================================== */
  --piano-dark: #2c2c2c;
  --piano-dark-alt: #1a1a1a;
  --piano-dark-deepest: #0a0a0a;
  --piano-gold: #d4af37;
  --piano-gold-light: #f4d03f;
  --piano-light: #f8f9fa;
  --piano-accent: #6c757d;
  --piano-white: #ffffff;

  /* ========================================
     GRADIENTES
     ======================================== */
  --piano-gold-gradient: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
  --piano-gold-gradient-reverse: linear-gradient(135deg, #f4d03f 0%, #d4af37 100%);
  --piano-dark-gradient: linear-gradient(135deg, #0a0a0a 0%, #2c2c2c 100%);
  --piano-dark-gradient-animated: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 25%, #2c2c2c 50%, #1a1a1a 75%, #0a0a0a 100%);

  /* Gradientes para texto */
  --text-gradient-gold: linear-gradient(135deg, #ffffff 0%, #f0f0f0 25%, #d4af37 50%, #f4d03f 75%, #d4af37 100%);
  --text-gradient-white-gold: linear-gradient(135deg, #ffffff 0%, var(--piano-gold) 100%);

  /* ========================================
     ESTADOS Y UTILIDADES
     ======================================== */
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --info: #17a2b8;

  /* ========================================
     SOMBRAS
     ======================================== */
  /* Sombras neutras */
  --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.2);
  --shadow-2xl: 0 30px 80px rgba(0, 0, 0, 0.25);

  /* Sombras doradas */
  --shadow-gold-xs: 0 2px 8px rgba(212, 175, 55, 0.2);
  --shadow-gold-sm: 0 5px 15px rgba(212, 175, 55, 0.3);
  --shadow-gold-md: 0 10px 30px rgba(212, 175, 55, 0.4);
  --shadow-gold-lg: 0 15px 45px rgba(212, 175, 55, 0.5);
  --shadow-gold-xl: 0 20px 60px rgba(212, 175, 55, 0.6);

  /* Sombras internas */
  --shadow-inset-sm: inset 0 -2px 5px rgba(0, 0, 0, 0.1);
  --shadow-inset-md: inset 0 -3px 10px rgba(0, 0, 0, 0.15);
  --shadow-inset-lg: inset 0 -5px 15px rgba(0, 0, 0, 0.2);

  /* ========================================
     TRANSICIONES Y ANIMACIONES
     ======================================== */
  --transition-instant: 0.1s ease;
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition-slowest: 0.8s ease;

  /* Cubic bezier para efectos suaves */
  --ease-in-out-smooth: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out-circ: cubic-bezier(0.85, 0, 0.15, 1);

  /* Duraciones predefinidas */
  --duration-fast: 0.2s;
  --duration-base: 0.3s;
  --duration-slow: 0.5s;
  --duration-slowest: 0.8s;

  /* ========================================
     BORDER RADIUS
     ======================================== */
  --radius-xs: 5px;
  --radius-sm: 10px;
  --radius-md: 15px;
  --radius-lg: 20px;
  --radius-xl: 25px;
  --radius-2xl: 30px;
  --radius-round: 50px;
  --radius-circle: 50%;

  /* ========================================
     ESPACIADO
     ======================================== */
  --spacing-xs: 0.25rem;   /* 4px */
  --spacing-sm: 0.5rem;    /* 8px */
  --spacing-md: 1rem;      /* 16px */
  --spacing-lg: 1.5rem;    /* 24px */
  --spacing-xl: 2rem;      /* 32px */
  --spacing-2xl: 3rem;     /* 48px */
  --spacing-3xl: 4rem;     /* 64px */
  --spacing-4xl: 6rem;     /* 96px */
  --spacing-5xl: 8rem;     /* 128px */

  /* ========================================
     TIPOGRAFÍA
     ======================================== */
  --font-family-heading: 'Playfair Display', serif;
  --font-family-body: 'Inter', sans-serif;

  /* Tamaños de fuente */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-size-5xl: 3rem;      /* 48px */
  --font-size-6xl: 3.75rem;   /* 60px */
  --font-size-7xl: 4.5rem;    /* 72px */

  /* Pesos de fuente */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  --font-weight-black: 900;

  /* Line heights */
  --line-height-tight: 1.2;
  --line-height-snug: 1.3;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;
  --line-height-loose: 2;

  /* Letter spacing */
  --letter-spacing-tight: -0.02em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.025em;
  --letter-spacing-wider: 0.05em;
  --letter-spacing-widest: 0.1em;

  /* ========================================
     Z-INDEX
     ======================================== */
  --z-index-dropdown: 1000;
  --z-index-sticky: 1020;
  --z-index-fixed: 1030;
  --z-index-modal-backdrop: 1040;
  --z-index-modal: 1050;
  --z-index-popover: 1060;
  --z-index-tooltip: 1070;

  /* ========================================
     BACKDROP FILTERS
     ======================================== */
  --backdrop-blur-sm: blur(4px);
  --backdrop-blur-md: blur(8px);
  --backdrop-blur-lg: blur(12px);
  --backdrop-blur-xl: blur(16px);

  /* ========================================
     BREAKPOINTS (para uso en JS)
     ======================================== */
  --breakpoint-xs: 0;
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 992px;
  --breakpoint-xl: 1200px;
  --breakpoint-xxl: 1400px;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Gradientes de texto */
.text-gradient-gold {
  background: var(--text-gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-white-gold {
  background: var(--text-gradient-white-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glassmorphism */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: var(--backdrop-blur-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.glass-gold {
  background: rgba(212, 175, 55, 0.1);
  backdrop-filter: var(--backdrop-blur-lg);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Sombras utilitarias */
.shadow-gold {
  box-shadow: var(--shadow-gold-md);
}

.shadow-gold-lg {
  box-shadow: var(--shadow-gold-lg);
}

.shadow-soft {
  box-shadow: var(--shadow-md);
}

/* Transiciones suaves */
.transition-smooth {
  transition: all var(--duration-base) var(--ease-in-out-smooth);
}

.transition-fast {
  transition: all var(--duration-fast) ease;
}

.transition-slow {
  transition: all var(--duration-slow) var(--ease-in-out-smooth);
}

/* ========================================
   ANIMACIONES GLOBALES
   ======================================== */

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

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% {
    background-position: -100% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0) scale(1);
  }
  33% {
    transform: translateY(-20px) translateX(10px) scale(1.05);
  }
  66% {
    transform: translateY(10px) translateX(-10px) scale(0.95);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

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

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

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

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes borderGlow {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes shine {
  0%, 100% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  50% {
    transform: translate(-50%, -50%) rotate(180deg);
  }
}

/* Clases de animación reutilizables */
.animate-fadeIn {
  animation: fadeIn 0.6s ease-out;
}

.animate-shimmer {
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
}

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

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

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

.animate-rotate {
  animation: rotate 20s linear infinite;
}

/* ========================================
   EFECTOS HOVER GLOBALES
   ======================================== */

.hover-lift {
  transition: transform var(--duration-base) var(--ease-in-out-smooth);
}

.hover-lift:hover {
  transform: translateY(-10px);
}

.hover-scale {
  transition: transform var(--duration-base) var(--ease-in-out-smooth);
}

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

.hover-glow {
  transition: box-shadow var(--duration-base) ease;
}

.hover-glow:hover {
  box-shadow: var(--shadow-gold-lg);
}

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */

@media (max-width: 575.98px) {
  :root {
    --font-size-5xl: 2rem;
    --font-size-6xl: 2.5rem;
    --font-size-7xl: 3rem;
    --spacing-4xl: 3rem;
    --spacing-5xl: 4rem;
  }
}

@media (max-width: 767.98px) {
  :root {
    --font-size-4xl: 2rem;
    --spacing-3xl: 3rem;
  }
}

/* ========================================
   DARK MODE (preparado para futuro)
   ======================================== */

@media (prefers-color-scheme: dark) {
  :root {
    /* Variables que cambiarían en modo oscuro */
    /* Descomentadas cuando se implemente dark mode */
    /* --piano-light: #1a1a1a; */
    /* --piano-dark: #f8f9fa; */
  }
}
