* {
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background-image: url(./Gemini_Generated_Image_9h47b39h47b39h47\ \(1\).png);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #111;
}

button {
  border: none;
  cursor: pointer;
}

#startBtn,
#nextBtn {
  background: #222;
  color: #fff;
  padding: 14px 32px;
  font-size: 25px;
  border-radius: 10px;
  margin: 20px 0;
  transition: 0.2s;
}

#nextBtn {
  display: block;
  margin: 30px auto 0;
}

#startBtn:hover,
#nextBtn:hover {
  background: #000;
}

#testArea,
#resultArea {
  background: #fff;
  height: 500px;
  width: 90%;        
  max-width: 700px;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  text-align: center;
  display: flex;             
  flex-direction: column;    
  align-items: center;
  position: relative;   
  font-size: 18px;
}

#counter {
  font-size: 40px;
  color: #555;
  margin-bottom: 30px;
}

#syllables {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 40px 0;
  flex-wrap: wrap;
}

.syllable {
  padding: 18px 28px;
  font-size: 26px;
  background: #f9f9f9;
  border-radius: 12px;
  border: 2px solid #ddd;
  transition: 
    border-color 0.25s,
    color 0.25s,
    transform 0.15s,
    box-shadow 0.25s;
}

.syllable.correct {
   border-color: #1b5e20;
  color: #1b5e20;
  font-weight: 600;
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(27, 94, 32, 0.5);
}

.syllable.wrong {
  border-color: #7f1d1d;
  color: #7f1d1d;
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(127, 29, 29, 0.5);
}

.syllable.disabled {
  pointer-events: none;
  opacity: 0.85;
}

#restartBtn {
  display: block;
  margin: 30px auto 0;
  background: #222;
  color: #fff;
  padding: 14px 32px;
  font-size: 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
}

#text{
  color: #000;
  font-size: medium;
  position: absolute;       
  bottom: 10px;            
  left: 50%;            
  transform: translateX(-50%);
}


@media (max-width: 768px) {
  #testArea, #resultArea {
    height: auto;      
    padding: 30px;
  }

  #counter {
    font-size: 32px;
    margin-bottom: 20px;
  }

  .syllable {
    padding: 14px 20px;
    font-size: 22px;
  }

  #startBtn, #nextBtn, #restartBtn {
    font-size: 22px;
    padding: 12px 28px;
  }

  #text {
    font-size: 18px;
    bottom: 8px;
  }
}

@media (max-width: 480px) {
  #counter {
    font-size: 28px;
  }

  .syllable {
    padding: 12px 16px;
    font-size: 18px;
  }

  #startBtn, #nextBtn, #restartBtn {
    font-size: 18px;
    padding: 10px 24px;
  }

  #text {
    font-size: 12px;
    bottom: 6px;
  }
}
