/* Reset y estilos globales */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

/* Estilos para el header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 15px 30px;
  background-color: #FFC107;
  color: #333;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8em;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}

/* Men� principal */
nav {
  display: flex;
  gap: 20px;
  align-items: center;
  transition: all 0.3s ease;
}

nav a {
  text-decoration: none;
  color: #333;
  font-size: 1em;
  transition: color 0.3s;
}

nav a:hover {
  color: #FFB300;
}

/* Bot�n de men� hamburguesa (inicialmente oculto en pantallas grandes) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5em;
  color: #333;
  cursor: pointer;
}

/* Contenedor principal (con fondo) */
.content-container {
  margin-top: 80px; /* Espacio para el header fijo */
  flex: 1;
  background-size: cover;
  padding: 150px 200px;
  text-align: center;
  color: #fff;
}

.content-container h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
}

.content-container p {
  font-size: 1.2em;
  margin-bottom: 20px;
}

.cta-button {
  display: inline-block;
  margin: 10px 5px;
  padding: 10px 20px;
  background-color: #FFC107;
  color: #333;
  font-size: 1em;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.2s;
}

.cta-button:hover {
  background-color: #FFB300;
  transform: scale(1.05);
}

/* Estilos para el footer */
footer {
  background-color: #FFC107;
  color: #333;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a {
  text-decoration: none;
  color: #333;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #FFC107;
}

.social-icons a {
  color: #FFC107;
  font-size: 1.5em;
  transition: color 0.3s;
}

.social-icons a:hover {
  color: #FFC107;
}

.footer-text {
  text-align: center;
  font-size: 0.9em;
  color: #333;
  flex-basis: 100%;
}

/* Estilos para formularios (login, registro, etc.) */
.form-container {
  background: #fff;
  padding: 20px;
  border-radius: 5px;
  max-width: 400px;
  margin: 100px auto;
}

.form-container h2 {
  margin-bottom: 20px;
  text-align: center;
}

.form-container input[type="text"],
.form-container input[type="email"],
.form-container input[type="password"] {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
}

.form-container input[type="submit"] {
  width: 100%;
  padding: 10px;
  background: #FFC107;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

/* Media Queries para responsividad */

/* Para pantallas de hasta 768px (tabletas y m�viles peque�os) */
@media (max-width: 1024px) {
  /* Mostrar el bot�n de men� hamburguesa */
  .menu-toggle {
    display: block;
  }
  /* Convertir el men� en vertical y ocultarlo por defecto */
  nav {
    position: absolute;
    top: 70px; /* Ajusta seg�n la altura del header */
    right: 0;
    background-color: #FFC107;
    flex-direction: column;
    width: 100%;
    display: none;
    padding: 15px 0;
  }
  /* Cuando se active (con la clase 'active'), se muestra el men� */
  nav.active {
    display: flex;
  }
  nav a {
    padding: 10px 20px;
    width: 100%;
    text-align: center;
  }
  /* Reducir padding del contenedor principal para que se ajuste en pantallas m�s peque�as */
  .content-container {
    padding: 150px 30px;
  }
}

/* Para pantallas de hasta 480px (m�viles) */
@media (max-width: 480px) {
  .content-container {
    padding: 100px 20px;
  }
  .content-container h1 {
    font-size: 2em;
  }
  .content-container p {
    font-size: 1em;
  }
  .cta-button {
    padding: 8px 15px;
    font-size: 0.9em;
  }
}
.slider-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh; /* Ocupa toda la altura de la ventana */
  z-index: -1; /* Se sit�a detr�s del contenido */
}
.slider-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ======================================================
   🎨 ESTILOS PARA EL SELECTOR DE FUENTES MEJORADO
   ====================================================== */

/* Estilos del select principal */
#fontFamily {
  width: 100%;
  max-width: 100% !important;
  padding: 0 !important;
  font-size: 14px;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer;
  outline: none;
  overflow: visible !important;
  overflow-y: visible !important;
  overflow-x: visible !important;
}

#fontFamily:hover {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

#fontFamily:focus {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Estilos para las opciones del select */
#fontFamily option {
  font-size: 14px !important;
  padding: 6px 12px !important;
  line-height: 1.3 !important;
  height: auto !important;
  min-height: auto !important;
  border-bottom: 1px solid #e9ecef !important;
  color: #2c3e50 !important;
  background: #ffffff !important;
  transition: all 0.2s ease !important;
}

/* Hover effect para las opciones */
#fontFamily option:hover {
  background-color: #f8f9fa !important;
  color: #6c63ff !important;
}

/* Estilos para los optgroups */
#fontFamily optgroup {
  font-weight: bold;
  font-size: 14px;
  color: #6c63ff;
  background-color: #f8f9fa;
  padding: 8px 12px;
  border-bottom: 2px solid #e9ecef;
}

/* Estilos específicos para el preview flotante */
#liveFontPreview {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  box-shadow: 0 20px 60px rgba(108, 99, 255, 0.25) !important;
  border: 3px solid #6c63ff !important;
}

/* Animaciones suaves para el preview */
#liveFontPreview {
  animation: slideInPreview 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInPreview {
  0% {
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Estilos responsivos para el selector */
@media (max-width: 1024px) {
  #fontFamily {
    max-width: 100%;
    font-size: 14px;
  }
  
  #fontFamily option {
    font-size: 14px !important;
    padding: 10px 12px !important;
    min-height: 36px !important;
  }
  
  #liveFontPreview {
    width: 280px !important;
    right: 10px !important;
    top: 10px !important;
  }
}

@media (max-width: 480px) {
  #liveFontPreview {
    width: calc(100vw - 20px) !important;
    right: 10px !important;
    left: 10px !important;
    top: 10px !important;
  }
}

/* ======================================================
   🚀 ESTILOS MEJORADOS PARA SCROLL FLUIDO DE FUENTES
   ====================================================== */

/* ✅ Scroll eliminado - sin scroll, sin tarjeta */
/* #fontFamily {
  scroll-behavior: smooth !important;
  scrollbar-width: thin;
  scrollbar-color: #6c63ff #f1f1f1;
} */

/* Webkit scrollbar personalizado para navegadores basados en Chromium */
/* ✅ Scrollbar eliminado - sin scroll, sin tarjeta */
/* #fontFamily::-webkit-scrollbar {
  width: 8px;
}

#fontFamily::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

#fontFamily::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #6c63ff, #8b7aff);
  border-radius: 4px;
  transition: background 0.3s ease;
}

#fontFamily::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5a4bff, #7a6bff);
} */

/* Mejoras en las opciones del selector */
#fontFamily option {
  transition: all 0.2s ease !important;
  scroll-margin: 5px;
}

#fontFamily option:checked {
  background: linear-gradient(135deg, #6c63ff, #8b7aff) !important;
  color: white !important;
  box-shadow: 0 2px 8px rgba(108, 99, 255, 0.3);
}

/* Animación suave para el dropdown expandido */
#fontFamily[size="15"] {
  animation: expandDropdown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 400px;
  overflow-y: auto;
  border: 2px solid #6c63ff !important;
  box-shadow: 0 8px 25px rgba(108, 99, 255, 0.2) !important;
}

@keyframes expandDropdown {
  from {
    max-height: 35px;
    opacity: 0.8;
  }
  to {
    max-height: 400px;
    opacity: 1;
  }
}

/* Estilos mejorados para la vista previa flotante */
#liveFontPreview {
  animation: slideInPreviewSmooth 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  will-change: transform, opacity;
}

@keyframes slideInPreviewSmooth {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Hover mejorado para opciones */
#fontFamily option:hover {
  background: linear-gradient(135deg, #f8f9ff, #e9ecff) !important;
  transform: translateX(2px);
  border-left: 3px solid #6c63ff;
}

/* Estilos para grupos de fuentes (optgroups) mejorados */
#fontFamily optgroup {
  background: linear-gradient(135deg, #f1f3ff, #e8ebff) !important;
  font-weight: 600 !important;
  color: #6c63ff !important;
  padding: 8px 12px !important;
  border-bottom: 1px solid #d4d8ff !important;
}

/* Transiciones fluidas globales para elementos de fuentes */
.font-related * {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mejoras para dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
  #fontFamily option {
    padding: 15px 12px !important;
    font-size: 16px !important;
  }
  
  #fontFamily[size="15"] {
    max-height: 350px;
  }
  
  #liveFontPreview {
    touch-action: pan-y;
  }
}

/* ======================================================
   📦 ESTILOS PARA ESTADOS DE CARGA DE FUENTES
   ====================================================== */

/* Fuente cargándose */
#fontFamily option.loading {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7) !important;
  position: relative;
  opacity: 0.8;
}

#fontFamily option.loading::after {
  content: " 🔄";
  color: #856404;
  font-size: 12px;
}

/* Fuente cargada exitosamente */
#fontFamily option.loaded {
  background: linear-gradient(135deg, #d4edda, #c3e6cb) !important;
  border-left: 3px solid #28a745 !important;
}

#fontFamily option.loaded::after {
  content: " ✅";
  color: #155724;
  font-size: 12px;
}

/* Fuente que falló al cargar (usando fallback) */
#fontFamily option.font-failed {
  background: linear-gradient(135deg, #f8d7da, #f1b0b7) !important;
  border-left: 3px solid #dc3545 !important;
  opacity: 0.9;
}

#fontFamily option.font-failed::after {
  content: " ⚠️";
  color: #721c24;
  font-size: 12px;
}

/* Animación de pulso para fuentes cargándose */
@keyframes fontLoadingPulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

#fontFamily option.loading {
  animation: fontLoadingPulse 1.5s infinite;
}

/* Estilos para notificaciones mejoradas */
#fontNotifications {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Botón de añadir texto mejorado */
.addTextButton {
  background: linear-gradient(135deg, #6c63ff, #5a52ff) !important;
  color: white !important;
  border: none !important;
  padding: 12px 20px !important;
  border-radius: 8px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3) !important;
  margin-bottom: 15px !important;
}

.addTextButton:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(108, 99, 255, 0.4) !important;
  background: linear-gradient(135deg, #5a52ff, #4c46ff) !important;
}

.addTextButton:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 10px rgba(108, 99, 255, 0.3) !important;
}
