/* ==========================================================================
   KENOMULTICHAT — HIGH-END LINEAR-TIER STYLESHEET
   Arquitectura: Double-Bezel, OLED Vantablack (#060709), Tipografía Disciplinada
   Acentos: Twitch Purple (#9146FF), Kick Green (#53FC18), YouTube (#FF0000), TikTok (#25F4EE)
   ========================================================================== */

:root {
  --bg-oled: #050507;
  --bg-card: rgba(14, 16, 22, 0.75);
  --border-hairline: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(255, 255, 255, 0.18);
  --inset-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-main);
  background-color: var(--bg-oled);
  color: #ededed;
  color-scheme: dark;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  background-color: var(--bg-oled);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}


.nav-logo-box {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
}

.author-logo-box {
  width: 96px;
  height: 96px;
  min-width: 96px;
  min-height: 96px;
}

/* ==========================================================================
   MALLA Y ORBES DE ILUMINACIÓN DE FONDO
   ========================================================================== */

.grid-texture {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 20%, #000 70%, transparent 100%);
  opacity: 0.35;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(140px);
  opacity: 0.18;
  pointer-events: none;
  animation: floatOrb 20s infinite alternate ease-in-out;
}

.glow-purple {
  width: 550px;
  height: 550px;
  background: #9146FF;
  top: -100px;
  left: 15%;
}

.glow-green {
  width: 450px;
  height: 450px;
  background: #53FC18;
  top: 300px;
  right: 10%;
  animation-delay: -5s;
}

.glow-red {
  width: 400px;
  height: 400px;
  background: #FF0033;
  top: 900px;
  left: 5%;
  animation-delay: -10s;
}

.glow-cyan {
  width: 500px;
  height: 500px;
  background: #25F4EE;
  top: 1400px;
  right: 15%;
  animation-delay: -15s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
  100% { transform: translate(-30px, -20px) scale(0.95); }
}

/* ==========================================================================
   NAVBAR (FLUID ISLAND)
   ========================================================================== */

.nav-island {
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s var(--ease-spring);
}

.nav-island:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

/* ==========================================================================
   ARQUITECTURA DOUBLE-BEZEL (DOPPELRAND)
   ========================================================================== */

.double-bezel-outer {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-hairline);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 0.4s var(--ease-spring);
}

.double-bezel-outer:hover {
  border-color: var(--border-hover);
}

.double-bezel-inner {
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--inset-highlight);
}

/* ==========================================================================
   BOTONES LINEAR-TIER (BUTTON-IN-BUTTON ARCHITECTURE)
   ========================================================================== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 18px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 25px -5px rgba(124, 58, 237, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s var(--ease-spring);
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  box-shadow: 0 14px 30px -4px rgba(124, 58, 237, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-icon-wrapper {
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s var(--ease-spring);
}

.btn-primary-large {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px 12px 24px;
  border-radius: 9999px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 15px 35px -8px rgba(124, 58, 237, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s var(--ease-spring);
}

.btn-primary-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -6px rgba(147, 51, 234, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-primary-large:active {
  transform: scale(0.98);
}

.btn-icon-wrapper-large {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-hairline);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s var(--ease-spring);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* ==========================================================================
   PESTAÑAS DEL SHOWCASE INTERACTIVO
   ========================================================================== */

.showcase-tab {
  padding: 6px 14px;
  border-radius: 9999px;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s var(--ease-spring);
}

.showcase-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.showcase-tab.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   BENTO CARDS
   ========================================================================== */

.bento-card {
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.4s var(--ease-spring), border-color 0.4s var(--ease-spring);
}

.bento-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
}

/* ==========================================================================
   OVERLAY CARDS
   ========================================================================== */

.overlay-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.3s var(--ease-spring), border-color 0.3s var(--ease-spring);
}

.overlay-card:hover {
  transform: translateY(-2px);
}

.badge-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   ANIMACIONES
   ========================================================================== */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.5s var(--ease-spring) forwards;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #050507;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   SMARTPHONE (MOBILE-FIRST) & IDIOMAS
   ========================================================================== */

/* Ocultar barra de desplazamiento manteniendo scroll táctil nativo */
.no-scrollbar::-webkit-scrollbar {
  display: none !important;
}
.no-scrollbar {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch;
}


/* Optimización de táctil para smartphones */
@media (max-width: 640px) {
  /* Fitts Law: Touch targets mínimos de 44px */
  button, a, input, select {
    touch-action: manipulation;
  }

  .nav-island {
    padding: 6px 12px;
  }

  /* Prevenir zoom accidental en iOS al enfocar inputs */
  input[type="text"], input[type="password"], textarea {
    font-size: 16px !important;
  }

  /* Padding y bordes más finos para pantallas estrechas (320px-390px) */
  .bento-card, .overlay-card {
    padding: 1.25rem;
  }

  .double-bezel-inner {
    padding: 1.25rem !important;
  }
}



/* Selector de Idiomas — Despliegue Hacia Abajo y Alineación */
#lang-dropdown-container {
  position: relative;
  display: flex;
  align-items: center;
}

#lang-dropdown-btn[aria-expanded="true"] #desktop-lang-chevron {
  transform: rotate(180deg);
}

#lang-dropdown-menu {
  position: absolute !important;
  top: calc(100% + 12px) !important;
  right: 0 !important;
  width: 176px !important;
  display: none;
  border-radius: 18px;
  background: rgba(10, 12, 18, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  padding: 6px;
  flex-direction: column;
  gap: 3px;
  z-index: 100;
  transform-origin: top right;
}

#lang-dropdown-menu.open {
  display: flex !important;
  animation: dropdownSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dropdownSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#mobile-menu {
  display: none;
}

#mobile-menu.open {
  display: flex !important;
}

#image-lightbox-modal {
  display: none;
}

#image-lightbox-modal.open {
  display: flex !important;
}
