
@font-face {
  font-family: 'Amiri';
  src: url('assets/Amiri-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

body {
  font-family: 'Amiri', serif !important;
  background-color: #050505;
  color: #1a1005;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

body *, .story-text, p, div, span, label, input, textarea, button, a {
  font-family: 'Amiri', serif !important;
}

h1, h2, h3, h4, h5, h6, .main-title {
  font-family: 'Cinzel', serif !important;
}

#app-container {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: 56.25vh;
  position: relative;
  overflow: hidden;
  background-color: #000;
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.15);
  box-sizing: border-box;
}

.bg-layer {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
  object-fit: cover;
}

.content-layer {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 10;
  box-sizing: border-box;
}

.container-p1 { padding-top: 8vh; padding-left: 15%; padding-right: 15%; }
.container-p2 { padding-top: 18vh; padding-left: 15%; padding-right: 15%; }
.container-special { padding-top: 23vh; padding-left: 15%; padding-right: 15%; }
.container-others { padding-top: 13vh; padding-left: 12%; padding-right: 12%; }

@media (max-aspect-ratio: 9/16) {
  #app-container { max-width: 100vw; }
}

.story-text {
  font-size: 1.15rem;
  line-height: 1.8;
  text-align: left;
  font-weight: 400;
  color: #1a1005;
  background: transparent;
}

#page-1 .story-text {
  font-size: 1.1rem;
}

.question-label { 
  font-size: 1.4rem; 
  font-weight: normal; 
  display: block; 
  margin-bottom: 0.5rem; 
  color: #1a1005; 
}

.pista-text { 
  font-size: 1.35rem; 
  font-style: italic; 
  margin-top: 1rem; 
  font-weight: normal; 
  color: #e8dcc5; /* Crema suave: más claro y cercano a la fuente principal, sin el brillo neón del dorado */
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* Sombra aligerada para no oscurecer la letra */
  line-height: 1.3;
}

input[type="text"], textarea {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(0,0,0,0.4);
  border-bottom: 2px solid #5a3d2b;
  width: 100%;
  font-family: inherit;
  font-size: 1.3rem; 
  padding: 10px;
  box-sizing: border-box;
}

.btn-next {
  position: absolute;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  padding: 2px 30px;
  font-size: 1.1rem;
  font-family: 'Cinzel', serif;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  opacity: 0;
  border-radius: 2px;
  animation: btnAppear 1s ease forwards;
  animation-delay: 2.5s;
}

.btn-round-arrow {
  position: absolute;
  bottom: 8%;
  right: 10%;
  width: 60px;
  height: 60px;
  background: #d4af37;
  color: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  font-size: 1.8rem;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4), 0 0 10px rgba(212,175,55,0.5);
  border: 2px solid #d4af37;
  z-index: 100;
  opacity: 0;
  animation: btnAppearSimple 1s ease forwards, blink 1.5s infinite;
  animation-delay: 2.5s, 3.5s;
}

@keyframes btnAppearSimple {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes blink {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 15px rgba(0,0,0,0.4), 0 0 10px rgba(212,175,55,0.5); }
  50% { transform: scale(1.1); box-shadow: 0 4px 25px rgba(0,0,0,0.6), 0 0 25px rgba(212,175,55,0.8); }
}

@keyframes btnAppear {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* EFECTOS DE IMAGEN */
.anim-zoom-in { animation: zoomIn 1.5s ease-out forwards; }
.anim-fade-in { animation: fadeIn 2s ease-in forwards; }
.anim-slide-in-right { animation: slideInRight 1.2s ease-out forwards; }
.anim-slide-in-top { animation: slideInTop 1.2s ease-out forwards; }
.anim-blur-in { animation: blurIn 1.5s ease-out forwards; }
.anim-rotate-in { animation: rotateIn 1.5s ease-out forwards; }
.anim-bounce-in { animation: bounceIn 1s cubic-bezier(0.36, 0, 0.66, -0.56) forwards; }
.anim-sepia-to-color { animation: sepiaToColor 2.5s ease-in-out forwards; }

@keyframes zoomIn { from { transform: scale(1.2); } to { transform: scale(1); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes slideInTop { from { transform: translateY(-100%); } to { transform: translateY(0); } }
@keyframes blurIn { from { filter: blur(20px); opacity: 0; } to { filter: blur(0); opacity: 1; } }
@keyframes rotateIn { from { transform: rotate(-5deg) scale(1.1); opacity: 0; } to { transform: rotate(0) scale(1); opacity: 1; } }
@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); opacity: 1; }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); }
}
@keyframes sepiaToColor { from { filter: sepia(1) blur(5px); } to { filter: sepia(0) blur(0); } }

/* Botones unificados */
button, .btn, [class*="btn-"], .custom-skip-btn {
  text-transform: uppercase !important;
}

.btn-gold-solid, .btn-black-gold, .btn-gold-grad, .btn-gold-min, .btn-glass, .btn-next, .btn-round-arrow { 
  background: #d4af37; 
  color: #fff; 
  border: 2px solid #d4af37; 
  border-radius: 8px; 
  transition: all 0.3s ease; 
  text-transform: uppercase !important;
}
.btn-gold-solid:hover, .btn-black-gold:hover, .btn-gold-grad:hover, .btn-gold-min:hover, .btn-glass:hover, .btn-next:hover, .btn-round-arrow:hover { 
  background: #b8962e; 
  border-color: #b8962e; 
}

/* Botón unificado en todo el site (Seguinte / Acciones) */
.btn-next {
  font-weight: normal !important;
  font-size: 1.3rem !important;
  background: #c59b27 !important;
  border-color: #c59b27 !important;
  color: #fff !important;
  text-transform: uppercase !important;
}

.btn-next:hover {
  background: #a27e1f !important;
  border-color: #a27e1f !important;
}

.btn-next .btn-first-letter {
  font-size: 1.65rem !important;
  display: inline-block !important;
  line-height: 0.8 !important;
  vertical-align: middle !important;
}

/* Intro & Preloader UI */
#intro-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  height: 100dvh;
  background: #000;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 1s ease;
}

#intro-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
  background: #000;
}

#skip-intro {
  position: absolute;
  top: 30px; right: 30px;
  background: #d4af37;
  color: #fff;
  border: 2px solid #d4af37;
  padding: 2px 24px;
  font-family: 'Cinzel', serif;
  cursor: pointer;
  z-index: 10000;
  border-radius: 8px;
  backdrop-filter: blur(10px);
  transition: all 0.4s ease;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.8rem;
}

#skip-intro:hover {
  background: #b8962e;
  border-color: #b8962e;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

#preloader {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  z-index: 10001;
}

.loader-gold {
  width: 60px;
  height: 60px;
  border: 2px solid rgba(212, 175, 55, 0.1);
  border-top: 2px solid #d4af37;
  border-radius: 50%;
  animation: spin 1.2s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.loading-text {
  color: #d4af37;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.8;
  animation: pulse 2s infinite;
}

@keyframes pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

/* =========================================
   JERARQUÍA DE TEXTOS (Reglas Globales)
   ========================================= */

/* 1. Preguntas / Páginas sueltas */
body[id] main#app-container .question-label {
  font-variant: small-caps !important;
  font-size: 2.2rem !important;
  line-height: 1.1 !important;
  font-weight: normal !important;
}

/* 2. Textos corridos (Cuerpo) */
body[id] main#app-container .story-text,
body[id] main#app-container #text-container {
  color: #ffe58f !important;
  font-size: 1.1rem !important;
  text-align: center !important;
}

/* 3. Respuestas */
body[id] main#app-container input[type="text"],
body[id] main#app-container textarea {
  text-transform: lowercase !important;
  color: #ffffff !important;
  font-size: 1.3rem !important;
  border-width: 1px !important;
  text-align: center !important;
}

/* 4. Pistas */
body[id] main#app-container .pista-text {
  font-style: italic !important;
  font-size: 1.15rem !important;
  line-height: 1.3 !important;
  font-weight: normal !important;
}

/* =========================================
   AJUSTES MÓVIL GLOBALES (Títulos, Pistas, Espacios)
   ========================================= */
@media (max-width: 768px) {
  body[id] main#app-container .question-label {
    font-size: 1.15rem !important;
  }
  body[id] main#app-container .pista-text {
    font-size: 0.95rem !important;
  }
  body[id] main#app-container form p {
    display: none !important;
  }
}
