/* ============================================================
🔒 PROTECT
============================================================ */
.no-select, .no-select * {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important; /* iOS long-press */
  -webkit-user-drag: none !important;
  -khtml-user-drag: none !important;
}

@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

:root {
  --primary: #c4ff00;
  --accent: #7e73ff;
  --bg-dark: #0d0d15;
  --bg-dark-img: url("../assets/images/bg-dark.webp");
  --whitepure: #fff;
  --blackdeep: #000;
  --light-primary:#21270B;
}

/* === Fondo base === */
body {
  margin: 0;
  font-family: 'VT323', monospace;
  background-color: var(--bg-dark);
  background-image: var(--bg-dark-img);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  color: #fff;
}

/* === Fondo decorativo animado === */
.background-elements {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.bg-elem {
  position: absolute;
  opacity: 0.25;
  filter: blur(1px) saturate(120%);
  mix-blend-mode: screen;
  animation: floatElement 12s ease-in-out infinite alternate;
}
.elem1 { top: 20%; right: 10%; width: 220px; animation-delay: 4s; }
.elem2 { top: 60%; left: 15%; width: 180px; animation-delay: 2s; }
.elem3 { top: 10%; left: 8%; width: 140px; animation-delay: 0s; }
.elem4 { bottom: 8%; right: 20%; width: 160px; animation-delay: 6s; }

@keyframes floatElement {
  from { transform: translateY(0); opacity: 0.25; }
  to { transform: translateY(-25px) rotate(10deg); opacity: 0.4; }
}

/* === Pantalla principal === */
.login-wrapper {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid var(--primary);
  border-radius: 18px;
  padding: 50px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.login-logo {
  width: 220px;
  margin-bottom: 20px;
}

.intro {
  margin: 0 0 25px;
  font-size: 1.2rem;
  color: var(--whitepure);
  text-transform: uppercase;
  text-align: center;
}

.login-btn {
  background: var(--primary);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 10px 0;
  width: 80%;
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.3s ease;
}
.login-btn:hover {
  background: #e0ff73;
  transform: scale(1.03);
}

/* === Modales === */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  z-index: 50;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.hidden { display: none; }

.modal-box {
  background: rgba(20, 20, 25, 0.95);
  border: 2px solid var(--primary);
  border-radius: 14px;
  padding: 25px;
  width: 90%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 0 20px rgba(196, 255, 0, 0.2);
}

.modal-box h2 {
  color: var(--primary);
  font-size: 1.4rem;
  margin-bottom: 18px;
}
.modal-box span { color: var(--accent); }

/* ============================================================
🧩 ESTILO NUEVO PARA MODAL DE CAMELIAS
============================================================ */
.camelia-modal-box {
  background: #0a0a0f;
  border: 2px solid var(--primary);
  border-radius: 12px;
  padding: 0;
  width: 90%;
  max-width: 400px;
  text-align: left;
  box-shadow: 0 0 18px rgba(196, 255, 0, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Encabezado */
.camelia-header {
  display: flex;
  flex-direction: column;
  background: var(--accent);
  color: #fff;
  padding: 24px 10px;
  width: 100%;
  border-bottom: 2px solid var(--primary);
}
.camelia-header p {
  margin: 0 32px;
  font-size: 1.2rem;
  opacity: 0.9;
  color: var(--blackdeep);
}
.camelia-header h2 {
  margin: 4px 32px 0;
  font-size: 2rem;
  color: #fff;
}

/* Grid */
.captcha-grid {
  display: grid;
  grid-template-columns: repeat(3, 110px);
  gap: 6px;
  justify-content: center;
  margin: 18px auto;
  padding: 0;
}

/* Footer */
.camelia-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #000;
  border-top: 2px solid var(--primary);
  padding: 10px 15px;
  width: 100%;
  box-sizing: border-box;
}

.camelia-icons {
  display: flex;
  gap: 12px;
}

/* ============================================================
🎨 ICONOS INFERIORES CON SVG
============================================================ */
.icon-btn {
  background: none;
  border: none;
  padding: 0;
  width: 30px;
  height: 30px;
  cursor: pointer;
  transition: transform 0.25s ease, filter 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn img {
  width: 24px;
  height: 24px;
  filter: brightness(0) saturate(100%) invert(83%) sepia(96%) saturate(744%) hue-rotate(19deg) brightness(112%) contrast(104%);
  transition: filter 0.3s ease, transform 0.25s ease;
}

.icon-btn:hover img {
  filter: brightness(0) saturate(100%) invert(43%) sepia(82%) saturate(734%)
    hue-rotate(215deg) brightness(95%) contrast(101%);
  transform: scale(1.15);
}

/* Botón Verificar */
.verify-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  cursor: pointer;
  transition: 0.3s;
}
.verify-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.verify-btn:hover:not(:disabled) {
  background: #9b8aff;
  transform: scale(1.05);
}


/* === Grid Camelias === */
.captcha-grid {
  display: grid;
  grid-template-columns: repeat(3, 110px);
  gap: 8px;
  justify-content: center;
  margin: 20px auto;
}
.captcha-grid img {
  width: 110px;
  height: 110px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.3s;
}
.captcha-grid img:hover { transform: scale(1.05); }
.captcha-grid img.selected {
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.verify-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  transition: 0.3s;
}
.verify-btn:disabled { opacity: 0.4; cursor: not-allowed; }


/* ============================================================
⚠️ TOAST DE ACCESO INCORRECTO
============================================================ */
.access-toast {
  position: fixed;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 90, 90, 0.9);
  color: #fff;
  font-family: "VT323", monospace;
  font-size: 1.2rem;
  padding: 10px 25px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
  z-index: 9999;
  opacity: 0;
  transition: all 0.5s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-shadow: 0 0 6px #000;
}

/* Estado visible */
.access-toast.active {
  bottom: 40px;
  opacity: 1;
}

/* 🌙 Tema oscuro alternativo */
body:not(.light-mode) .access-toast {
  background: rgba(255, 0, 50, 0.85);
  box-shadow: 0 0 12px rgba(255, 0, 50, 0.4);
}


/* ============================================================
🌐 ENLACES SECTION
============================================================ */
/* 🌐 Sección de enlaces principales */
.links-section {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem auto 0;
  width: 100%;
}

.link-buttons {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 0 1rem;
  scrollbar-width: none;
  overflow: visible;
}
.link-buttons::-webkit-scrollbar {
  display: none;
}

/* 🔘 Contenedor general del botón */
.link-btn {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: transform 0.25s ease;
}

/* 🌑 Círculo base */
.icon-circle {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: background 0.3s ease, transform 0.3s ease;
}

/* 🧿 Icono SVG — independiente del fondo */
.icon-circle img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  transition: filter 0.3s ease;
  filter: invert(79%) sepia(94%) saturate(500%) hue-rotate(35deg)
    brightness(150%) contrast(130%);
}

/* Texto debajo */
.link-btn span {
  margin-top: 0.7rem;
  font-family: "VT323", monospace;
  font-size: 1rem;
  letter-spacing: 0.4px;
  color: var(--whitepure);
}

/* ✨ Hover */
.link-btn:hover .icon-circle {
  background: var(--light-primary);
  transform: translateY(-3px);
}

/* ============================================================
✨ ANIMACIONES E INTERACCIONES DE ICONOS
============================================================ */

/* --- Animación general al aparecer --- */
.camelia-icons button {
  opacity: 0;
  transform: scale(0.6);
  animation: iconPop 0.5s ease forwards;
}
.camelia-icons button:nth-child(1) { animation-delay: 0.2s; }
.camelia-icons button:nth-child(2) { animation-delay: 0.4s; }
.camelia-icons button:nth-child(3) { animation-delay: 0.6s; }

@keyframes iconPop {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- Spin del botón refresh --- */
.icon-btn.spin img {
  animation: spinIcon 0.6s ease;
}
@keyframes spinIcon {
  to { transform: rotate(360deg); }
}

/* --- Brillo del botón sonido --- */
.icon-btn.blink img {
  animation: blinkIcon 0.4s ease-in-out;
}
@keyframes blinkIcon {
  0%, 100% { filter: brightness(0) saturate(100%) invert(83%) sepia(96%) saturate(744%) hue-rotate(19deg) brightness(112%) contrast(104%); }
  50% { filter: brightness(0) saturate(100%) invert(95%) sepia(94%) saturate(1200%) hue-rotate(110deg) brightness(130%) contrast(105%); }
}

/* --- Tooltip de información --- */
.info-tooltip {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid var(--primary);
  color: var(--primary);
  font-family: 'VT323', monospace;
  font-size: 1rem;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  animation: tooltipFade 0.3s forwards;
}

@keyframes tooltipFade {
  to {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

/* ============================================================
⚡ EFECTO GLITCH TEMPORAL EN MODAL
============================================================ */
@keyframes glitchShake {
  0% { transform: translate(1px, -1px) scale(1.01) skew(1deg, -1deg); filter: hue-rotate(5deg) blur(0.5px); }
  20% { transform: translate(-2px, 1px) scale(0.99) skew(-1deg, 2deg); filter: hue-rotate(-10deg) blur(0.7px); }
  40% { transform: translate(1px, 1px) scale(1.02) skew(2deg, -2deg); filter: hue-rotate(8deg) blur(0.3px); }
  60% { transform: translate(-1px, 2px) scale(1) skew(-2deg, 1deg); filter: hue-rotate(-4deg) blur(0.4px); }
  80% { transform: translate(1px, -2px) scale(1.01) skew(1deg, -1deg); filter: hue-rotate(6deg) blur(0.5px); }
  100% { transform: translate(0) scale(1) skew(0); filter: none; }
}

.camelia-modal-box.glitch {
  animation: glitchShake 0.4s ease-in-out;
  transition: transform 0.3s ease, filter 0.3s ease;
  will-change: transform, filter;
}

/* ============================================================
⚡ EFECTO GLITCH CRT DECENTTALES
============================================================ */
@keyframes crtGlitch {
  0% {
    transform: translate(1px, -1px) scale(1.02) skew(1deg, -1deg);
    filter: hue-rotate(20deg) blur(0.6px) contrast(110%);
    box-shadow: 0 0 10px #c4ff00, 0 0 20px #7e73ff;
  }
  25% {
    transform: translate(-2px, 1px) scale(0.99) skew(-1deg, 1deg);
    filter: hue-rotate(-15deg) blur(0.8px) brightness(1.3);
    box-shadow: 0 0 8px #7e73ff, 0 0 25px #c4ff00;
  }
  50% {
    transform: translate(2px, 2px) scale(1.01) skew(2deg, -2deg);
    filter: hue-rotate(40deg) blur(0.5px) saturate(120%);
    box-shadow: 0 0 6px #7e73ff, 0 0 12px #c4ff00;
  }
  75% {
    transform: translate(-1px, 2px) scale(1.02) skew(-2deg, 1deg);
    filter: hue-rotate(-30deg) blur(0.4px);
    box-shadow: 0 0 10px #c4ff00, 0 0 16px #7e73ff;
  }
  100% {
    transform: none;
    filter: none;
    box-shadow: none;
  }
}

/* ✨ Flicker overlay tipo CRT scanline */
@keyframes crtFlash {
  0%, 100% { opacity: 0; }
  20% { opacity: 0.3; }
  40% { opacity: 0.6; }
  60% { opacity: 0.3; }
  80% { opacity: 0.5; }
}

.camelia-modal-box.glitch {
  animation: crtGlitch 0.6s ease-in-out;
  position: relative;
}

.camelia-modal-box.glitch::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(126, 115, 255, 0.2),
    rgba(196, 255, 0, 0.1),
    rgba(0, 0, 0, 0.3)
  );
  mix-blend-mode: screen;
  animation: crtFlash 0.3s ease-in-out;
  pointer-events: none;
  border-radius: inherit;
}

/* ============================================================
🌸 FLOATING QUOTES DECENTTALES — versión estable
============================================================ */
.floating-quotes {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.quote-box {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  padding: 10px 14px;
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  line-height: 1.2;
  opacity: 0;
  width: max-content;
  max-width: 260px;
  min-width: 200px;
  transform: translateY(6px);
  box-shadow: 0 0 6px rgba(0,0,0,0.3);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.quote-box p {
  margin: 0;
  word-wrap: break-word;
}

/* Estilo obras */
.quote-box.novel {
  background: rgba(126, 115, 255, 0.9);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

/* Estilo miembros */
.quote-box.member {
  background: rgba(12, 12, 12, 0.95);
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

/* Iconos / Avatares */
.quote-icon,
.quote-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.quote-icon {
  filter: invert();
}

/* ===========================================
   🧠 MODAL PASSWORD RETRO
=========================================== */
/* === Password modal === */

.pw-box {
  background: rgba(10, 10, 15, 0.96);
  border: 2px solid var(--primary);
  border-radius: 12px;
  padding: 0;
  text-align: center;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 0 15px rgba(196, 255, 0, 0.3);
  overflow: hidden;
  font-family: 'VT323', monospace;
}
#password-modal {
  flex-direction: column;
}

.pw-box h3 {
  color: var(--primary);
  font-size: 1.4rem;
  margin-bottom: 20px;
  text-transform: uppercase;
}
.pw-terminal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.pw-terminal label {
  margin-top: 20px;
  color: var(--accent);
  font-size: 1.1rem;
  text-transform: uppercase;
  align-self: flex-start;
  margin-left: 8%;
  letter-spacing: 1px;
}
.pw-terminal input {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--accent);
  color: var(--primary);
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  padding: 8px 12px;
  border-radius: 6px;
  width: 80%;
  text-align: center;
  margin-bottom: 20px;
}
.enter-btn {
  background: var(--primary);
  color: var(--blackdeep);
  border: none;
  width: 100%;
  padding: 8px 20px;
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  cursor: pointer;
  transition: 0.3s;
}
.enter-btn:hover {
  transform: scale(1.03);
  background: #dfff6f;
}

.enter-btn:hover {
  transform: scale(1.05);
  background: #dfff5a;
}


/* 🖥️ Header */
.pw-header {
  background: #1b1b1b;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--primary);
  margin: 0;
}
.pw-title {
  color: var(--accent);
  text-transform: uppercase;
  user-select: none;
}
.pw-close {
  background: var(--primary);
  color: #000;
  border: none;
  border-radius: 2px;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 2px 6px;
  transition: 0.2s;
}
.pw-close:hover {
  background: #dfff5a;
}

/* 🖼️ Imagen */
.pw-img-box {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin: 0;
}
.pw-img-box img {
  width: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  cursor: pointer;
}

/* ✨ Tooltip coqueto tipo toast (desde abajo) */
.pw-tooltip {
  position: fixed;
  z-index: 9999;
  bottom: -60px; /* punto de partida */
  left: 50%;
  transform: translateX(-50%);
  background: var(--blackdeep);
  color: var(--primary);
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  border: 1.5px solid var(--primary);
  border-radius: 8px;
  padding: 10px 18px;
  box-shadow: 0 0 14px rgba(196, 255, 0, 0.4);
  opacity: 0;
  transition: all 0.45s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Estado visible: animación de subida */
.pw-tooltip.visible {
  bottom: 40px; /* misma altura que el toast de acceso denegado */
  opacity: 1;
}

/* Transición de salida */
.pw-tooltip:not(.visible) {
  transition: all 0.35s ease-in;
}



@keyframes tooltipFade {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes tooltipDisappear {
  to { opacity: 0; transform: translateY(-5px); }
}



/* 🖤 Efecto de apagado al cerrar modal */
body.fade-out {
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

/* 🚫 Estado deshabilitado */
.link-btn.disabled {
  cursor: not-allowed;
  opacity: 0.8;
  position: relative;
}

/* Desactivar solo los clics reales, pero permitir hover */
.link-btn.disabled a,
.link-btn.disabled span {
  pointer-events: none;
}

/* Ícono de “restringido” */
.link-btn.disabled .restricted-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  filter: invert(87%) sepia(93%) saturate(580%) hue-rotate(30deg) brightness(120%) contrast(110%);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 3;
  pointer-events: none;
}

/* 💬 Tooltip retro */
.disabled-tooltip {
  position: absolute;
  bottom: 78px; /* justo arriba del icono */
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: rgba(10, 10, 15, 0.96);
  border: 1.5px solid var(--primary);
  color: var(--primary);
  font-family: 'VT323', monospace;
  font-size: 1rem;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 0 10px rgba(196, 255, 0, 0.4);
  z-index: 5;
  pointer-events: none;
}

.link-btn.disabled:hover .disabled-tooltip {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* 🎭 Fondo tenue al pasar */
.link-btn.disabled:hover .icon-circle {
  background: rgba(0, 0, 0, 0.4);
  transform: none;
}

/* ============================================================
🌌 PANTALLA DE CARGA — transición entre login y home
============================================================ */
.loading-screen {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.loading-screen.active {
  opacity: 1;
  pointer-events: all;
}

.loading-gif {
  width: 120px;
  height: 120px;
  object-fit: contain;
  image-rendering: crisp-edges;
  margin-bottom: 20px;
}

.loading-screen p {
  font-family: "VT323", monospace;
  color: var(--primary);
  font-size: 1.3rem;
  letter-spacing: 1px;
  animation: blinkText 1.5s infinite;
}

@keyframes blinkText {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

