/* ==========================================================================
   css/main.css - Variables de diseño, reset y estructura base
   ========================================================================== */

:root {
  /* Paleta de colores principales */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-muted: #f1f5f9;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverted: #ffffff;
  
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;
  
  /* Colores temáticos de acción */
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-light: #dbeafe;
  
  --color-success: #16a34a;
  --color-success-hover: #15803d;
  --color-success-light: #dcfce7;
  
  --color-danger: #dc2626;
  --color-danger-hover: #b91c1c;
  --color-danger-light: #fee2e2;
  
  --color-warning: #d97706;
  --color-warning-hover: #b45309;
  --color-warning-light: #fef3c7;
  
  --color-purple: #7c3aed;
  --color-purple-hover: #6d28d9;
  --color-purple-light: #ede9fe;
  
  /* Colores de equipos */
  --team-1: #2563eb;
  --team-2: #dc2626;
  --team-3: #16a34a;
  --team-4: #d97706;
  --team-5: #7c3aed;
  
  /* Sombras y elevaciones */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Tipografía base */
  --font-family-base: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --font-family-display: 'Georgia', 'Cambria', 'Times New Roman', serif;
  
  --font-size-root: 16px;
  --border-radius-sm: 6px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
  --border-radius-full: 9999px;
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* Modo Oscuro */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --bg-muted: #334155;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverted: #0f172a;
  
  --border-color: #334155;
  --border-focus: #60a5fa;
  
  --color-primary-light: #1e3a8a;
  --color-success-light: #14532d;
  --color-danger-light: #7f1d1d;
  --color-warning-light: #78350f;
  --color-purple-light: #4c1d95;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.6);
}

/* Reset y caja */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-root);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-base);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Contenedor principal de la aplicación */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 0 1rem;
}

/* Encabezado global de la aplicación */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  cursor: pointer;
}

.brand-icon {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Área de contenido de las pantallas */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem 0 2rem;
}

/* Control de visibilidad de pantallas */
.screen {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--transition-normal), transform var(--transition-normal);
  width: 100%;
}

.screen.active {
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: translateY(0);
}

/* Pie de página */
.app-footer {
  padding: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}
