:root {
  /* Colores principales - más vibrantes */
  --primary-color: #0A1128;
  --secondary-color: #4361EE;
  --accent-color: #7209B7;
  
  /* Gradientes vibrantes y llamativos */
  --gradient-1: linear-gradient(135deg, #4361EE, #7209B7);
  --gradient-2: linear-gradient(135deg, #F72585, #FF9E00);
  --gradient-3: linear-gradient(135deg, #4CC9F0, #4361EE);
  --gradient-4: linear-gradient(135deg, #7209B7, #3A0CA3);
  
  /* Colores de acento mejorados */
  --success-color: #4CC9F0;
  --warning-color: #F9C74F;
  --error-color: #F72585;
  --info-color: #4361EE;
  
  /* Colores para el texto */
  --text-light: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.8);
  --text-dark: #0A1128;
  
  /* Fondos y bordes */
  --gradient-bg: linear-gradient(135deg, #0A1128 0%, #1a1f35 100%);
  --card-bg: rgba(255, 255, 255, 0.07);
  --card-border: rgba(255, 255, 255, 0.15);
  
  /* Sombras y efectos mejorados */
  --shadow-sm: 0 2px 8px rgba(67, 97, 238, 0.15);
  --shadow-md: 0 4px 16px rgba(67, 97, 238, 0.2);
  --shadow-lg: 0 8px 24px rgba(67, 97, 238, 0.25);
  --shadow-hover: 0 12px 32px rgba(67, 97, 238, 0.3);
  
  /* Nuevos efectos de brillo */
  --glow-1: 0 0 20px rgba(67, 97, 238, 0.5);
  --glow-2: 0 0 25px rgba(114, 9, 183, 0.5);
  --glow-3: 0 0 30px rgba(76, 201, 240, 0.5);
}

/* Estilos base actualizados */
body {  margin: 0;
  padding: 0;
  background: var(--gradient-bg);
  color: var(--text-light);
  font-family: 'Montserrat', sans-serif;
  min-height: 100vh;
  background-attachment: fixed;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  overflow-x: hidden;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

/* Contenedor principal mejorado */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0;
  padding: 1rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Centrado universal */
.center-flex {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.center-grid {
  display: grid;
  place-items: center;
  width: 100%;
}

/* Títulos centrados y mejorados */
h1, h2, h3, h4, h5, h6 {
  text-align: center;
  width: 100%;
  margin-bottom: 1.5rem;
  position: relative;
  line-height: 1.3;
}

h1 {
  font-size: 2.5rem;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding: 0.5rem 0;
  margin: 2rem 0;
}

h1::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 4px;
  background: var(--gradient-1);
  border-radius: 2px;
  box-shadow: var(--glow-1);
}

/* Cards centradas y mejoradas */
.card {
  width: calc(100% - 2rem);
  max-width: 800px;  background: var(--card-bg);
  @supports (backdrop-filter: blur(10px)) {
    backdrop-filter: blur(10px);
  }
  @supports (-webkit-backdrop-filter: blur(10px)) {
    -webkit-backdrop-filter: blur(10px);
  }
  /* Fallback para navegadores que no soportan backdrop-filter */
  @supports not ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
    background: rgba(255, 255, 255, 0.85);
  }
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 1.5rem;
  margin: 0.5rem auto;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-1);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
  box-shadow: var(--shadow-hover), var(--glow-1);
}

/* Estilos de botones mejorados */
.button {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white !important;
    border: none;
    border-radius: 25px;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(114, 9, 183, 0.3);
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
}

.button:hover::before {
    transform: translateX(100%);
}

.button:active {
    transform: translateY(1px);
}

/* Botones mejorados */
.btn, button, .diseño {
  width: auto;
  background: var(--gradient-1);
  color: var(--text-light);
  border: none;
  border-radius: 50px;
  padding: 0.8rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.5rem;
  box-sizing: border-box;
  word-break: break-word;
  white-space: normal;
}

.btn:hover, button:hover, .diseño:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), var(--glow-1);
}

/* Contenedores de texto centrados */
.text-container {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
}

/* Nuevo efecto de brillo para elementos importantes */
.glow-effect {
  position: relative;
}

.glow-effect::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient-1);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glow-effect:hover::after {
  opacity: 0.5;
}

/* Estilos para elementos ocultos visualmente pero accesibles para lectores de pantalla */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Media queries actualizados */
@media (max-width: 768px) {
  .container {
    padding: 0.5rem;
    margin: 0;
    width: 100%;
  }
  
  h1 {
    font-size: 1.8rem;
    margin: 1rem 0;
  }
  
  h2 {
    font-size: 1.5rem;
    margin: 0.8rem 0;
  }
  
  h3 {
    font-size: 1.3rem;
    margin: 0.6rem 0;
  }
  
  .card {
    width: calc(100% - 1rem);
    padding: 1rem;
    margin: 0.5rem auto;
    border-radius: 15px;
  }
  
  .btn, button, .diseño {
    width: calc(100% - 1rem);
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    margin: 0.4rem 0;
  }

  .text-container {
    padding: 0.5rem;
    width: calc(100% - 1rem);
  }

  .button {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
  :root {
    --spacing-base: 0.5rem;
  }

  .container {
    padding: 0.3rem;
  }

  h1 {
    font-size: 1.5rem;
  }
  
  h2 {
    font-size: 1.3rem;
  }
  
  h3 {
    font-size: 1.1rem;
  }
  
  .card {
    width: calc(100% - 0.6rem);
    padding: 0.8rem;
    margin: 0.3rem auto;
    border-radius: 12px;
  }
  
  .btn, button, .diseño {
    width: calc(100% - 0.6rem);
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    margin: 0.3rem 0;
  }

  .text-container {
    padding: 0.3rem;
    width: calc(100% - 0.6rem);
  }
}
