/* 🎨 Estilos Globales - CriptoMan v2.0 */

/* ============================================================================
   VARIABLES CSS
   ============================================================================ */

:root {
  /* 🎨 Esquema de Colores: Azul Oscuro + Blanco */
  
  /* Colores Principales - Azul Oscuro */
  --primary: #1e3a8a;        /* Azul oscuro principal */
  --primary-light: #2563eb;  /* Azul medio */
  --primary-dark: #1e40af;   /* Azul muy oscuro */
  --secondary: #475569;      /* Gris azulado */
  --accent: #0ea5e9;         /* Azul cielo (acentos) */
  
  /* Colores de Estado */
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --info: #3B82F6;
  
  /* Colores de Criptomonedas */
  --btc: #F7931A;
  --eth: #627EEA;
  --usdt: #26A17B;
  
  /* Colores de Texto */
  --text-primary: #FFFFFF;      /* Blanco */
  --text-secondary: #CBD5E1;    /* Gris claro */
  --text-tertiary: #94A3B8;     /* Gris medio */
  --text-inverse: #1e3a8a;      /* Azul oscuro (para fondos claros) */
  
  /* Colores de Fondo - Azul Oscuro */
  --background: #0f172a;           /* Azul muy oscuro (fondo principal) */
  --background-secondary: #1e293b; /* Azul oscuro medio */
  --background-hover: #334155;     /* Azul grisáceo (hover) */
  --background-disabled: #1e293b;
  
  /* Colores de Componentes */
  --card-background: #1e293b;      /* Cards en azul oscuro */
  --input-background: #0f172a;     /* Inputs */
  --border-color: #334155;         /* Bordes */
  --border-hover: #475569;
  --border-focus: var(--accent);
  
  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  /* Espaciado */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Bordes */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  /* Transiciones */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
  
  /* Z-Index */
  --z-dropdown: 1000;
  --z-modal: 1050;
  --z-toast: 9999;
}

/* Tema Claro (para casos específicos) */
[data-theme="light"] {
  --text-primary: #1e3a8a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  
  --background: #FFFFFF;
  --background-secondary: #F8FAFC;
  --background-hover: #F1F5F9;
  --background-disabled: #F8FAFC;
  
  --card-background: #FFFFFF;
  --input-background: #F8FAFC;
  --border-color: #E2E8F0;
  --border-hover: #CBD5E1;
}

/* ============================================================================
   RESET & BASE
   ============================================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--background);
  transition: background 0.3s ease, color 0.3s ease;
}

#app {
  min-height: 100vh;
}

/* ============================================================================
   TIPOGRAFÍA
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

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

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

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

/* ============================================================================
   LAYOUT UTILITIES
   ============================================================================ */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

/* ============================================================================
   COLOR UTILITIES
   ============================================================================ */

.positive {
  color: var(--success);
}

.negative {
  color: var(--danger);
}

.neutral {
  color: var(--text-secondary);
}

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

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

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease;
}

.animate-slideIn {
  animation: slideIn 0.3s ease;
}

/* ============================================================================
   SCROLLBAR
   ============================================================================ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

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

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  .container {
    padding: 0 var(--spacing-md);
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.pointer {
  cursor: pointer;
}

.disabled {
  opacity: 0.5;
  pointer-events: none;
}
