/* ==========================================================================
   PORTAL DE APLICACIONES - LANZADOR MINIMALISTA Y COMPACTO
   ========================================================================== */

:root {
  --bg: #0b0f17;
  --card-bg: rgba(22, 28, 42, 0.7);
  --card-hover: rgba(30, 41, 64, 0.95);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(99, 102, 241, 0.5);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #6366f1;
  --radius: 16px;
  --radius-img: 12px;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  background-image: 
    radial-gradient(circle at 50% -20%, rgba(99, 102, 241, 0.15), transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.08), transparent 50%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

/* Contenedor central compacto (cabe entero en 1 pantalla) */
.portal-container {
  width: 100%;
  max-width: 1220px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Cabecera limpia y directa */
.portal-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.portal-title {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 40%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.portal-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Cuadrícula de 8 proyectos (4 columnas x 2 filas) */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
}

/* Tarjeta / Botón de acceso directo */
.app-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  text-decoration: none;
  color: inherit;
  backdrop-filter: blur(12px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.22s ease,
              box-shadow 0.22s ease,
              background-color 0.22s ease;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.app-card:hover {
  transform: translateY(-4px);
  background: var(--card-hover);
  border-color: var(--border-hover);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.6), 0 0 20px rgba(99, 102, 241, 0.2);
}

/* Imagen miniatura compacta */
.card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-img);
  overflow: hidden;
  background: #000;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-card:hover .card-thumb img {
  transform: scale(1.05);
}

/* Icono de flecha de apertura */
.launch-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.app-card:hover .launch-badge {
  background: var(--accent);
  transform: scale(1.1);
}

/* Información de la app */
.card-info {
  padding: 0.75rem 0.35rem 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.app-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}

.app-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Pie discreto */
.portal-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  color: #475569;
}

/* Responsividad */
@media (max-width: 1080px) {
  .apps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .apps-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .portal-title {
    font-size: 1.6rem;
  }
  body {
    padding: 1rem;
  }
}
