@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

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

body {
  background: #000;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(28, 105, 168, 0.1) 1px, transparent 1px),
    radial-gradient(circle at 80% 70%, rgba(28, 105, 168, 0.1) 1px, transparent 1px),
    radial-gradient(circle at 40% 80%, rgba(28, 105, 168, 0.05) 1px, transparent 1px),
    linear-gradient(45deg, transparent 48%, rgba(28, 105, 168, 0.02) 49%, rgba(28, 105, 168, 0.02) 51%, transparent 52%),
    linear-gradient(-45deg, transparent 48%, rgba(28, 105, 168, 0.02) 49%, rgba(28, 105, 168, 0.02) 51%, transparent 52%);
  background-size: 100px 100px, 150px 150px, 200px 200px, 60px 60px, 60px 60px;
  color: #fff;
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

@media (min-width: 1200px) {
  .container {
    max-width: 1400px;
    padding: 2rem 2rem;
  }
}

@media (min-width: 1600px) {
  .container {
    max-width: 1600px;
    padding: 2rem 3rem;
  }
}

.header-glow {
  color: #1C69A8;
  font-weight: 700;
}

.card-glass, .card {
  background: #1C69A8;
  color: #fff;
  border-radius: 20px;
  box-shadow: 
    0 4px 12px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.1);
  padding: 20px;
  margin: 1rem 0;
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.3s ease;
}

.card-glass:hover, .card:hover {
  box-shadow: 
    0 8px 25px rgba(0,0,0,0.3),
    0 0 20px rgba(28, 105, 168, 0.4),
    0 0 30px rgba(28, 105, 168, 0.2),
    inset 0 1px 0 rgba(255,255,255,0.2);
  transform: translateY(-2px);
  background: #2374b9;
}

.btn-neon, button {
  background: #fff;
  color: #1C69A8;
  padding: 10px 18px;
  border-radius: 12px;
  border: 2px solid #fff;
  text-decoration: none;
  display: inline-block;
  font-family: 'Roboto', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  transition: 0.3s;
  cursor: pointer;
}

.btn-neon:hover, button:hover {
  background: #f0f8ff;
  color: #0d4f7c;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

@media (min-width: 900px) {
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .app-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1600px) {
  .app-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1400px;
    margin: 2rem auto;
  }
}

.app-card {
  background: #1C69A8;
  color: #fff;
  border-radius: 20px;
  box-shadow: 
    0 4px 12px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.1);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(255,255,255,0.1);
}

.app-card:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 8px 25px rgba(0,0,0,0.3),
    0 0 30px rgba(28, 105, 168, 0.5),
    inset 0 1px 0 rgba(255,255,255,0.2);
  background: #2374b9;
}

.app-card h3 {
  color: #fff;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.app-card p {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  color: #e6f3ff;
}

input, select, textarea {
  background: #fff;
  border: 2px solid #fff;
  color: #1C69A8;
  padding: 12px;
  border-radius: 8px;
  font-family: 'Roboto', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #f0f8ff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
  background: #f9fbff;
}

.param-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 600px) {
  .param-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 900px) {
  .param-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (min-width: 1200px) {
  .param-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

@media (max-width: 768px) {
  .header-glow {
    font-size: 1.8rem;
  }
  
  .container {
    padding: 0.5rem 0.5rem;
  }
  
  .app-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  
  /* Optimizar tarjetas de apps en móvil */
  .app-card {
    padding: 1rem;
    border-radius: 15px;
  }
  
  .app-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }
  
  .app-card p {
    font-size: 0.8rem;
    line-height: 1.3;
    margin-bottom: 0.8rem;
  }
  
  .app-card .btn-neon {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }
  
  .param-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Subtitulo más pequeño */
  .mobile-layout p[style*="font-size: 1.2rem"] {
    font-size: 0.9rem !important;
  }
  
  /* Espaciado compacto para navegación */
  .mobile-layout div[style*="display: flex; gap: 1rem"] {
    gap: 0.5rem !important;
    margin: 0.5rem 0 !important;
  }
  
  /* Mejorar tarjetas de apps en móvil */
  .mobile-layout .app-card {
    padding: 0.8rem;
    margin-bottom: 0.8rem;
  }
  
  .mobile-layout .app-card h3 {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
  }
  
  .mobile-layout .app-card p {
    font-size: 0.7rem;
    line-height: 1.3;
    margin-bottom: 0.6rem;
  }
  
  .mobile-layout .app-card .btn-neon {
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
  }
  
  .mobile-layout .app-card > div[style*="font-size: 3rem"] {
    font-size: 2rem !important;
    margin-bottom: 0.5rem !important;
  }
}

/* Ajustar tamaño del título según pantalla */
@media (max-width: 768px) {
  h1[style*="font-size: 5rem"] {
    font-size: 1.8rem !important;
  }
  
  /* Hacer el header móvil más compacto */
  .mobile-layout .card-glass {
    margin: 0 auto 1rem !important;
    padding: 1rem !important;
  }
  
  .mobile-layout .card-glass p {
    font-size: 0.7rem !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.2 !important;
  }
  
  /* Logo más pequeño en móvil */
  .mobile-layout img[alt="Profe Vale Logo"] {
    width: 60px !important;
    height: 60px !important;
  }
  
  /* Reducir espaciado entre elementos */
  .mobile-layout > div[style*="margin-bottom: 2rem"] {
    margin-bottom: 1rem !important;
  }
  
  /* Botones de navegación más pequeños */
  .mobile-layout .btn-neon {
    font-size: 0.7rem !important;
    padding: 6px 12px !important;
  }
}

@media (min-width: 769px) and (max-width: 1199px) {
  h1[style*="font-size: 5rem"] {
    font-size: 4rem !important;
  }
}

@media (min-width: 1200px) {
  h1[style*="font-size: 5rem"] {
    font-size: 5rem !important;
  }
}

@media (min-width: 1600px) {
  h1[style*="font-size: 5rem"] {
    font-size: 6rem !important;
  }
}

/* Estilos adicionales para texto en tarjetas azules */
.card h3, .card-glass h3 {
  color: #fff !important;
  font-weight: 600;
}

.card p, .card-glass p {
  color: #e6f3ff !important;
}

.card h4, .card-glass h4 {
  color: #fff !important;
  font-weight: 500;
}

.card ul, .card-glass ul {
  color: #e6f3ff !important;
}

.card strong, .card-glass strong {
  color: #fff !important;
}

/* Layout de 3 columnas para desktop */
.desktop-layout {
  display: none;
}

.mobile-layout {
  display: block;
}

@media (min-width: 1200px) {
  .desktop-layout {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 2rem;
    align-items: start;
    max-width: 1600px;
    margin: 0 auto;
  }
  
  .mobile-layout {
    display: none;
  }
  
  .sidebar-left, .sidebar-right {
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
  }
  
  .main-content {
    min-height: 100vh;
  }
  
  /* Ajustar grid de apps en el contenido central */
  .main-content .app-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 1400px) {
  .desktop-layout {
    grid-template-columns: 320px 1fr 320px;
  }
  
  .main-content .app-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Header compartido que abarca todo el ancho */
.shared-header {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 2rem;
}

/* Header compartido que abarca todo el ancho */
.shared-header {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 2rem;
}

/* Botón especial para cafecito */
.btn-neon[style*="background: linear-gradient"] {
  background: linear-gradient(45deg, #ff6b00, #ff8500) !important;
  color: white !important;
  border-color: #ff6b00 !important;
}

.btn-neon[style*="background: linear-gradient"]:hover {
  background: linear-gradient(45deg, #e55a00, #e57400) !important;
  color: white !important;
}

/* Estandarización de texto - todos los párrafos usan el tamaño de "bienvenidos" (1.1rem) */
/* Las reglas móviles anteriores seguirán aplicándose */
p {
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Los párrafos con font-size inline mantienen su tamaño específico */

/* Responsive global para todas las apps */
@media (max-width: 768px) {
  /* Forzar columna única en móvil para todos los grids */
  [style*="grid-template-columns"]:not(.control-grid):not(.app-grid) {
    grid-template-columns: 1fr !important;
  }
  
  /* Asegurar que flex wrap funcione en móvil */
  [style*="display: flex"]:not(.header) {
    flex-direction: column !important;
    gap: 1rem !important;
  }
  
  /* Control más específico para mobile */
  .container {
    padding: 1rem 0.5rem;
  }
  
  .card-glass, .card {
    padding: 1rem;
    margin: 0.5rem 0;
  }
}

@media (min-width: 769px) {
  /* Ocultar botones PWA en desktop - pero permitir instalación si el navegador lo soporta */
  #installSection {
    display: none !important;
  }
}
