/* ===== PALETTE =====*/
:root{
--blue: #2563EB;
--bg: #F8FAFC;
--text: #1F2937;

--orange: #F97316;
--green: #10B981;
--red: #EF4444;
--yellow: #FACC15;
--golden:#DAA520;
}

/*=====BASE====*/
body{
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;

}

/* ======HEADER===== */
.header {
  background: linear-gradient(135deg, #1D4ED8, #2563EB);
  color: white;
  text-align: center;
  padding: 50px 20px;
  position: relative;
  overflow: hidden;
}

.header h1 {
  margin: 0;
  font-size: 2.8rem;
  letter-spacing: 1px;
}

.header p {
  font-size: 1.2rem;
  margin-top: 12px;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.header-emoji {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 10px;
}
/*====SUBTITLES====*/
.subtitle {
    display: inline;
    background: linear-gradient(transparent 29%, #DDF7D8 55%);
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.subtitle2 {
    display: inline-block;
    border-bottom: 3px solid #60A5FA;
    padding-bottom: 4px;
}
/*====HIGHLIGHT====*/
.highlight {
    background-color: #c6b5ff;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: 500;
}

.highlight2 {
    background-color: #e1ffb5;
    background: linear-gradient(transparent 29%, #eaf7d8 55%);
}

.highlight3 {
    display: inline;
    background: linear-gradient(transparent 30%, #ffb4f1 55%);
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.highlight4 {
    background-color: #ddff00;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: 500;
}

.highlight5 {
    display: inline;
    background: linear-gradient(transparent 30%, #ddff00 55%);
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}
/*=====CONTAINER=====*/

.container{
    padding: 20px;
    max-width: 900px;
    margin: auto;
}

/*======INTRO======*/

.intro{
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.intro h2{
    color: var(--blue);
}

/*====PRINCIPAL COLOR=====*/

.btn{
    background-color: var(--golden);
    color: white;
    border: none;
    padding: 15px 25px;
    font-size: 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 15px;
    width: 100%;
    max-width: 300px;
}

.btn:hover{
   opacity: 0.9;
}

/*=====FOOTER=====*/
.footer{
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    color: gray;
    margin-top: 40px;
}

/*=====RESPONSIVE=====*/

@media (max-width: 600px){
    .header h1{
    font-size: 1.8rem;
    }

    .btn{
        padding: 14px;
        font-size: 1rem;
    }
}
/*==CONSEJO==*/

.consejo-card {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.consejo-texto {
  flex: 1;
}

.consejo-texto h4 {
  margin-top: 0;
}

.consejo-emoji {
  font-size: 4rem;
  flex-shrink: 0;
  line-height: 1;
  background: #cffec3;
  border-radius: 12px;
  padding: 16px;
  border: 2px solid var(--green);
}

@media (max-width: 600px) {
  .consejo-card {
    flex-direction: column-reverse;
    align-items: flex-start;
  }
  .consejo-emoji {
    font-size: 3rem;
  }
}


/* ===== VIDEO RESPONSIVE ===== */
.video-container {
  position: relative;
  padding-bottom: 56.25%; 
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  margin: 20px 0;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ===== MODULE CARDS ===== */
.modules h2 {
  color: var(--blue);
  margin-bottom: 15px;
}

.module-card {
  background: white;
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  padding: 20px 25px;
  margin-bottom: 15px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.module-card:hover {
  border-color: var(--blue);
  background-color: #EFF6FF;
  transform: translateX(5px);
}

.btn-secondary {
  background-color: #64748B;
  margin-left: 10px;
}

.quiz-pregunta {
  margin-bottom: 25px;
}

.quiz-opcion {
  display: block;
  width: 100%;
  text-align: left;
  background: #F1F5F9;
  border: 2px solid #E2E8F0;
  border-radius: 8px;
  padding: 12px 15px;
  margin-bottom: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.quiz-opcion:hover:not(:disabled) {
  background: #E2E8F0;
}

.quiz-feedback {
  font-size: 0.95rem;
  margin-top: 5px;
  min-height: 20px;
}

/* ===== ACTIVIDAD ===== */
#game {
  width: 100%;
  box-sizing: border-box;
  background: #DDF4FF;
  border-radius: 25px;
  padding: 30px;
  margin: 20px auto;
  overflow: hidden;
}

#camino {
  position: relative;
  height: 170px;
  overflow: hidden;
  background: linear-gradient(to bottom, #93c5fd 60%, #4ade80 60%, #16a34a 100%);
  border-radius: 20px;
}

#juan {
  position: absolute;
  left: 60px;
  bottom: 15px;
  width: 40px;
  height: 70px;
  transition: transform 0.6s ease, bottom 0.6s ease;
}

.head {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 3px solid black;
  border-radius: 50%;
  left: 13px;
}

.body {
  position: absolute;
  width: 3px;
  height: 20px;
  background: black;
  top: 16px;
  left: 19px;
}

.left-arm {
  position: absolute;
  width: 3px;
  height: 18px;
  background: black;
  left: 19px;
  top: 18px;
  transform: rotate(35deg);
  transform-origin: top;
}

.right-arm {
  position: absolute;
  width: 3px;
  height: 18px;
  background: black;
  left: 19px;
  top: 18px;
  transform: rotate(-35deg);
  transform-origin: top;
}

.left-leg {
  position: absolute;
  width: 3px;
  height: 22px;
  background: black;
  top: 35px;
  left: 19px;
  transform: rotate(25deg);
  transform-origin: top;
}

.right-leg {
  position: absolute;
  width: 3px;
  height: 22px;
  background: black;
  top: 35px;
  left: 19px;
  transform: rotate(-25deg);
  transform-origin: top;
}

/* ===== NUBES ===== */
#paisaje1 {
  position: absolute;
  top: 0;
  width: 900px;
  height: 60px;
}

.nube {
  position: absolute;
  width: 70px;
  height: 22px;
  background: white;
  border-radius: 50px;
  opacity: 0.92;
}

.nube::before {
  content: "";
  position: absolute;
  width: 35px;
  height: 30px;
  background: white;
  border-radius: 50%;
  top: -14px;
  left: 10px;
}

.nube::after {
  content: "";
  position: absolute;
  width: 25px;
  height: 22px;
  background: white;
  border-radius: 50%;
  top: -10px;
  left: 32px;
}

#paisaje2 {
  position: absolute;
  top: 75px;
  font-size: 30px;
  white-space: nowrap;
}


.actividad-card {
  background: white;
  border-radius: 12px;
  padding: 20px 24px;
  margin-top: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  border-left: 4px solid var(--blue);
}

.actividad-num {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 8px 0;
}

.actividad-pregunta {
  font-size: 1.05rem;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.actividad-opcion {
  display: block;
  width: 100%;
  text-align: left;
  background: #F8FAFC;
  border: 2px solid #E2E8F0;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.actividad-opcion:hover:not(:disabled) {
  background: #EFF6FF;
  border-color: var(--blue);
  transform: translateX(4px);
}

.actividad-opcion:disabled {
  cursor: default;
}

/* ===== JUAN TIRADO ===== */

#juan.tirado {
  transform: rotate(90deg);
  bottom: 2px;
}

#juan.arrodillado {
  transform: rotate(45deg);
  bottom: 8px;
}

/* ===== GLOBO DE DIALOGO ===== */
#juan-dialogo {
  position: absolute;
  left: 62px;
  bottom: 70px;
  background: white;
  border: 2px solid #1F2937;
  border-radius: 10px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: bold;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 20;
  pointer-events: none;
}

#juan-dialogo::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 12px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #1F2937;
}

#juan-dialogo.visible {
  opacity: 1;
}

/*CASA*/
#meta-casa {
  position: absolute;
  right: -80px;
  bottom: 10px;
  font-size: 110px;
  z-index: 10;
  opacity: 0;
  transition: right 0.05s linear, opacity 0.3s ease;
}

/*JUAN VITORIA*/
#juan.victoria {
    transform: rotate(0deg) !important;
    bottom: 15px !important;
    animation: salto 0.8s ease forwards;
}

@keyframes brazo-izquierdo {
    0%   { transform: rotate(-30deg); }
    50%  { transform: rotate(-160deg); }
    100% { transform: rotate(-30deg); }
}

@keyframes brazo-derecho {
    0%   { transform: rotate(30deg); }
    50%  { transform: rotate(160deg); }
    100% { transform: rotate(30deg); }
}

#juan.victoria .left-arm {
    animation: brazo-izquierdo 0.6s ease 2;
}

#juan.victoria .right-arm {
    animation: brazo-derecho 0.6s ease 2;
}

@keyframes salto {
    0%   { bottom: 15px; }
    25%  { bottom: 50px; }
    50%  { bottom: 15px; }
    75%  { bottom: 40px; }
    100% { bottom: 15px; }
}

#juan-dialogo.victoria-dialogo {
    bottom: 100px;
}

/* ===== ACTIVIDAD MODULO 2 ===== */
#game-estafas {
  width: 100%;
  box-sizing: border-box;
  background: #DDF4FF;
  border-radius: 25px;
  padding: 20px;
  margin: 20px auto;
  overflow: hidden;
}

/* --- ESCENA CUARTO --- */
#escena-cuarto {
  position: relative;
  height: 170px;
  background: linear-gradient(to bottom, #f4f1ea 0%, #e9e2d8 100%);
  border-radius: 20px;
  overflow: hidden;
}

#piso {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 28px;
  background: #b58a5a;
  border-top: 4px solid #8b5e3c;
}

#cuarto-fondo {
  position: absolute;
  width: 100%;
  height: 100%;
}

#ventana {
  position: absolute;
  top: 20px;
  left: 400px;

  width: 210px;
  height: 75px;

  background: #9fd3ff;
  border: 5px solid #8b5e3c;
  border-radius: 6px;
  overflow: hidden;
  z-index: 5;

}

#ventana::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 4px;
  height: 100%;
  background: #8b5e3c;
}

#ventana::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 4px;
  background: #8b5e3c;
}

#ventana-cielo{
  position: relative;
    display:flex;
    justify-content:center;
    align-items:center;
    width:100%;
    height:100%;
    background:linear-gradient(to bottom,#87CEEB,#DFF4FF);
    font-size:200px;
    top: 25px;
}

.cortina{
    position: absolute;
    top: 0;
    width: 28px;
    height: 100px; 
    background: linear-gradient(to right, #4f91d8, #6b93f2);
    z-index: 10;
}

.cortina-izquierda{
    left: 0;
    border-radius: 0 6px 6px 0;
}

.cortina-derecha{
    right: 0;
    border-radius: 6px 0 0 6px;
}

.cortina::after{
    content:"";
    position:absolute;
    inset:0;
    background: repeating-linear-gradient(
        90deg,
        rgba(255,255,255,0.15) 0px,
        rgba(255,255,255,0.15) 4px,
        transparent 4px,
        transparent 8px
    );
}

/*poner el boton de la actividad antes de que muestre el paisaje*/
/*mensaje final de juan de gracias por ayudarme para cerrar la actividad*/
#ventana::after{
    content:"";
    position:absolute;
    top:-6px;
    left:-4px;
    width:calc(100% + 8px);
    height:5px;
    background:#1F2937;
    border-radius:3px;
    z-index:15;
}

.cuadro {
  position: absolute;
  width: 42px;
  height: 42px;
  border: 4px solid #8b5e3c;
  background: #fffdf8;
  border-radius: 4px;

  display: flex;
  justify-content: center;
  align-items: center;

  font-size: 40px; 
}

.cuadro1{
    left:180px;
    top:25px;
}

.cuadro2{
    left:235px;
    top:35px;
}

.cuadro1::after{
    content:"🌉";
}

.cuadro2::after{
    content:"🖼️";
}
#mesa {
  position: absolute;
  bottom: 55px;
  right: 60px;
  width: 120px;
  height: 10px;
  background: #92400e;
  border-radius: 4px;
  z-index: 2;
}

#mesa::before {
  content: "";
  position: absolute;
  bottom: -30px;
  left: 10px;
  width: 8px;
  height: 30px;
  background: #92400e;
  border-radius: 2px;
}

#mesa::after {
  content: "";
  position: absolute;
  bottom: -30px;
  right: 10px;
  width: 8px;
  height: 30px;
  background: #92400e;
  border-radius: 2px;
}

#lampara {
  position: absolute;
  top: 12px;
  right: 90px;
  font-size: 28px;
}

#cama {
  position: absolute;
  bottom: 0px;
  left: 30px;
  font-size: 65px;
}

/* JUAN EN EL CUARTO */
#juan-estafas {
  position: absolute;
  left: 50%;
  bottom: 15px;
  transform: translateX(-50%);
  width: 40px;
  height: 70px;
  transition: transform 2s linear;
  z-index: 20;
}

/* TELEFONO */
#telefono-cuarto {
  position: absolute;
  right: 150px;
  bottom: 60px;
  width: 14px;
  height: 24px;
  background: #1e293b;
  border-radius: 6px;
  border: 2px solid #475569;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.7s;
  transform-origin: center center;
  z-index: 3;
}

#telefono-pantalla-off {
  width: 10px;
  height: 18px;
  background: #0f172a;
  border-radius: 4px;
  margin: 2px auto;
}

#notificacion-ping {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 30px;
  opacity: 0;
  transition: opacity 0.3s;
}

#notificacion-ping.ping-animado {
  opacity: 1;
  animation: ping-bounce 0.5s ease 3;
}

@keyframes ping-bounce {
  0%   { transform: translateX(-50%) translateY(0); }
  50%  { transform: translateX(-50%) translateY(-6px); }
  100% { transform: translateX(-50%) translateY(0); }
}

#telefono-cuarto.zoom-telefono {
  transform: scale(18);
  opacity: 0;
}

/* DIALOGO DE JUAN ESTAFAS */
#juan-dialogo-estafas {
  position: absolute;
  bottom: 75px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 2px solid #1F2937;
  border-radius: 10px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: bold;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
  z-index: 20;
}

#juan-dialogo-estafas::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #1F2937;
}

#juan-dialogo-estafas.visible {
  opacity: 1;
}

/* --- ESCENA TELEFONO --- */
#escena-telefono {
  display: none;
}

#telefono-frame {
  background: #1e293b;
  border-radius: 24px;
  padding: 12px;
  max-width: 360px;
  margin: 0 auto 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

#telefono-header {
  background: #0f172a;
  border-radius: 12px 12px 0 0;
  padding: 8px 12px;
}

#telefono-status {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  font-size: 12px;
  margin-bottom: 6px;
  opacity: 0.7;
  color: white;
}

#telefono-app-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-size: 0.95rem;
  font-weight: bold;
}

#telefono-chat {
  background: #e2e8f0;
  min-height: 120px;
  padding: 16px;
  border-radius: 0 0 12px 12px;
}

#burbuja-mensaje {
  background: white;
  border-radius: 12px 12px 12px 2px;
  padding: 12px 14px;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 90%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  color: #1e293b;
}

#telefono-hora {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 4px;
  padding-left: 4px;
}
/* TRADUCCION */
.language-switcher {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
  z-index: 100;
}

.lang-btn {
  background: rgba(255,255,255,0.2);
  color: white;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
}

.lang-btn:hover {
  background: rgba(255,255,255,0.35);
}

.lang-activo {
  background: white;
  color: var(--blue);
  border-color: white;
}