@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

/* --- 1. VARIABLES GLOBALES (PALETA BAUHAUS) --- */
:root {
  --bg: #F2F0E4;      /* Blanco Hueso (Papel) */
  --ink: #0D0D0D;     /* Negro Tinta (Estructura) */
  --red: #D92525;     /* Rojo (Materia/Gravedad) */
  --blue: #18568C;    /* Azul (Espíritu/Cielo) */
  --yellow: #F2B705;  /* Amarillo (Energía/Agudos) */
}

/* --- 2. RESET Y BASICS --- */
body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: var(--bg);
  font-family: 'Space Mono', monospace;
  color: var(--ink);
}

/* --- 3. CONTENEDOR DE LA INTERFAZ (UI) --- */
#ui-layer {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(242, 240, 228, 0.96); /* Casi opaco para leer bien */
  transition: opacity 0.6s ease;
  z-index: 10;
}

.content-box {
  text-align: center;
  max-width: 650px;
  padding: 50px;
  /* La línea vertical característica del diseño editorial Bauhaus */
  border-left: 8px solid var(--ink); 
}

h1 {
  font-size: 3.5rem;
  line-height: 1;
  margin: 0 0 20px 0;
  text-transform: uppercase;
  letter-spacing: -2px;
  border-bottom: 3px solid var(--red); /* Subrayado rojo */
  display: inline-block;
}

p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 40px;
  font-weight: 400;
}

/* --- 4. FORMULARIOS (INPUTS) --- */
input {
  display: block;
  width: 80%;
  margin: 0 auto 30px auto;
  padding: 15px 0;
  background: transparent;
  border: none;
  border-bottom: 3px solid var(--blue); /* Línea azul para input */
  font-family: 'Space Mono';
  font-size: 1.5rem;
  text-align: center;
  color: var(--ink);
  outline: none;
  text-transform: uppercase;
}

input::placeholder {
  color: rgba(13, 13, 13, 0.3);
}

/* --- 5. BOTONES GENERALES --- */
button {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 18px 40px;
  font-family: 'Space Mono';
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover {
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* --- 6. BOTÓN FLOTANTE (EL ARREGLO ESTÁ AQUÍ) --- */
#floating-btn {
  position: absolute;
  bottom: 30px;
  right: 30px;
  z-index: 5;
  
  /* ESTADO NORMAL */
  background-color: var(--bg); /* Fondo sólido para tapar el dibujo de atrás */
  color: var(--ink);
  border: 2px solid var(--ink);
}

/* REGLA ESPECÍFICA DE HOVER PARA EL ID */
#floating-btn:hover {
  background-color: var(--ink);   /* Fondo Negro */
  color: var(--bg);               /* Texto Blanco */
  border-color: var(--ink);
  transform: translateY(-3px);
  /* Sombra sólida roja estilo Bauhaus */
  box-shadow: 4px 4px 0px var(--red); 
}

/* --- ESTILOS DE BOTONES FINALES --- */
#final-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  align-items: center;
}

/* El botón secundario (Skip) es más sutil */
.secondary-btn {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink); /* Borde más fino */
  font-size: 0.9rem;
  padding: 12px 30px;
  opacity: 0.7;
}

.secondary-btn:hover {
  opacity: 1;
  background: rgba(13, 13, 13, 0.05); /* No se pone negro del todo, solo grisaceo */
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: none; /* Sin sombra Bauhaus para diferenciar importancia */
}

/* Asegurar que el botón de descarga destaque */
#download-btn {
  background: var(--ink);
  color: var(--bg);
  border: 2px solid var(--ink);
  width: 100%;
  max-width: 300px;
}

#download-btn:hover {
  background: var(--red); /* Feedback rojo al descargar */
  border-color: var(--red);
}



/* --- 7. CAPA DE EPÍLOGO (FINAL) --- */
#epilogue-layer {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: var(--bg);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  z-index: 100;
  opacity: 0; pointer-events: none; transition: opacity 2s ease;
}

#epilogue-layer.visible {
  opacity: 1; pointer-events: auto;
}

.epilogue-quote {
  font-family: 'Space Mono', monospace;
  font-size: 1.5rem; color: var(--ink);
  max-width: 600px; text-align: center;
  margin-bottom: 30px; font-style: italic;
  border: none; /* Quitamos bordes si heredaba de p */
}

.epilogue-cite {
  font-size: 0.9rem; color: var(--red);
  text-transform: uppercase; letter-spacing: 2px;
  font-weight: bold;
}

.restart-btn {
  margin-top: 50px; background: transparent; border: 1px solid var(--ink);
  color: var(--ink); padding: 10px 20px; font-size: 0.8rem; opacity: 0;
  transition: opacity 1s ease 2s; /* Aparece 2 segundos tarde */
}

#epilogue-layer.visible .restart-btn { opacity: 0.5; }
#epilogue-layer.visible .restart-btn:hover { 
  opacity: 1; 
  background: var(--ink); 
  color: var(--bg); 
}

/* --- 8. UTILIDADES --- */
.hidden { display: none !important; }
.fade-out { opacity: 0; pointer-events: none; }



/* --- CRÉDITOS DE AUTOR --- */
.author-credit {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--ink); /* Una línea fina separadora */
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink);
  opacity: 0.7;
}

.author-credit strong {
  color: var(--red); /* Tu nombre destaca en rojo Bauhaus */
}