@font-face {
  font-family: "KiaSignature";
  src: url("KiaSignatureOTFRegular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "KiaSignature";
  src: url("KiaSignatureOTFBold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "KiaSignature";
  src: url("KiaSignatureOTFLight.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
html,
body {
  height: 100%;
  margin: 0;
  font-family: "KiaSignature", "Inter", sans-serif;
  background: #212121;
  color: white;
  overflow: hidden;
}

/* app */
#app {
  height: 100%;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}

.app-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.app-content::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 0;
}

.app-content > * {
  position: relative;
  z-index: 1;
}

/* pantalla genérica con fondo */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  /* background-position: center;
  background-size: cover;
  background-repeat: no-repeat; */
}

/* .screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 0;
}

.screen > * {
  position: relative;
  z-index: 1;
} */

/* ========================================
   LOGIN SCREEN
   ======================================== */

/* Contenido del login - centrado vertical y horizontal */
.screen .content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-bottom: 80px; /* Espacio para el footer */
  position: relative;
  z-index: 1;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

.screen .content h1 {
  font-size: 28px;
  font-weight: 500;
  text-align: center;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  margin: 0 0 24px 0;
  line-height: 1.3;
}

/* ========================================
   MENU SCREEN
   ======================================== */

.title-bar {
  flex-shrink: 0;
  padding: 70px 20px 30px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.title-bar h2 {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  margin: 0;
}

/* Botones superiores (Home y Atrás) */
.top-btn {
  position: absolute;
  top: 22px;
  background: transparent;
  border: none;
  padding: 6px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 120ms ease;
}

.top-btn.left { left: 16px; }
.top-btn.right { right: 16px; }

.top-btn:hover { background: rgba(255, 255, 255, 0.08); }
.top-btn:active { background: rgba(255, 255, 255, 0.16); }

/* ========================================
   SISTEMA DE COLUMNAS DINÁMICAS
   ======================================== */

/* contenedor de botones con grid adaptable */
.menu-list {
  display: grid;
  gap: 14px;
  width: 100%;
  max-height: 68vh;
  padding: 10px;
  padding-bottom: calc(
    10px + env(safe-area-inset-bottom)
  ); /* safe-area para tablets con notch */

  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden; /* evitar scroll horizontal */
  scrollbar-gutter: stable; /* reservar espacio para scrollbar siempre */
}

/* MÓVIL (por defecto): Todos los items en 1 columna */
.menu-list {
  grid-template-columns: 1fr;
  max-width: 380px;
  margin: 0 auto;
}

/* TABLETS (≥600px): 2 columnas para 5+ items */
@media (min-width: 600px) {
  /* 5-8 items: 2 columnas */
  .menu-list[data-items="5"],
  .menu-list[data-items="6"],
  .menu-list[data-items="7"],
  .menu-list[data-items="8"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 680px;
  }

  /* 9+ items: 2 columnas */
  .menu-list[data-items="9"],
  .menu-list[data-items="10"],
  .menu-list[data-items="11"],
  .menu-list[data-items="12"],
  .menu-list[data-items="13"],
  .menu-list[data-items="14"],
  .menu-list[data-items="15"],
  .menu-list[data-items="16"],
  .menu-list[data-items="17"],
  .menu-list[data-items="18"],
  .menu-list[data-items="19"],
  .menu-list[data-items="20"],
  .menu-list[data-items="21"],
  .menu-list[data-items="22"],
  .menu-list[data-items="23"],
  .menu-list[data-items="24"],
  .menu-list[data-items="25"],
  .menu-list[data-items="26"],
  .menu-list[data-items="27"],
  .menu-list[data-items="28"],
  .menu-list[data-items="29"],
  .menu-list[data-items="30"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 720px;
  }
}

/* DESKTOP (≥768px): 3 columnas para 9+ items */
@media (min-width: 768px) {
  .menu-list[data-items="9"],
  .menu-list[data-items="10"],
  .menu-list[data-items="11"],
  .menu-list[data-items="12"],
  .menu-list[data-items="13"],
  .menu-list[data-items="14"],
  .menu-list[data-items="15"],
  .menu-list[data-items="16"],
  .menu-list[data-items="17"],
  .menu-list[data-items="18"],
  .menu-list[data-items="19"],
  .menu-list[data-items="20"],
  .menu-list[data-items="21"],
  .menu-list[data-items="22"],
  .menu-list[data-items="23"],
  .menu-list[data-items="24"],
  .menu-list[data-items="25"],
  .menu-list[data-items="26"],
  .menu-list[data-items="27"],
  .menu-list[data-items="28"],
  .menu-list[data-items="29"],
  .menu-list[data-items="30"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 950px;
  }
}

/* Menu Buttons */
/* .menu-button {
  background: white;
  color: #1a1a2e;
  border: none;
  border-radius: 25px;
  padding: 16px 28px;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  width: 100%;
  min-height: 52px;
} */
.menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: white;
  font-family: "KiaSignature", "Inter", sans-serif;
  color: #000;
  border: none;
  border-radius: 25px;
  padding: 16px 28px;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  transition: box-shadow 180ms ease, background 120ms ease, transform 120ms ease;
  text-align: center;
  white-space: normal; /* permitir texto en múltiples líneas */
  word-wrap: break-word; /* romper palabras largas si es necesario */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  width: 100%;
  min-width: 0; /* permitir que el botón sea más pequeño que su contenido */
  min-height: 52px;
  box-sizing: border-box; /* asegurar cálculo correcto del padding */
  transform-origin: center center; /* evita desplazamiento extraño al escalar */
  will-change: transform, box-shadow; /* hint al navegador para mejores animaciones */
  -webkit-tap-highlight-color: transparent; /* limpieza visual en touch */
  touch-action: manipulation; /* mejora respuesta táctil */
}

.menu-button:active {
  filter: brightness(0.92);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
}

/* Footer */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 20px 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  pointer-events: none;
}

footer img {
  height: 30px;
  width: auto;
  object-fit: cover;
  opacity: 0.95;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

/* Custom Scrollbar */
.content::-webkit-scrollbar,
.menu-list::-webkit-scrollbar {
  width: 8px;
}

.content::-webkit-scrollbar-track,
.menu-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.content::-webkit-scrollbar-thumb,
.menu-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.content::-webkit-scrollbar-thumb:hover,
.menu-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ========================================
   LANDSCAPE WARNING
   ======================================== */

.landscape-warning {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.95);
  z-index: 100;
  padding: 20px;
  text-align: center;
}

.landscape-icon {
  font-size: 80px;
  margin-bottom: 20px;
  animation: rotate-phone 2s ease-in-out infinite;
}

@keyframes rotate-phone {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(90deg);
  }
}

.landscape-warning p {
  font-size: 18px;
  color: white;
  max-width: 300px;
  line-height: 1.5;
  margin: 0;
}

/* transición fade (para <transition name="fade">) */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.5s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablets en portrait */
@media (min-width: 600px) and (max-width: 1024px) {
  .screen .content h1 {
    font-size: 32px;
  }

  .title-bar h2 {
    font-size: 24px;
  }

  .menu-button {
    font-size: 18px;
    padding: 18px 30px;
    min-height: 56px;
  }
}

/* Móviles pequeños */
@media (max-width: 480px) {
  .screen .content {
    padding-bottom: 100px; /* Menos espacio en móviles */
  }

  .title-bar {
    padding: 40px 20px 20px;
  }

  .title-bar h2 {
    font-size: 18px;
  }

  .screen .content h1 {
    font-size: 24px;
    margin-bottom: 20px;
  }

  .menu-button {
    font-size: 15px;
    padding: 14px 24px;
    min-height: 48px;
  }

  .menu-list {
    gap: 12px;
  }

  footer {
    padding: 20px 20px 40px;
  }
}

/* Pantallas muy cortas */
@media (max-height: 700px) {
  .title-bar {
    padding: 30px 20px 15px;
  }

  .title-bar h2 {
    font-size: 18px;
  }

  .menu-list {
    gap: 10px;
  }

  .menu-button {
    font-size: 14px;
    padding: 12px 20px;
    min-height: 44px;
  }

  footer {
    padding: 15px 20px 30px;
  }
}

/* Para tablets en landscape */
/* @media (min-width: 768px) and (max-height: 500px) {
  .screen .content {
    padding-bottom: 120px;
  }

  .title-bar {
    padding: 20px;
  }

  .menu-list {
    max-height: 40vh;
  }

  footer {
    padding: 10px 20px 20px;
  }
} */
