:root {
  --font-banner: 'comic sans ms';
}

body {
  background-image: url('../assets/images/fondo.png');
  background-size: cover;
  background-attachment: fixed;
}

.navbar-custom {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 5px dashed var(--color-primary);
  border-radius: 0 0 2.5rem 2.5rem;
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--color-primary) !important;
}

.btn-back-home {
  background: var(--color-accent);
  border: 3px solid #fff;
  font-family: var(--font-title);
  font-size: 1.1rem;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  color: #fff !important;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-back-home:hover {
  background: var(--color-primary);
  transform: scale(1.06);
}

.text-secondary {
  color: white !important;
}

/* Header letters bouncing animation */
.font-banner-letras span {
  font-family: var(--font-banner);
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
  margin: 0 3px;
  display: inline-block;
  animation: bounce-letters-letras 2s ease-in-out infinite alternate;
}

.font-banner-letras span:nth-child(1) { animation-delay: 0.1s; color: #ff1744; }
.font-banner-letras span:nth-child(2) { animation-delay: 0.2s; color: #0288d1; }
.font-banner-letras span:nth-child(3) { animation-delay: 0.3s; color: #f57f17; }
.font-banner-letras span:nth-child(4) { animation-delay: 0.4s; color: #2e7d32; }
.font-banner-letras span:nth-child(5) { animation-delay: 0.5s; color: #9c27b0; }
.font-banner-letras span:nth-child(6) { animation-delay: 0.6s; color: #ff1744; }

@keyframes bounce-letters-letras {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-15px) rotate(5deg); }
}

.section-title {
  font-family: var(--font-title);
  color: var(--color-primary);
  text-shadow: 2px 2px 0px rgba(0,0,0,0.05);
  margin-bottom: 2rem;
  font-weight: 700;
}

/* Letters Grid Board */
.letter-board-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 992px) {
  .letter-board-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 576px) {
  .letter-board-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

/* Letter Card */
.letter-card {
  background: white;
  border-radius: 1.5rem;
  border: 4px dashed var(--color-border);
  padding: 0.8rem 0.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.letter-card:hover {
  transform: translateY(-5px) scale(1.04);
  box-shadow: var(--shadow-lg);
}

.letter-display-name {
  font-family: var(--font-banner);
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 4px;
  text-shadow: 2px 2px 0px rgba(0,0,0,0.08);
  display: flex;
  gap: 4px;
  justify-content: center;
}

.letter-display-name span.upper {
  text-transform: uppercase;
}

.letter-display-name span.lower {
  text-transform: lowercase;
  font-size: 2rem;
  align-self: flex-end;
  margin-left: 2px;
}

.letter-display-example {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: #555;
}

/* Showcase display */
.letter-display-canvas {
  background: #fff;
  border: 6px dashed var(--color-primary);
  border-radius: 2.5rem;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.5s ease;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  padding: 2rem;
}

.letter-display-emoji {
  font-size: 5.5rem;
  animation: float-deco 3s ease-in-out infinite;
  display: inline-block;
}

.letter-display-char {
  font-family: var(--font-banner);
  font-size: 5rem;
  font-weight: 900;
  color: #333;
  margin: 0.5rem 0;
  text-shadow: 4px 4px 0px rgba(0,0,0,0.06);
}

.letter-display-word {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 700;
  color: #555;
  text-transform: capitalize;
}

/* Blackboard / Pizarra */
.tracing-container {
  background: #2e3d30;
  border-radius: 2.5rem;
  border: 10px solid #8d6e63;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), inset 0 0 30px rgba(0, 0, 0, 0.5);
  padding: 1.5rem;
  position: relative;
}

.chalkboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.2);
  padding-bottom: 0.5rem;
}

.chalkboard-title {
  font-family: var(--font-title);
  color: #fafafa;
  font-size: 1.3rem;
  margin: 0;
  font-weight: 700;
}

.chalk-colors {
  display: flex;
  gap: 10px;
}

.chalk-btn {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 2px solid #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

.chalk-btn.selected {
  transform: scale(1.25);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.4);
}

.tracing-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 300px;
  background: transparent;
  border-radius: 1rem;
  overflow: hidden;
  touch-action: none;
}

#tracingCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  z-index: 2;
}

.tracing-guide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-banner);
  font-size: 11rem;
  color: rgba(255, 255, 255, 0.16);
  user-select: none;
  z-index: 1;
  pointer-events: none;
}

.btn-clear-chalk {
  background: #d32f2f;
  color: #fff;
  font-family: var(--font-title);
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: all 0.2s ease;
  font-weight: 700;
}
.btn-clear-chalk:hover {
  background: #b71c1c;
  transform: scale(1.05);
}

.speech-badge {
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.85rem;
  font-family: var(--font-body);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  animation: palpitar 1.2s infinite;
}

@keyframes palpitar {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(255, 214, 0, 0.7);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(255, 214, 0, 0.9);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(255, 214, 0, 0.7);
  }
}

.speech-badge:hover {
  background: var(--color-accent);
  transform: scale(1.05);
}

/* Experience 2 Placeholder Styling */
.placeholder-game-container {
  background: #fff;
  border-radius: 2.5rem;
  border: 5px dashed var(--color-primary);
  padding: 3rem 2rem;
  box-shadow: var(--shadow-md);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.placeholder-game-container:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.placeholder-cardboard {
  background: #fffef2;
  border: 4px dashed var(--color-secondary);
  border-radius: 2rem;
  padding: 2.5rem 1.5rem;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
}

.placeholder-emoji {
  font-size: 5rem;
  animation: float-deco 3s ease-in-out infinite;
  display: inline-block;
  margin-bottom: 15px;
}

.placeholder-title {
  font-family: var(--font-title);
  color: var(--color-primary);
  font-weight: 900;
  margin-bottom: 12px;
}

.placeholder-description {
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: #555;
  font-weight: 700;
  margin-bottom: 20px;
}

.placeholder-badge {
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-title);
  font-size: 1rem;
  padding: 0.6rem 2rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  box-shadow: var(--shadow-sm);
  border: 2px solid #fff;
}

/* Experience 3: Phonetic Quiz */
.quiz-wrapper {
  position: relative;
  min-height: 500px;
}

.quiz-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .97);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  border-radius: 25px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  border: 10px dashed var(--color-primary);
}

.quiz-overlay-content {
  text-align: center;
  max-width: 380px;
}

.quiz-overlay-content h3 {
  font-family: var(--font-title);
  color: var(--color-primary);
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 15px;
  text-shadow: 2px 2px 0px rgba(0,0,0,0.05);
}

.quiz-overlay-content p {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: #555;
  font-weight: 700;
  margin-bottom: 25px;
}

.quiz-container {
  background: #fff;
  border-radius: 2.5rem;
  border: 5px dashed var(--color-secondary);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.quiz-speaker-box {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  font-size: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem auto;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 20px rgba(124, 77, 255, 0.3);
  animation: palpitar 1.5s infinite;
}

.quiz-speaker-box:hover {
  transform: scale(1.1) rotate(5deg);
  background: var(--color-accent);
}

.quiz-question-text {
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 1.5rem;
}

.quiz-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  max-width: 500px;
  margin: 1.5rem auto;
}

@media (max-width: 576px) {
  .quiz-options-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.quiz-option-btn {
  background: #fff;
  border: 4px solid var(--color-border);
  border-radius: 1.5rem;
  padding: 1rem 1.5rem;
  font-family: var(--font-banner);
  font-size: 2.4rem;
  font-weight: 900;
  color: #333;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 2px 2px 0px rgba(0,0,0,0.06);
}

.quiz-option-btn:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: var(--shadow-md);
}

.quiz-option-btn.correct {
  background: #e8f5e9;
  border-color: var(--color-success) !important;
  color: var(--color-success) !important;
  animation: success-pulse 0.5s ease-in-out;
}

.quiz-option-btn.wrong {
  background: #ffebee;
  border-color: var(--color-danger) !important;
  color: var(--color-danger) !important;
  animation: shake 0.5s ease-in-out;
}

.quiz-score-stars {
  font-family: var(--font-title);
  font-size: 1.3rem;
  color: var(--color-primary);
  font-weight: 700;
}

@keyframes success-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); box-shadow: 0 0 20px var(--color-success); }
  100% { transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
