/* ============ ESTILO GLOBAL — negro suave + morado ============ */

:root {
  --bg:          #0e0e10;
  --bg-panel:    #131316;
  --bg-nav:      #17171b;
  --border:      #27272c;
  --text:        #cfcdd6;
  --text-dim:    #6b6870;
  --heading:     #ece9f2;
  --purple:      #8a5fd1;
  --purple-light:#ab8ce3;
  --purple-dark: #5c4482;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: #070709;
  color: var(--text);
  font-family: Verdana, sans-serif;
  font-size: 13px; /* Tamaño mínimo base legible */
  line-height: 1.45;
}

/* Envoltorio superior pegado al borde del navegador pero con ancho limitado */
.top-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 15px; 
}

/* El contenedor estilo Blogger para el resto de la página */
.container {
  max-width: 1100px; 
  margin: 0 auto; 
  padding: 0 15px 15px 15px; 
}

a { color: var(--purple); text-decoration: underline; }
a:hover { color: var(--purple-light); }
a:visited { color: var(--purple-dark); }

/* --- 1. Header superior pegado al borde --- */
.header-outer {
  padding: 12px 0; 
}
.header h1 {
  margin: 0;
  font-size: 0.95rem; /* Ajustado proporcionalmente */
  color: var(--heading);
  font-weight: normal; 
}
.header img { display: block; max-height: 32px; }

/* --- 2. Navbar y Pestañas --- */
.navbar-outer {
  margin-bottom: 8px;
}

#nav-bar {
  width: 100%;
  margin: 0 auto;
  background: none;
  border: none;
  padding-top: 0;
}

#nav-inner {
  display: flex;
  justify-content: center;
  gap: 3px;
  padding: 0;
  flex-wrap: nowrap;
  max-width: 100%;
}

#nav-inner a {
  background: #393945;
  border-top: 1px solid #838399;
  border-left: 1px solid #838399;
  border-right: 1px solid #22222b;
  border-bottom: none !important;
  border-top-left-radius: 12px !important;
  border-top-right-radius: 12px !important;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  color: #ededf5;
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  font-size: 11px;
  white-space: nowrap;
  padding: 8px 14px 7px 14px;
  position: relative;
  top: 1px;
  flex: 0 0 auto;
}

#nav-inner a:hover {
  background: #5d35b6;
  color: #ffffff;
}

#nav-inner a.active {
  background: #32254d !important;
  border-top: 1px solid #e2d2ff !important;
  border-left: 1px solid #e2d2ff !important;
  border-right: 1px solid #40256f !important;
  border-bottom: none !important;
  color: #ffffff;
}

/* --- PAGE PANEL (Abarca el 100% exacto de ancho - Sin desvanecer a transparente abajo) --- */
#page-panel {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto;

  background: linear-gradient(
    to bottom,
    #32254d 0%,
    #2a1f3f 100%
  ) !important;

  border: none !important;
  padding: 12px 20px;
  min-height: 34px;

  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  overflow: hidden;
}

#page-panel.panel-inactive {
  background: #393945 !important;
  border-top: 1px solid #838399 !important;
}

/* --- ADAPTACIÓN PARA MÓVILES (PAGE-PANEL) --- */
@media screen and (max-width: 650px) {
  
  /* Eliminamos el redondeo SOLO del panel principal, respetando los botones */
  #page-panel {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
  }
  
  /* (Opcional) Si los botones son muchos y se salen de la pantalla, 
     esto permite que hagan scroll horizontal en lugar de cortarse */
  #nav-inner {
    justify-content: flex-start;
    overflow-x: auto;
    /* Oculta la barra de scroll en algunos navegadores para que se vea más limpio */
    scrollbar-width: none; 
  }
  #nav-inner::-webkit-scrollbar {
    display: none;
  }
}

/* Configuración de la tabla inferior */
table.layout {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px; 
}

table.layout td { 
  vertical-align: top; 
}

/* --- 3. Cuerpo y Columnas (Equilibradas: 22% - 56% - 22%) --- */
.col-left, .col-right {
  width: 22%; 
  padding: 14px; 
  background: var(--bg-panel);
  border: 1px solid var(--border);
}

.col-content { 
  width: 56%; 
  padding: 24px 32px; 
  background: var(--bg-panel);
  border: 1px solid var(--border);
}

.col-left h3, .col-right h3 {
  margin-top: 0;
  font-size: 0.8rem; /* Ajustado */
  color: var(--purple-light);
  margin-bottom: 8px;
}
.col-left ul, .col-right ul { list-style: square; margin: 0; padding-left: 16px; }
.col-left li, .col-right li { margin-bottom: 4px; font-size: 0.78rem; } /* ~12px mínimo */

.col-content h2 {
  margin-top: 0;
  color: var(--heading);
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 12px;
  font-size: 1.1rem; /* Título secundario proporcional */
}
.col-content p { 
  color: var(--text); 
  font-size: 0.85rem; /* ~13px para el cuerpo de texto principal */
  margin-top: 0;
}

/* --- 4. Footer --- */
.footer-cell {
  padding: 10px;
  text-align: center;
  font-size: 0.75rem; /* ~11.5px el mínimo para legales/footer */
  color: var(--text-dim);

  /*
   * Resplandor de contraste:
   * crea una separación muy tenue alrededor del texto
   * para mantenerlo legible tanto sobre fondos claros
   * como sobre fondos oscuros.
   *
   * No modifica el tamaño ni el color del texto.
   */
  text-shadow:
    0 0 2px rgba(0, 0, 0, 0.95),
    0 0 5px rgba(0, 0, 0, 0.65),
    0 0 7px rgba(255, 255, 255, 0.28);
}

/* En pantallas móviles, apilar todo de forma ordenada */
@media (max-width: 768px) { 
  .container, .top-wrapper {
    padding: 8px; 
  }
  
  table.layout, table.layout tbody, table.layout tr, table.layout td {
    display: block;
    width: 100% !important;
  }
  
  .col-content {
    padding: 16px 12px !important; 
  }
}

/* =====================================
   GLOBOS DE TEXTO (TOOLTIPS) GLOBALES
===================================== */
.retro-tooltip-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.retro-tooltip {
  visibility: hidden;
  background-color: var(--bg-nav);
  color: var(--heading);
  text-align: center;
  padding: 4px 8px;
  border: 1px solid var(--purple-light);
  font-size: 0.75rem; /* Pequeño pero legible */
  position: absolute;
  bottom: 135%; /* Aparece justo arriba del botón */
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  white-space: nowrap;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.5); /* Sombra dura estilo old-web */
  opacity: 0;
  transition: opacity 0.2s;
}

/* Mostrar globo */
.retro-tooltip.show {
  visibility: visible;
  opacity: 1;
}

/* =========================================================
   GALERÍA INTEGRADA (VISUALIZADOR SHIRO)
========================================================= */

/* 1. Galería dentro de la página */
.shiro-gallery {
  position: relative;
  overflow: hidden;
  border: 1px solid #838399;
  border-radius: 8px;
  background: #22222b;
  margin: 15px 0;
}
.shiro-gallery-track {
  display: flex;
  height: 100%;
  transition: transform 1.5s cubic-bezier(0.25, 1, 0.5, 1); /* Suave arrastre clásico */
}
.shiro-gallery-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: opacity 0.3s;
}
.shiro-gallery-track img:hover {
  opacity: 0.9;
}

/* 2. Lightbox (Pantalla Completa) */
#shiro-lightbox {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(26, 18, 37, 0.95); /* Color oscuro de tu web con transparencia */
  backdrop-filter: blur(5px);
  z-index: 99999;
  display: none; /* Oculto por defecto */
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s;
}
#shiro-lightbox.active {
  display: flex;
  opacity: 1;
}

/* Botón Cerrar (X) */
.shiro-lb-close {
  position: absolute;
  top: 20px; right: 25px;
  color: #ededf5;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  transition: color 0.2s, opacity 0.3s;
}
.shiro-lb-close:hover { color: #e2d2ff; }

/* Contenedor de la Imagen Expandida */
.shiro-lb-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto; /* Permite scroll si se hace zoom real */
  width: 100%; height: 100%;
}
.shiro-lb-img {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}
.shiro-lb-img.zoomed {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

/* Barra de miniaturas inferior (Estilo Android) */
.shiro-lb-thumbs {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  padding: 10px;
  background: rgba(50, 37, 77, 0.8);
  border: 1px solid #838399;
  border-radius: 12px;
  max-width: 90vw;
  overflow-x: auto;
  transition: opacity 0.4s ease, transform 0.4s ease;
  scrollbar-width: none; /* Oculta scrollbar en Firefox */
}
.shiro-lb-thumbs::-webkit-scrollbar { display: none; } /* Oculta en Chrome */

/* Animación de ocultarse a los 1.5s */
.shiro-lb-thumbs.hidden {
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
}

.shiro-lb-thumb {
  width: 55px; height: 55px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.5;
  border: 2px solid transparent;
  transition: opacity 0.2s, border 0.2s;
}
.shiro-lb-thumb:hover { opacity: 0.8; }
.shiro-lb-thumb.active {
  opacity: 1;
  border-color: #e2d2ff;
}

/* Controles de Navegación de la Galería en la página (Prev/Next) */
.shiro-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(34, 34, 43, 0.7); /* Oscuro semi-transparente */
  color: #ededf5;
  border: 1px solid #838399;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  opacity: 0; /* Invisibles por defecto */
  transition: opacity 0.3s, background 0.2s, color 0.2s;
  z-index: 10;
}

.shiro-gallery-nav:hover {
  background: #5d35b6;
  color: #ffffff;
}

.shiro-gallery-nav.prev { left: 10px; }
.shiro-gallery-nav.next { right: 10px; }

/* Aparecen suavemente al pasar el cursor sobre la galería */
.shiro-gallery:hover .shiro-gallery-nav {
  opacity: 1;
}