/* KEVEO - Main Stylesheet (Grid, Sidebar, Layout, Base Elements) */

html, body {
  height: 100%;
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-main);
  scroll-behavior: smooth;
  position: relative;
}

/* Efectos visuales de fondo (Blobs de neón premium) */
.glowing-blob {
  position: fixed;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -2;
  opacity: 0.08;
  filter: blur(140px);
  animation: float-glow 25s infinite alternate ease-in-out;
  transition: background 2s cubic-bezier(0.4, 0, 0.2, 1), opacity 2s ease;
}
.blob-1 {
  background: #7c3aed;
  top: -100px;
  left: -100px;
}
.blob-2 {
  background: #ec4899;
  bottom: -150px;
  right: -150px;
  animation-delay: -7s;
}
@keyframes float-glow {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(100px, 80px) scale(1.25);
  }
  100% {
    transform: translate(-50px, -70px) scale(0.9);
  }
}

/* Master Layout */
#app-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  position: relative;
}

/* Sidebar Navigation */
aside.sidebar {
  background: var(--grad-dark);
  border-right: 1px solid var(--border-glass);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
}

aside.sidebar .logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

aside.sidebar .logo {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-title);
  letter-spacing: -1.5px;
  background: var(--grad-secondary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

aside.sidebar .logo-dot {
  width: 10px;
  height: 10px;
  background-color: #ec4899;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px #ec4899;
}

aside.sidebar nav.menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

aside.sidebar nav.menu a.menu-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.2rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: var(--transition-normal);
}

aside.sidebar nav.menu a.menu-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
  transform: translateX(4px);
}

aside.sidebar nav.menu a.menu-item.active {
  color: var(--text-main);
  background: var(--grad-primary);
  box-shadow: var(--glow-primary);
}

aside.sidebar nav.menu a.menu-item .icon {
  font-size: 1.25rem;
}

aside.sidebar .sidebar-footer {
  font-size: 0.75rem;
  color: var(--text-dark);
  text-align: center;
  border-top: 1px solid var(--border-glass);
  padding-top: 1.5rem;
}

/* Main content wrapper */
main.main-content {
  padding: 2.5rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  overflow-y: auto;
}

/* Page Section structure */
.app-section {
  display: none; /* Controlado por JS */
}

.app-section.active-sec {
  display: block;
}

/* Typography & Headers */
.section-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
  font-weight: 400;
}

.gradient-text {
  background: var(--grad-secondary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Generic Glass Panel */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: var(--transition-normal);
}

.glass-panel:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-normal);
  font-family: var(--font-title);
}

.btn-primary {
  background: var(--grad-primary);
  color: #ffffff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-primary);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-glow {
  position: relative;
}
.btn-glow::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  box-shadow: var(--glow-primary);
  opacity: 0;
  transition: var(--transition-normal);
  z-index: -1;
}
.btn-glow:hover::after {
  opacity: 1;
}

/* Inputs and Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-input {
  background: rgba(6, 6, 8, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

/* Responsive Overrides */
@media (max-width: 1024px) {
  #app-layout {
    grid-template-columns: 1fr;
  }
  
  aside.sidebar {
    height: auto;
    position: relative;
    padding: 1rem 1.5rem;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  
  aside.sidebar .logo-container {
    margin-bottom: 0;
  }
  
  aside.sidebar nav.menu {
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    flex-grow: 0;
  }
  
  aside.sidebar nav.menu a.menu-item {
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
  }
  
  aside.sidebar .sidebar-footer {
    display: none;
  }
  
  main.main-content {
    padding: 1.5rem;
  }
}

/* Mobile Top Header Bar General (Hidden on Desktop) */
.mobile-header {
  display: none;
}

/* Teléfonos móviles y pantallas pequeñas (PWA Bottom Nav feel) */
@media (max-width: 768px) {
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    width: 100%;
    height: 60px;
    background: rgba(6, 6, 8, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    z-index: 100;
    padding: 0 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  }
  
  .mobile-header .logo-container {
    display: flex;
    align-items: center;
  }
  
  .mobile-header .logo {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: var(--font-title);
    letter-spacing: -1px;
    background: var(--grad-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
  }
  
  .mobile-header .logo-dot {
    width: 8px;
    height: 8px;
    background-color: #ec4899;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #ec4899;
  }

  #app-layout {
    grid-template-columns: 1fr;
  }

  /* Transformar el sidebar en una barra de navegación inferior fija y ultra elegante */
  aside.sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    height: 68px;
    width: 100%;
    background: rgba(8, 8, 12, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid var(--border-glass);
    border-right: none;
    padding: 0 0.25rem;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    z-index: 999;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6);
  }

  aside.sidebar .logo-container,
  aside.sidebar .sidebar-footer {
    display: none !important;
  }

  aside.sidebar nav.menu {
    flex-direction: row !important;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    height: 100%;
    gap: 0;
    margin: 0;
  }

  aside.sidebar nav.menu a.menu-item {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.4rem 0.2rem;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 500;
    flex: 1;
    text-align: center;
    transform: none !important;
    transition: transform 0.2s;
  }

  aside.sidebar nav.menu a.menu-item .icon {
    font-size: 1.35rem;
    margin: 0;
    transition: transform 0.2s ease;
  }

  aside.sidebar nav.menu a.menu-item.active {
    color: #ec4899; /* Highlight active view color */
  }
  
  aside.sidebar nav.menu a.menu-item.active .icon {
    transform: translateY(-2px) scale(1.15);
    filter: drop-shadow(0 0 6px rgba(236, 72, 153, 0.6));
  }
  
  aside.sidebar nav.menu a.menu-item.active .label {
    color: var(--text-main);
    font-weight: 700;
  }

  /* Padding inferior generoso para que el contenido no quede oculto detrás de la barra */
  main.main-content {
    padding: 1.25rem 1rem 85px 1rem;
    max-width: 100%;
  }

  .section-title {
    font-size: 1.75rem;
    text-align: center;
  }

  .section-subtitle {
    font-size: 0.88rem;
    text-align: center;
    margin-bottom: 1.5rem;
  }
}

/* Pantallas ultra pequeñas */
@media (max-width: 480px) {
  main.main-content {
    padding: 1rem 0.75rem 80px 0.75rem;
  }

  aside.sidebar nav.menu a.menu-item .label {
    font-size: 0.6rem;
    letter-spacing: -0.3px;
  }
}

/* ================= AMBIENTES DE GÉNERO DINÁMICOS ================= */
body {
  transition: background-color 2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 1. Tema Tensión (Thriller/Terror/Misterio): Blobs rojos intensos y sangre con sombras lúgubres */
body.theme-tension {
  background-color: #040101 !important;
}
body.theme-tension .blob-1 {
  background: #ef4444 !important; /* Rojo neón */
  opacity: 0.12 !important;
}
body.theme-tension .blob-2 {
  background: #7f1d1d !important; /* Burdeos */
  opacity: 0.12 !important;
}

/* 2. Tema Festivo (Comedia/Animación/Familia): Blobs amarillo brillante y rosa chicle */
body.theme-festive {
  background-color: #040508 !important;
}
body.theme-festive .blob-1 {
  background: #fbbf24 !important; /* Amarillo */
  opacity: 0.1 !important;
}
body.theme-festive .blob-2 {
  background: #ec4899 !important; /* Rosa */
  opacity: 0.1 !important;
}

/* 3. Tema Cyberpunk (Acción/Sci-Fi): Blobs azul eléctrico y naranja fuego */
body.theme-cyberpunk {
  background-color: #03060c !important;
}
body.theme-cyberpunk .blob-1 {
  background: #06b6d4 !important; /* Cian eléctrico */
  opacity: 0.12 !important;
}
body.theme-cyberpunk .blob-2 {
  background: #f97316 !important; /* Naranja incandescente */
  opacity: 0.12 !important;
}

/* 4. Tema Romántico / Cálido (Drama/Romance): Blobs rosa fucsia y violeta místico */
body.theme-romance {
  background-color: #060408 !important;
}
body.theme-romance .blob-1 {
  background: #d946ef !important; /* Magenta cálido */
  opacity: 0.12 !important;
}
body.theme-romance .blob-2 {
  background: #6366f1 !important; /* Índigo profundo */
  opacity: 0.12 !important;
}

