﻿/* Sistema de Tarjetas Moderno para el Launcher */

/* Ocultar el sistema de tarjetas anterior */
.tools-grid {
  display: none !important;
}

.tool-card {
  display: none !important;
}

/* Contenedor principal del launcher */
.launcher-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 12px;
  display: block !important;
  visibility: visible !important;
}

/* Grid de aplicaciones */
.launcher-apps-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(182px, 200px));
  gap: 18px;
  justify-content: center;
  visibility: visible !important;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 12px;
}

/* Tarjeta individual de aplicación */
.launcher-app-item {
  width: 100%;
  aspect-ratio: 1;
  min-width: 0;
  max-width: 200px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 17px;
  transition: transform 0.3s ease;
  cursor: pointer;
  position: relative;
}

.launcher-app-item:hover {
  /* Efecto hover removido para evitar animación de respiración */
}

/* Link de la aplicación */
.launcher-app-link {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 20px;
  background-color: #121212;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 17px;
  box-sizing: border-box;
}

.launcher-app-link:hover,
.launcher-app-link:hover .launcher-app-description {
  text-decoration: none;
  color: #FFF;
}

.launcher-app-link:hover .launcher-app-bg {
  transform: scale(10);
}

/* Fondo animado circular */
.launcher-app-bg {
  height: 100px;
  width: 100px;
  background-color: #f9b234;
  z-index: 1;
  position: absolute;
  top: -50px;
  right: -50px;
  border-radius: 50%;
  transition: all 1.67s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Contenido de la tarjeta */
.launcher-app-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Badge de acceso - Estilos para indicar permisos requeridos */
.app-access-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: badgePulse 2s infinite;
}

/* Badge para usuarios registrados */
.app-access-badge.registered {
  background: linear-gradient(135deg, rgba(34, 139, 34, 0.9), rgba(50, 205, 50, 0.8));
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Badge para usuarios premium */
.app-access-badge.premium {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.9), rgba(255, 140, 0, 0.8));
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Badge para aplicaciones gratuitas (opcional) */
.app-access-badge.free {
  background: linear-gradient(135deg, rgba(0, 128, 0, 0.9), rgba(46, 204, 113, 0.8));
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Animación sutil para los badges */
@keyframes badgePulse {
  0%, 100% { 
    opacity: 1; 
    transform: scale(1); 
  }
  50% { 
    opacity: 0.8; 
    transform: scale(0.98); 
  }
}

/* Icono de la aplicación */
.launcher-app-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  z-index: 2;
  position: relative;
  display: block;
}

/* Título de la aplicación */
.launcher-app-title {
  min-height: 36px;
  margin: 0 0 8px;
  overflow: hidden;
  font-weight: bold;
  font-size: 15px;
  color: #FFF;
  z-index: 2;
  position: relative;
  line-height: 1.2;
}

/* Descripción de la aplicación */
.launcher-app-description {
  font-size: 11px;
  color: #FFF;
  z-index: 2;
  position: relative;
  opacity: 0.8;
  line-height: 1.4;
  margin-bottom: 8px;
}

.launcher-app-category {
  font-weight: bold;
  color: #f9b234;
  transition: color 0.5s ease;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: auto;
  z-index: 2;
  position: relative;
}

/* Colores específicos para diferentes aplicaciones */
.launcher-app-item:nth-child(1) .launcher-app-bg { background-color: #f9b234; }
.launcher-app-item:nth-child(2) .launcher-app-bg { background-color: #3ecd5e; }
.launcher-app-item:nth-child(3) .launcher-app-bg { background-color: #e44002; }
.launcher-app-item:nth-child(4) .launcher-app-bg { background-color: #952aff; }
.launcher-app-item:nth-child(5) .launcher-app-bg { background-color: #cd3e94; }
.launcher-app-item:nth-child(6) .launcher-app-bg { background-color: #4c49ea; }
.launcher-app-item:nth-child(7) .launcher-app-bg { background-color: #ff6b35; }
.launcher-app-item:nth-child(8) .launcher-app-bg { background-color: #00d4aa; }
.launcher-app-item:nth-child(9) .launcher-app-bg { background-color: #ff4757; }
.launcher-app-item:nth-child(10) .launcher-app-bg { background-color: #5352ed; }

/* Estilo especial para tarjeta roja - APLICACIÓN INICIO */
.launcher-app-item.red .launcher-app-bg {
  background-color: #e53e3e !important;
}

.launcher-app-item.red .launcher-app-category {
  color: #ff6b6b !important;
}

/* Mini selector de temas en la tarjeta de configuración */
.launcher-app-item .mini-theme-selector {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 3;
}

.launcher-app-item .mini-theme-btn {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 12px;
  transition: transform 0.2s ease;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.launcher-app-item .mini-theme-btn:hover {
  transform: scale(1.1);
}

.launcher-app-item .mini-theme-btn.active {
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Responsive Design */
@media only screen and (max-width: 1200px) {
  .launcher-apps-grid {
    grid-template-columns: repeat(auto-fit, minmax(164px, 182px));
  }
  .launcher-app-item {
    max-width: 182px;
  }
  
  /* Ajustes para badges en pantallas medianas */
  .app-access-badge {
    top: 6px;
    right: 6px;
    padding: 3px 6px;
    font-size: 9px;
  }
}

@media only screen and (max-width: 979px) {
  .launcher-apps-grid {
    grid-template-columns: repeat(auto-fit, minmax(146px, 164px));
  }
  .launcher-app-item {
    max-width: 164px;
  }
  .launcher-app-icon {
    font-size: 1.6rem;
  }
  .launcher-app-title {
    font-size: 13px;
  }
}

@media only screen and (max-width: 767px) {
  .launcher-container {
    width: 96%;
    padding: 18px 6px;
  }
  
  .launcher-apps-grid {
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(127px, 146px));
    padding: 0 6px;
  }
  .launcher-app-item {
    max-width: 146px;
  }
  .launcher-app-icon {
    font-size: 1.4rem;
  }
  .launcher-app-title {
    font-size: 12px;
  }
  
  /* Ajustes para badges en móviles */
  .app-access-badge {
    top: 4px;
    right: 4px;
    padding: 2px 4px;
    font-size: 8px;
    border-radius: 4px;
  }
  }
  
@media only screen and (max-width: 639px) {
  .launcher-apps-grid {
    grid-template-columns: minmax(182px, 200px);
  }
  .launcher-app-item {
    max-width: 200px;
  }
}

@media only screen and (max-width: 500px) {
  .launcher-apps-grid {
    grid-template-columns: minmax(136px, 150px);
  }
  .launcher-app-item {
    max-width: 150px;
  }
  .launcher-app-link {
    padding: 15px;
  }
  .launcher-app-icon {
    font-size: 1.2rem;
    margin-bottom: 9px;
  }
  .launcher-app-title {
    font-size: 11px;
    min-height: 27px;
    margin-bottom: 6px;
  }
  .launcher-app-description {
    font-size: 9px;
    margin-bottom: 6px;
  }
  .launcher-app-category {
    font-size: 8px;
  }
  .launcher-app-bg {
    height: 75px;
    width: 75px;
    top: -37px;
    right: -37px;
  }
}

/* Animaciones de entrada removidas - las tarjetas aparecen inmediatamente */ 

/* ================================
   LIQUID GLASS EFFECT - TARJETAS LAUNCHER TEMA LIGHT
   ================================ */

/* Tarjetas del launcher en tema light con efecto Liquid Glass */
body.theme-light .launcher-app-item {
  /* Base del contenedor con vidrio líquido */
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 20px !important;
  box-shadow: 
    0 8px 32px rgba(31, 38, 135, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.05) !important;
  overflow: hidden;
  position: relative;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Link interno de la tarjeta con efecto glass */
body.theme-light .launcher-app-link {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(15px) saturate(120%);
  -webkit-backdrop-filter: blur(15px) saturate(120%);
  border: none !important;
  border-radius: 18px !important;
  padding: 20px 16px !important;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

/* Efecto de brillo ambiental para las tarjetas */
body.theme-light .launcher-app-item::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(79, 188, 255, 0.05) 30%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 0;
}

/* Efectos hover para las tarjetas */
body.theme-light .launcher-app-item:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  transform: translateY(-5px) scale(1.02) !important;
  box-shadow: 
    0 16px 48px rgba(31, 38, 135, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(255, 255, 255, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.1) !important;
}

/* Activar brillo ambiental en hover */
body.theme-light .launcher-app-item:hover::before {
  opacity: 1;
}

/* Hover para el link interno */
body.theme-light .launcher-app-link:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(255, 255, 255, 0.15) !important;
  transform: none !important;
}

/* Fondo circular animado con efecto glass */
body.theme-light .launcher-app-bg {
  background: linear-gradient(135deg, 
    rgba(79, 188, 255, 0.8),
    rgba(31, 81, 255, 0.9)
  ) !important;
  box-shadow: 
    0 8px 32px rgba(79, 188, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  border-radius: 50%;
  transition: all 1.67s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Efectos específicos para cada color de fondo en tema light */
body.theme-light .launcher-app-item:nth-child(1) .launcher-app-bg { 
  background: linear-gradient(135deg, rgba(249, 178, 52, 0.8), rgba(255, 193, 7, 0.9)) !important;
  box-shadow: 0 8px 32px rgba(249, 178, 52, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}
body.theme-light .launcher-app-item:nth-child(2) .launcher-app-bg { 
  background: linear-gradient(135deg, rgba(62, 205, 94, 0.8), rgba(40, 167, 69, 0.9)) !important;
  box-shadow: 0 8px 32px rgba(62, 205, 94, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}
body.theme-light .launcher-app-item:nth-child(3) .launcher-app-bg { 
  background: linear-gradient(135deg, rgba(228, 64, 2, 0.8), rgba(220, 53, 69, 0.9)) !important;
  box-shadow: 0 8px 32px rgba(228, 64, 2, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}
body.theme-light .launcher-app-item:nth-child(4) .launcher-app-bg { 
  background: linear-gradient(135deg, rgba(149, 42, 255, 0.8), rgba(138, 43, 226, 0.9)) !important;
  box-shadow: 0 8px 32px rgba(149, 42, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}
body.theme-light .launcher-app-item:nth-child(5) .launcher-app-bg { 
  background: linear-gradient(135deg, rgba(205, 62, 148, 0.8), rgba(232, 62, 140, 0.9)) !important;
  box-shadow: 0 8px 32px rgba(205, 62, 148, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}
body.theme-light .launcher-app-item:nth-child(6) .launcher-app-bg { 
  background: linear-gradient(135deg, rgba(76, 73, 234, 0.8), rgba(102, 126, 234, 0.9)) !important;
  box-shadow: 0 8px 32px rgba(76, 73, 234, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}
body.theme-light .launcher-app-item:nth-child(7) .launcher-app-bg { 
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.8), rgba(255, 99, 71, 0.9)) !important;
  box-shadow: 0 8px 32px rgba(255, 107, 53, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}
body.theme-light .launcher-app-item:nth-child(8) .launcher-app-bg { 
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.8), rgba(32, 201, 151, 0.9)) !important;
  box-shadow: 0 8px 32px rgba(0, 212, 170, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}
body.theme-light .launcher-app-item:nth-child(9) .launcher-app-bg { 
  background: linear-gradient(135deg, rgba(255, 71, 87, 0.8), rgba(255, 99, 132, 0.9)) !important;
  box-shadow: 0 8px 32px rgba(255, 71, 87, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}
body.theme-light .launcher-app-item:nth-child(10) .launcher-app-bg { 
  background: linear-gradient(135deg, rgba(83, 82, 237, 0.8), rgba(116, 115, 252, 0.9)) !important;
  box-shadow: 0 8px 32px rgba(83, 82, 237, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

/* Estilo especial para tarjeta roja en tema light - APLICACIÓN INICIO */
body.theme-light .launcher-app-item.red .launcher-app-bg {
  background: linear-gradient(135deg, rgba(229, 62, 62, 0.8), rgba(255, 107, 107, 0.9)) !important;
  box-shadow: 0 8px 32px rgba(229, 62, 62, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

body.theme-light .launcher-app-item.red .launcher-app-category {
  color: rgba(139, 69, 19, 0.8) !important;
}

/* Textos con mejor contraste en tema light */
body.theme-light .launcher-app-title {
  color: rgba(55, 65, 81, 0.95) !important;
  font-weight: 600 !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
  z-index: 3;
}

body.theme-light .launcher-app-description {
  color: rgba(75, 85, 99, 0.8) !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
  z-index: 3;
}

body.theme-light .launcher-app-category {
  color: rgba(55, 65, 81, 0.7) !important;
  font-weight: 500 !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.4);
  z-index: 3;
}

body.theme-light .launcher-app-icon {
  filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.3));
  z-index: 3;
}

/* Estilos específicos para badges en tema claro */
body.theme-light .app-access-badge {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.theme-light .app-access-badge.registered {
  background: linear-gradient(135deg, rgba(34, 139, 34, 0.95), rgba(50, 205, 50, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

body.theme-light .app-access-badge.premium {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.95), rgba(255, 140, 0, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

body.theme-light .app-access-badge.free {
  background: linear-gradient(135deg, rgba(0, 128, 0, 0.95), rgba(46, 204, 113, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Selector de temas mini con liquid glass */
body.theme-light .launcher-app-item .mini-theme-btn {
  background: rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 
    0 4px 16px rgba(31, 38, 135, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

body.theme-light .launcher-app-item .mini-theme-btn:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  transform: scale(1.1);
  box-shadow: 
    0 6px 20px rgba(31, 38, 135, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

body.theme-light .launcher-app-item .mini-theme-btn.active {
  background: rgba(79, 188, 255, 0.3) !important;
  border-color: rgba(79, 188, 255, 0.5) !important;
  transform: scale(1.2);
  box-shadow: 
    0 0 20px rgba(79, 188, 255, 0.4),
    0 8px 24px rgba(31, 38, 135, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

/* Responsive adjustments para tarjetas light */
@media only screen and (max-width: 1200px) {
  body.theme-light .launcher-app-item {
    border-radius: 18px !important;
  }
  
  body.theme-light .launcher-app-link {
    border-radius: 16px !important;
    padding: 18px 15px !important;
  }
}

@media only screen and (max-width: 979px) {
  body.theme-light .launcher-app-item {
    border-radius: 16px !important;
  }
  
  body.theme-light .launcher-app-link {
    border-radius: 14px !important;
    padding: 16px 14px !important;
  }
}

@media only screen and (max-width: 767px) {
  body.theme-light .launcher-app-item {
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-radius: 14px !important;
  }
  
  body.theme-light .launcher-app-link {
    backdrop-filter: blur(12px) saturate(110%);
    -webkit-backdrop-filter: blur(12px) saturate(110%);
    border-radius: 12px !important;
  }
}

@media only screen and (max-width: 639px) {
  body.theme-light .launcher-app-item {
    border-radius: 12px !important;
    max-width: none;
  }
  
  body.theme-light .launcher-app-link {
    border-radius: 10px !important;
    padding: 15px 12px !important;
  }
}

@media only screen and (max-width: 500px) {
  body.theme-light .launcher-app-item {
    border-radius: 10px !important;
    max-width: none;
    min-width: 140px;
  }
  
  body.theme-light .launcher-app-link {
    border-radius: 8px !important;
    padding: 12px 10px !important;
  }
  
  body.theme-light .launcher-app-icon {
    font-size: 1.2rem;
  }
  
  body.theme-light .launcher-app-title {
    font-size: 11px !important;
  }
  
  body.theme-light .launcher-app-description {
    font-size: 9px !important;
  }
  
  body.theme-light .launcher-app-category {
    font-size: 8px !important;
  }
}

/* Estado filtrado de las tarjetas */
.launcher-app-item.filtered-out {
    display: none;
}

/* Responsive Design */
@media only screen and (max-width: 1200px) {
    .launcher-apps-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
    }
}

@media only screen and (max-width: 979px) {
    .launcher-apps-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 260px));
    }
}

@media only screen and (max-width: 767px) {
    .launcher-container {
        width: 96%;
        padding: 18px 6px;
    }
    
    .launcher-apps-grid {
        gap: 12px;
        grid-template-columns: repeat(auto-fit, minmax(180px, 240px));
        padding: 0 6px;
    }
}

@media only screen and (max-width: 639px) {
    .launcher-apps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-width: 100%;
    }
    .launcher-app-item {
        max-width: none;
    }
}

@media only screen and (max-width: 500px) {
    .launcher-apps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        max-width: 100%;
        padding: 0 8px;
    }
    .launcher-app-item {
        max-width: none;
        min-width: 140px;
  }
}

/* ================================
   LIQUID GLASS EFFECT - TARJETAS LAUNCHER TEMA DARK
   ================================ */

/* Tarjetas del launcher en tema dark con efecto Liquid Glass */
body:not(.theme-light) .launcher-app-item {
  /* Base del contenedor con vidrio líquido para tema oscuro */
  background: rgba(0, 0, 0, 0.25) !important;
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 20px !important;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(255, 255, 255, 0.02) !important;
  overflow: hidden;
  position: relative;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Link interno de la tarjeta con efecto glass para tema oscuro */
body:not(.theme-light) .launcher-app-link {
  background: rgba(0, 0, 0, 0.15) !important;
  backdrop-filter: blur(15px) saturate(120%);
  -webkit-backdrop-filter: blur(15px) saturate(120%);
  border: none !important;
  border-radius: 18px !important;
  padding: 20px 16px !important;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

/* Efecto de brillo ambiental para las tarjetas en tema oscuro */
body:not(.theme-light) .launcher-app-item::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(79, 188, 255, 0.02) 30%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 0;
}

/* Efectos hover para las tarjetas en tema oscuro */
body:not(.theme-light) .launcher-app-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-5px) scale(1.02) !important;
  box-shadow: 
    0 16px 48px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.05) !important;
}

/* Activar brillo ambiental en hover para tema oscuro */
body:not(.theme-light) .launcher-app-item:hover::before {
  opacity: 1;
}

/* Hover para el link interno en tema oscuro */
body:not(.theme-light) .launcher-app-link:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06) !important;
  transform: none !important;
}

/* Fondo circular animado con efecto glass para tema oscuro */
body:not(.theme-light) .launcher-app-bg {
  background: linear-gradient(135deg, 
    rgba(79, 188, 255, 0.6),
    rgba(31, 81, 255, 0.7)
  ) !important;
  box-shadow: 
    0 8px 32px rgba(79, 188, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  border-radius: 50%;
  transition: all 1.67s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Efectos específicos para cada color de fondo en tema oscuro */
body:not(.theme-light) .launcher-app-item:nth-child(1) .launcher-app-bg { 
  background: linear-gradient(135deg, rgba(249, 178, 52, 0.6), rgba(255, 193, 7, 0.7)) !important;
  box-shadow: 0 8px 32px rgba(249, 178, 52, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}
body:not(.theme-light) .launcher-app-item:nth-child(2) .launcher-app-bg { 
  background: linear-gradient(135deg, rgba(62, 205, 94, 0.6), rgba(40, 167, 69, 0.7)) !important;
  box-shadow: 0 8px 32px rgba(62, 205, 94, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}
body:not(.theme-light) .launcher-app-item:nth-child(3) .launcher-app-bg { 
  background: linear-gradient(135deg, rgba(228, 64, 2, 0.6), rgba(220, 53, 69, 0.7)) !important;
  box-shadow: 0 8px 32px rgba(228, 64, 2, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}
body:not(.theme-light) .launcher-app-item:nth-child(4) .launcher-app-bg { 
  background: linear-gradient(135deg, rgba(149, 42, 255, 0.6), rgba(138, 43, 226, 0.7)) !important;
  box-shadow: 0 8px 32px rgba(149, 42, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}
body:not(.theme-light) .launcher-app-item:nth-child(5) .launcher-app-bg { 
  background: linear-gradient(135deg, rgba(205, 62, 148, 0.6), rgba(232, 62, 140, 0.7)) !important;
  box-shadow: 0 8px 32px rgba(205, 62, 148, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}
body:not(.theme-light) .launcher-app-item:nth-child(6) .launcher-app-bg { 
  background: linear-gradient(135deg, rgba(76, 73, 234, 0.6), rgba(102, 126, 234, 0.7)) !important;
  box-shadow: 0 8px 32px rgba(76, 73, 234, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}
body:not(.theme-light) .launcher-app-item:nth-child(7) .launcher-app-bg { 
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.6), rgba(255, 99, 71, 0.7)) !important;
  box-shadow: 0 8px 32px rgba(255, 107, 53, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}
body:not(.theme-light) .launcher-app-item:nth-child(8) .launcher-app-bg { 
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.6), rgba(32, 201, 151, 0.7)) !important;
  box-shadow: 0 8px 32px rgba(0, 212, 170, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}
body:not(.theme-light) .launcher-app-item:nth-child(9) .launcher-app-bg { 
  background: linear-gradient(135deg, rgba(255, 71, 87, 0.6), rgba(255, 99, 132, 0.7)) !important;
  box-shadow: 0 8px 32px rgba(255, 71, 87, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}
body:not(.theme-light) .launcher-app-item:nth-child(10) .launcher-app-bg { 
  background: linear-gradient(135deg, rgba(83, 82, 237, 0.6), rgba(116, 115, 252, 0.7)) !important;
  box-shadow: 0 8px 32px rgba(83, 82, 237, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

/* Estilo especial para tarjeta roja en tema oscuro - APLICACIÓN INICIO */
body:not(.theme-light) .launcher-app-item.red .launcher-app-bg {
  background: linear-gradient(135deg, rgba(229, 62, 62, 0.6), rgba(255, 107, 107, 0.7)) !important;
  box-shadow: 0 8px 32px rgba(229, 62, 62, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

body:not(.theme-light) .launcher-app-item.red .launcher-app-category {
  color: rgba(255, 107, 107, 0.9) !important;
}

/* Textos con mejor contraste en tema oscuro */
body:not(.theme-light) .launcher-app-title {
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 600 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  z-index: 3;
}

body:not(.theme-light) .launcher-app-description {
  color: rgba(255, 255, 255, 0.75) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  z-index: 3;
}

body:not(.theme-light) .launcher-app-category {
  color: rgba(255, 255, 255, 0.6) !important;
  font-weight: 500 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  z-index: 3;
}

body:not(.theme-light) .launcher-app-icon {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  z-index: 3;
}

/* Estilos específicos para badges en tema oscuro */
body:not(.theme-light) .app-access-badge {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body:not(.theme-light) .app-access-badge.registered {
  background: linear-gradient(135deg, rgba(34, 139, 34, 0.9), rgba(50, 205, 50, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

body:not(.theme-light) .app-access-badge.premium {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.9), rgba(255, 140, 0, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

body:not(.theme-light) .app-access-badge.free {
  background: linear-gradient(135deg, rgba(0, 128, 0, 0.9), rgba(46, 204, 113, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Selector de temas mini con liquid glass para tema oscuro */
body:not(.theme-light) .launcher-app-item .mini-theme-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

body:not(.theme-light) .launcher-app-item .mini-theme-btn:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  transform: scale(1.1);
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

body:not(.theme-light) .launcher-app-item .mini-theme-btn.active {
  background: rgba(79, 188, 255, 0.2) !important;
  border-color: rgba(79, 188, 255, 0.3) !important;
  transform: scale(1.2);
  box-shadow: 
    0 0 20px rgba(79, 188, 255, 0.3),
    0 8px 24px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

/* Responsive adjustments para tarjetas dark */
@media only screen and (max-width: 1200px) {
  body:not(.theme-light) .launcher-app-item {
    border-radius: 18px !important;
  }
  
  body:not(.theme-light) .launcher-app-link {
    border-radius: 16px !important;
    padding: 18px 15px !important;
  }
}

@media only screen and (max-width: 979px) {
  body:not(.theme-light) .launcher-app-item {
    border-radius: 16px !important;
  }
  
  body:not(.theme-light) .launcher-app-link {
    border-radius: 14px !important;
    padding: 16px 14px !important;
  }
}

@media only screen and (max-width: 767px) {
  body:not(.theme-light) .launcher-app-item {
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-radius: 14px !important;
  }
  
  body:not(.theme-light) .launcher-app-link {
    backdrop-filter: blur(12px) saturate(110%);
    -webkit-backdrop-filter: blur(12px) saturate(110%);
    border-radius: 12px !important;
  }
}

@media only screen and (max-width: 639px) {
  body:not(.theme-light) .launcher-app-item {
    border-radius: 12px !important;
    max-width: none;
  }
  
  body:not(.theme-light) .launcher-app-link {
    border-radius: 10px !important;
    padding: 15px 12px !important;
  }
}

@media only screen and (max-width: 500px) {
  body:not(.theme-light) .launcher-app-item {
    border-radius: 10px !important;
    max-width: none;
    min-width: 140px;
  }
  
  body:not(.theme-light) .launcher-app-link {
    border-radius: 8px !important;
    padding: 12px 10px !important;
  }
  
  body:not(.theme-light) .launcher-app-icon {
    font-size: 1.2rem;
  }
  
  body:not(.theme-light) .launcher-app-title {
    font-size: 11px !important;
  }
  
  body:not(.theme-light) .launcher-app-description {
    font-size: 9px !important;
  }
  
  body:not(.theme-light) .launcher-app-category {
    font-size: 8px !important;
  }
}

.theme-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 1rem;
    border-top: 1px solid rgba(var(--border-rgb), 0.1);
    background: rgba(var(--bg-rgb), 0.05);
}

.theme-btn {
    background: rgba(var(--bg-rgb), 0.1);
    border: 1px solid rgba(var(--border-rgb), 0.1);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0.7;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.theme-btn:hover {
    transform: scale(1.2);
    opacity: 1;
    background: rgba(var(--bg-rgb), 0.2);
    border-color: rgba(var(--border-rgb), 0.2);
}

.theme-btn.active {
    opacity: 1;
    transform: scale(1.1);
    background: rgba(var(--accent-rgb), 0.2);
    border-color: rgba(var(--accent-rgb), 0.3);
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.3);
}

/* Estilos específicos para la tarjeta de créditos */
.launcher-app-item[data-app="creditos"] {
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    background-color: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.launcher-app-item[data-app="creditos"] .launcher-app-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    z-index: 1;
}

.launcher-app-item[data-app="creditos"] .launcher-app-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
}

/* Ajuste para el hover de la tarjeta */
.launcher-app-item[data-app="creditos"]:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.launcher-app-item[data-app="creditos"]:hover .theme-buttons {
    opacity: 1;
    transform: translateY(0);
}

/* Estilos específicos para la aplicación Timer */
.launcher-app-item[data-app="timer"] {
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    background-color: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.launcher-app-item[data-app="timer"] .launcher-app-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.9;
    transition: all 0.3s ease;
}

.launcher-app-item[data-app="timer"]:hover .launcher-app-bg {
    opacity: 1;
    transform: scale(1.05);
}

/* Tema claro para Timer */
body.theme-light .launcher-app-item[data-app="timer"] .launcher-app-bg {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    opacity: 0.8;
}

body.theme-light .launcher-app-item[data-app="timer"]:hover .launcher-app-bg {
    opacity: 1;
    transform: scale(1.05);
}

/* Tema rosa para Timer */
body.theme-rosa .launcher-app-item[data-app="timer"] .launcher-app-bg {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    opacity: 0.9;
}

/* Tema neon para Timer */
body.theme-neon .launcher-app-item[data-app="timer"] .launcher-app-bg {
    background: linear-gradient(135deg, #00ffff 0%, #ff00ff 100%);
    opacity: 0.8;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

body.theme-neon .launcher-app-item[data-app="timer"]:hover .launcher-app-bg {
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}

/* ================================
   ANIMACIÓN DE ENTRADA ESTILO iOS
   ================================ */

/* Estado inicial oculto de las tarjetas */
.launcher-app-item.app-icon {
  opacity: 0;
  transform: translateY(30px) scale(0.8);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: opacity, transform;
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Estado final visible de las tarjetas */
.launcher-app-item.app-icon.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Animación de entrada del grid completo */
.launcher-apps-grid.initializing {
  opacity: 0;
}

.launcher-apps-grid.loaded {
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

/* Responsive adjustments para la animación */
@media (max-width: 768px) {
  .launcher-app-item.app-icon {
    transition-duration: 0.5s;
  }
}

@media (max-width: 480px) {
  .launcher-app-item.app-icon {
    transition-duration: 0.4s;
  }
}

/* Animación reducida para usuarios con preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  .launcher-app-item.app-icon {
    transition-duration: 0.2s;
    transform: translateY(10px) scale(0.95);
  }
  
  .launcher-app-item.app-icon.show {
    transform: translateY(0) scale(1);
  }
}