* {
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}


body {
 margin: 0;
  min-height: 100vh;
  background-image: url(../images/Gemini_Generated_Image_ddenxbddenxbdden.png);
  background-size: cover;
  background-position: center;

  display: flex;
  flex-direction: column;
  align-items: center;

  color: #111;
}

button { 
  background: #222; 
  color: #fff; 
  border: none; 
  padding: 14px 32px; 
  font-size: 22px; 
  border-radius: 10px; 
  cursor: pointer; 
  margin-top: 20px; 
}

#testArea, #resultArea {
  background: #fff;
  padding: 30px;
  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;
  font-size: 16px;
  width: 90%;
  max-width: 700px;
  min-height: 400px;
  margin-bottom: 20px;
}

  .navbar {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  
  width: 700px;
  height: 60px;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;

  padding: 0 40px;
  background: #fff;
  border: 2px solid #000;
  border-radius: 14px;

  z-index: 9999;
}

.drop-btn {
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: #222;
  transition: 0.2s;
}

.drop-btn:hover {
  background: #f0f0f0;
}

.menu-item {
  position: relative;
  font-size: 30px;
  cursor: pointer;
}

.menu-item span {
  padding: 6px 10px;
}

.dropdown-box {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  min-width: 160px;
  flex-direction: column;
  gap: 8px;
}

.menu-item:hover .dropdown-box {
  display: flex;
}

.logo {
  position: absolute;
  left: 20px;         
  top: 50%;
  transform: translateY(-50%);
}

.logo img {
  height: 45px;      
  width: auto;        
  display: block;
}

#word{ font-size: 30px; 
  text-align: center; 
}

#counter { 
  font-size: 40px; 
  margin-bottom: 30px; 
  text-align: center; 
}



#startBtn {
  background: #222;
  color: #fff;
  margin-top: 500px;
  border: none;
  padding: 14px 32px;
  font-size: 22px;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 20px;
}
#nextBtn {
  display: block;
  background: #222;
  margin: 20px auto 0 auto;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
    color: #fff;

}
#restartBtn{
  display: block;
  background: #222;
  margin: 20px auto 0 auto;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
    color: #fff;

}
.wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 900px;
  min-height: 100vh;
  padding-top: 120px; 
  padding-bottom: 20px;
}

.test-box {
  border-radius: 16px;
  padding: 40px;
  width: 90%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  margin-top: 20px;
}

.my-footer {
  width: 100%;
  height: 100px;
  background: #393636;
  color: white;
  text-align: center;
  border-top: 3px solid #555;
  margin-top: auto; 
}



/* Силлабли */
#syllables {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.syllable {
  padding: 13px 23px;
  font-size: 26px;
  background: #f9f9f9;
  border-radius: 12px;
  border: 2px solid #ddd;
  transition: 0.25s;
  color: #000;
}

.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;
}

#h1Main{
  font-size: 25px;
}


/* Планшети */
@media (max-width: 1024px) {

  .navbar {
    width: 90%;
    gap: 20px;
    padding: 0 20px;
  }

  #testArea, #resultArea {
    max-width: 90%;
    height: auto;
    padding: 25px;
  }

  #counter {
    font-size: 32px;
  }

  #word {
    font-size: 24px;
  }

  .syllable {
    font-size: 22px;
    padding: 10px 16px;
  }
}

/* Телефони */
@media (max-width: 768px) {

  .navbar {
    width: 95%;
    height: 50px;
    gap: 10px;
  }

  .menu-item {
    font-size: 18px;
  }

  .logo img {
    height: 32px;
  }

  .wrapper {
    padding-top: 90px;
  }

  #testArea, #resultArea {
    width: 96%;
    padding: 18px;
    font-size: 16px;
  }

  #counter {
    font-size: 26px;
    margin-bottom: 15px;
  }

  #word {
    font-size: 22px;
  }

  #syllables {
    gap: 10px;
  }

  .syllable {
    font-size: 18px;
    padding: 8px 14px;
  }

  #startBtn,
  #nextBtn,
  #restartBtn {
    font-size: 16px;
    padding: 10px 18px;
  }
}

@media (max-width: 480px) {

  .menu-item {
    font-size: 16px;
  }

  #counter {
    font-size: 22px;
  }

  #word {
    font-size: 18px;
  }

  .syllable {
    font-size: 16px;
    padding: 6px 10px;
  }

  #startBtn,
  #nextBtn,
  #restartBtn {
    font-size: 14px;
    padding: 8px 14px;
  }

}

/* дуже вузькі телефони */
@media (max-width: 360px) {

 .navbar {
    top: 15px;
    width: 95%;
    height: 45px;
    gap: 8px;
    padding: 0 8px;
  }

  .menu-item {
    font-size: 14px;
  }

  .logo img {
    height: 24px;
  }

  .dropdown-box {
    min-width: 110px;
    padding: 6px;
  }

  .drop-btn {
    padding: 5px 8px;
    font-size: 14px;
  }

  .wrapper {
    padding-top: 80px;
  }

  .test-box {
    width: 100%;
    padding: 12px;
  }

  #testArea,
  #resultArea {
    width: 98%;
    padding: 14px;
    font-size: 14px;
  }

  #counter {
    font-size: 20px;
    margin-bottom: 10px;
  }

  #word {
    font-size: 16px;
  }

  #syllables {
    gap: 6px;
    flex-wrap: wrap;
  }

  .syllable {
    font-size: 14px;
    padding: 6px 8px;
  }

  #startBtn,
  #nextBtn,
  #restartBtn {
    font-size: 13px;
    padding: 8px 10px;
    width: 100%;
  }

}
