/* Genel sıfırlama stilleri */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Sayfa genel görünümü */
body {
  font-family: Arial, sans-serif;
  text-align: center;
  margin: 20px;
  background-color: #f0f0f0;
  font-size: 16px;
}

/* Ana kapsayıcı */
.container {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Başlık alanı */
header {
  margin-bottom: 30px;
}

/* Ana başlık */
h1 {
  color: #555;
  font-size: 2rem;
  margin-bottom: 15px;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  border-radius: 15px;
  background: #e6f0fa;
}

/* Giriş metni */
header p {
  font-size: 18px;
  line-height: 1.5;
  color: #555;
  margin: 0 0 20px;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  border-radius: 15px;
  background: #e6f0fa;
  padding: 20px;
}

/* Seviye kutuları kapsayıcısı */
.levels {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

/* Tek tek seviye kutusu */
.level-card {
  background: #e6f0fa;
  border-radius: 10px;
  padding: 15px;
  width: 100%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  text-align: center;
  transition: transform 0.2s;
}

.level-card:hover {
  transform: scale(1.02);
}

.level-card-title {
  font-size: 1.5rem;
  color: #007bff;
  margin-bottom: 10px;
}

.level-card p {
  font-size: 1rem;
  color: #555;
  line-height: 1.4;
  margin-bottom: 15px;
}

.level-card button {
  padding: 12px 24px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}

.level-card button:hover {
  background: #218838;
}

/* Oyun sayfaları için stiller */
.word-bank, .sentence {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
  min-height: 40px;
  padding: 15px;
  border-radius: 8px;
}

.word-bank {
  background-color: #e6f3ff;
  color: white;
}

.sentence {
  background-color: #fff;
  border: 2px dashed #ccc;
}

.word {
  padding: 12px 16px;
  background-color: #007bff;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
  border: 1px solid #0056b3;
  font-size: 17px;
}

.word:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

.word.correct {
  background-color: #28a745;
  color: white;
  border-color: #1f8134;
}

.word.error {
  background-color: #dc3545;
  color: white;
  border-color: #a71d2a;
}

.word.fixed {
  cursor: not-allowed;
  opacity: 0.9;
}

.placeholder {
  padding: 12px 16px;
  color: #555;
  border: 1px dashed #ccc;
  border-radius: 6px;
  font-size: 17px;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px; /* Kelime kutularıyla uyumlu genişlik */
}

.buttons {
  margin: 20px 0;
  display: flex;
  flex-direction: column; /* Hint butonu için column yapısı */
  align-items: center;
  gap: 10px;
}

.navigation-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}

.nav-levels {
  display: flex;
  flex-direction: row;
  gap: 10px;
  justify-content: center;
}

#next-btn {
  padding: 12px 20px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  border-radius: 4px;
  transition: background-color 0.2s, transform 0.2s;
  background-color: #28a745;
  color: white;
}

#next-btn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

#next-btn:hover:not(:disabled) {
  background-color: #218838;
  transform: scale(1.05);
}

#result {
  font-weight: bold;
  margin-top: 20px;
  font-size: 1.2rem;
  min-height: 24px;
}

.success {
  color: #28a745;
}

.error {
  color: #dc3545;
}

.instructions {
  margin: 20px 0;
  padding: 15px;
  background-color: orange;
  border-radius: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: white;
}

.instructions h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.instructions p {
  font-size: 16px;
}

.stats {
  display: flex;
  justify-content: space-around;
  margin: 20px 0;
  font-size: 1.3rem;
  font-weight: bold;
  background-color: #f8f1e9;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stats p {
  color: #555;
}

.back-home, .next-level {
  display: inline-block;
  padding: 12px 20px;
  background-color: #28a745;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.2s, transform 0.2s;
  font-size: 16px;
  text-align: center;
  min-width: 150px;
}

.back-home:hover, .next-level:hover {
  background-color: #218838;
  transform: scale(1.05);
}

/* Yeni eklenen stiller */
.level-header {
  background: #e6f0fa;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  color: #555;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.instructions .level-header {
  background: orange;
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.level-card h3 {
  font-size: 1rem;
  color: #555;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  margin: 10px 0;
}

header h3 {
  font-size: 1rem;
  color: #555;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  margin: 10px 0;
}

footer {
  background: #e6f0fa;
  border-radius: 10px;
  padding: 15px;
  margin-top: 40px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  color: #555;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

/* Tips bölümü için stil */
.tips {
  margin: 20px 0;
  padding: 15px;
  background-color: #fff3cd;
  border-radius: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: #555;
  text-align: left; /* Metni sola hizala */
}

.tips ul,
.tips li {
  text-align: left; /* Liste elemanlarını sola hizala */
}

.tips h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

.tips p {
  font-size: 16px;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  text-align: left;
  padding-left: 10px;
  margin: 5px 0;
}

/* Sticky Header Stilleri */
.sticky-header {
  position: sticky;
  top: 0;
  background-color: #f0f0f0;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  padding: 10px 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.home-link {
  font-size: 1.5rem;
  text-decoration: none;
  color: #28a745;
  transition: color 0.2s;
}

.home-link:hover {
  color: #218838;
}

.dropdown {
  position: relative;
}

.dropdown-btn {
  background-color: #f0f4f0;
  color: #333;
  border: none;
  padding: 8px 16px;
  font-size: 1rem;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.dropdown-btn:hover {
  background-color: #77DD77;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  min-width: 150px;
  z-index: 1000;
}

.dropdown-menu a {
  display: block;
  padding: 10px 15px;
  color: #555;
  text-decoration: none;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  transition: background-color 0.2s;
}

.dropdown-menu a:hover {
  background-color: #e6f0fa;
}

/* Hint butonu stilleri */
.hint-btn {
  width: auto;
  height: auto;
  cursor: pointer;
  margin-bottom: 10px;
  transition: opacity 0.2s, transform 0.2s;
}

.hint-btn:hover:not(.disabled) {
  opacity: 0.8;
  transform: scale(1.05);
}

.hint-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mobil uyumluluk */
@media (max-width: 600px) {
  body {
    margin: 10px;
    font-size: 14px;
  }

  .container {
    padding: 15px;
  }

  h1 {
    font-size: 1.5rem;
  }

  header p {
    font-size: 16px;
  }

  .level-card {
    padding: 12px;
    max-width: 100%;
  }

  .level-card h2 {
    font-size: 1.3rem;
  }

  .level-card p {
    font-size: 0.9rem;
  }

  .level-card button {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .instructions h2 {
    font-size: 1.2rem;
  }

  .instructions p {
    font-size: 14px;
  }

  .word {
    padding: 10px 14px;
    font-size: 16px;
  }

  .placeholder {
    padding: 10px 14px;
    font-size: 16px;
    min-width: 50px;
  }

  #next-btn {
    padding: 10px 18px;
    font-size: 14px;
  }

  .stats {
    flex-direction: column;
    gap: 10px;
    font-size: 1.1rem;
  }

  .word-bank, .sentence {
    padding: 10px;
  }

  .navigation-buttons {
    gap: 8px;
  }

  .nav-levels {
    flex-direction: column;
    gap: 8px;
  }

  .back-home, .next-level {
    padding: 10px 18px;
    font-size: 14px;
    min-width: 120px;
  }

  .level-header {
    font-size: 1.3rem;
    padding: 12px;
  }

  .level-card h3, header h3 {
    font-size: 0.9rem;
  }

  .tips h2 {
    font-size: 1.2rem;
  }

  .tips p {
    font-size: 14px;
  }

  .header-content {
    gap: 10px;
  }

  .dropdown-btn {
    padding: 6px 8px;
    font-size: 0.9rem;
  }

  .dropdown-menu {
    min-width: 120px;
  }

  .dropdown-menu a {
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  .home-link {
    font-size: 1.2rem;
  }

  .hint-btn {
    width: auto;
    height: auto;
    margin-bottom: 8px;
  }
}

/* Reset score linki için stil */
#reset-score {
  display: block;
  margin: 20px auto;
  padding: 8px 16px;
  background-color: #dc3545;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.2s, transform 0.2s;
  font-size: 14px;
  text-align: center;
  max-width: 200px;
}

#reset-score:hover {
  background-color: #c82333;
  transform: scale(1.05);
}

@media (max-width: 600px) {
  #reset-score {
    padding: 6px 12px;
    font-size: 12px;
    max-width: 180px;
  }
}

/* nav-levels içindeki reset-score’u gizle */
.nav-levels #reset-score {
  display: none;
}