/* ════════════════════════════════════════════════
   La Vecina del Entresuelo B — style.css
   Paleta: Navy #0B214A · Turq #00E6BC · Lime #04FFB4
           Mint #C5FFDF · Lemon #FFFFAB · Rojo #E74C3C
   Fuente: Baloo 2 (Google Fonts)
════════════════════════════════════════════════ */

:root {
  --navy:      #0B214A;
  --turq:      #00E6BC;
  --lime:      #04FFB4;
  --mint:      #C5FFDF;
  --lemon:     #FFFFAB;
  --rojo:      #E74C3C;
  --white:     #FFFFFF;
  --grey:      #F5F5F5;
  --text-dark: #333333;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: 'Baloo 2', sans-serif;
  background: var(--navy);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* ─── FONDOS DE ESCENA ─── */
.scene-bg {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center bottom;
  transition: opacity 0.3s ease;
  opacity: 0;
  z-index: 0;
}
.scene-bg.active { opacity: 1; }

/* ─── THREE.JS CANVAS ─── */
#game-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  touch-action: none; /* prevent browser from intercepting touch gestures */
}

/* ─── WRAPPER ─── */
/* pointer-events: none so clicks pass through to the canvas for 3D rotation */
.wrapper {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  padding-top: max(env(safe-area-inset-top), constant(safe-area-inset-top));
  padding-bottom: max(env(safe-area-inset-bottom), constant(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

/* ─── HUD ─── */
.hud {
  position: relative;
  z-index: 100;
  padding: 8px 16px 12px 16px;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.round-dots { display: flex; gap: 8px; }
.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid var(--turq);
  background: transparent;
  transition: background 0.3s;
}
.dot.filled { background: var(--turq); }

/* ─── TEXTO FLOTANTE ─── */
.floating-text {
  position: fixed;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Baloo 2', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--mint);
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  background: rgba(0,0,0,0.55);
  border-radius: 8px;
  padding: 8px 16px;
  max-width: 80vw;
  text-align: center;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  z-index: 250;
  transition: opacity 0.2s ease;
}
.floating-text.visible { opacity: 1; }
.floating-text.toast-wrong { color: #ff8080; }
.round-transition { color: var(--turq); font-size: 32px; background: none; padding: 0; }

/* ─── OVERLAYS ─── */
/* overlays must re-enable pointer-events since wrapper disables them */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 200;
  pointer-events: auto;
}
.overlay.overlay-dark { background: rgba(0,0,0,0.75); }
.overlay.hidden { display: none; }

/* ─── PANELS ─── */
.panel {
  background: var(--white);
  border-radius: 10px;
  padding: 28px 24px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}

.panel-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--turq);
  text-align: center;
  margin-bottom: 12px;
  background: var(--navy);
  border-radius: 6px;
  padding: 8px 16px;
}
.panel-desc {
  font-size: 15px;
  color: var(--text-dark);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 20px;
}

.tutorial-panel { text-align: center; }
.tutorial-panel p {
  font-size: 15px;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 16px;
}

.inspect-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.inspect-icon  { font-size: 24px; }
.inspect-title { font-size: 20px; font-weight: 700; color: var(--navy); }
.inspect-desc  {
  font-size: 14px; color: #555; margin-bottom: 16px;
  line-height: 1.5; border-bottom: 1px solid #eee; padding-bottom: 12px;
}
.inspect-options { display: flex; flex-direction: column; gap: 10px; }

.error-panel { max-height: 85vh; overflow-y: auto; }
.error-title { font-size: 20px; font-weight: 800; color: var(--rojo); margin-bottom: 16px; }
.error-body  { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.error-body p {
  font-size: 14px; color: var(--text-dark); line-height: 1.5;
  padding: 8px 12px; background: #fafafa;
  border-radius: 2px; border-left: 3px solid var(--rojo);
}
.error-body strong { color: var(--navy); }

/* ─── ROUND INTRO ─── */
.round-intro-panel  { text-align: center; }
.round-intro-badge  {
  display: inline-block; background: var(--navy); color: var(--turq);
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 14px; border-radius: 20px; margin-bottom: 14px;
}
.round-intro-title  { font-size: 22px; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.round-intro-hint   { font-size: 14px; color: #555; line-height: 1.6; margin-bottom: 20px; }

/* ─── RESULTS / OUTRO ─── */
.results-panel  { text-align: center; }
.results-check  { font-size: 64px; color: var(--turq); line-height: 1; margin-bottom: 12px; }
.results-title  { font-size: 24px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.results-desc   { font-size: 14px; color: #555; line-height: 1.6; margin-bottom: 16px; }
.results-learnings { background: #f5f5f5; border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; text-align: left; }
.results-learnings-title { font-size: 12px; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.results-learnings ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.results-learnings li { font-size: 13px; color: #444; line-height: 1.4; padding-left: 20px; position: relative; }
.results-learnings li::before { content: '✓'; position: absolute; left: 0; color: var(--turq); font-weight: 700; }

/* ─── BOTONES ─── */
.btn {
  display: block; width: 100%; padding: 16px; border: none;
  border-radius: 6px; font-family: 'Baloo 2', sans-serif;
  font-size: 16px; font-weight: 700; cursor: pointer;
  transition: opacity 0.15s, transform 0.1s; text-align: center;
}
.btn:active { opacity: 0.8; transform: scale(0.98); }
.btn-primary { background: var(--turq); color: var(--navy); }
.btn-option  { background: var(--grey); color: var(--navy); font-size: 15px; padding: 14px 16px; transition: background 0.2s, color 0.2s; }
.btn-option.flash-correct { background: var(--turq); color: var(--navy); }
.btn-option.flash-wrong   { background: var(--rojo); color: var(--white); }
.btn-error   { background: var(--rojo); color: var(--white); }

/* ─── RESULTS LAYOUT MODE ─── */
html.results body { overflow: auto; }
html.results .wrapper { height: auto; min-height: 100%; }
