/* Genel sıfırlama stilleri */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Sayfa genel görünümü */
body {
  display: block;
  min-height: 100vh;
  background-color: #f0f0f0;
  font-size: 16px;
  margin: 0;
  overflow-x: hidden;
  font-family: Arial, sans-serif;
}

/* Ana kapsayıcı */
.container {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  min-height: calc(100vh - 60px);
}

/* Başlık alanı */
header {
  margin-bottom: 30px;
}

/* Anahtar 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;
  text-align: center;
}

/* 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 h2 {
  font-size: 1.5rem;
  color: #007bff;
  margin-bottom: 10px;
}

.level-card p {
  font-size: 1rem;
  color: #555;
  line-height: 1.4;
  margin-bottom: 15px;
}

/* Oyun sayfaları için stiller */
.word-bank, .sentence-boxes {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 8px;
}

.word-bank {
  background-color: #e6f3ff;
}

.sentence {
  background: #fff;
  border: 2px dashed #ccc;
}

.buttons {
  margin: 20px 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.nav-buttons {
  display: flex;
  justify-content: center;
  margin: 10px 0;
  gap: 10px;
}

#next-btn {
  padding: 12px 20px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  border-radius: 4px;
  background-color: #28a745;
  color: white;
}

#next-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

#next-btn:not(:disabled):hover {
  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);
  text-align: center;
}

.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: #f8f1e9;
  padding: 15px;
  border-radius: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.stats p {
  color: #555;
}

.score-board {
  display: flex;
  justify-content: space-around;
  margin: 20px 0;
  font-weight: bold;
  background: #f8f1e9;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.score-board p {
  color: #555;
}

.navigation-buttons {
  display: flex;
  flex-direction: column; /* Dikey sıralama için */
  justify-content: center;
  align-items: center; /* Butonları ortala */
  margin: 20px 0; /* Daha fazla üst ve alt boşluk */
  gap: 15px; /* Butonlar ve nav-levels arasındaki boşluk */
}

.back-home, .next-level {
  display: inline-block;
  padding: 12px 20px;
  background-color: #28a745;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 16px;
  text-align: center;
  min-width: 150px;
}

.back-home {
  margin-top: 10px; /* Üstten ek boşluk */
}

.back-home:hover, .next-level:hover {
  background-color: #218838;
}

/* 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', 'sans-serif', Arial, sans-serif;
  font-size: 1.5rem;
  margin-bottom: 20px;
  text-align: center;
}

.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;
  text-align: center;
}

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;
  text-align: center;
}

/* Kelime bulma oyunu için stiller */
.game-container {
  background: #e6f0fa;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  width: 100%;
}

.definition-container {
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.definition {
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  font-size: 1.2rem;
  color: #555;
  line-height: 1.5;
}

.word-boxes {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.progress-bar-container {
  width: 100%;
  height: 15px;
  background-color: #ccc;
  border-radius: 5px;
  margin-bottom: 20px;
}

.progress-bar {
  height: 100%;
  width: 100%;
  border-radius: 5px;
  transition: width 0.2s linear, background-color 0.2s linear;
}

.letter-bank {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.box {
  width: 48px;
  height: 48px;
  border: 2px solid #ccc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: bold;
  text-transform: uppercase;
  background-color: #fff;
  transition: all 0.2s;
  cursor: pointer;
  user-select: none;
}

.box.correct {
  background-color: #28a745;
  color: white;
  border-color: #1f8134;
}

.box.error {
  background-color: #dc3545;
  color: white;
  border-color: #a71d2a;
}

.letter {
  width: 48px;
  height: 48px;
  border: 2px solid #007bff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: bold;
  text-transform: uppercase;
  background-color: #007bff;
  color: white;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
}

.letter:hover:not(.disabled) {
  background-color: #0056b3;
  transform: scale(1.05);
}

.letter.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #ccc;
  border-color: #ccc;
}

.result {
  font-size: 1.2rem;
  font-weight: bold;
  margin-top: 15px;
  margin-bottom: 20px;
  min-height: 24px;
}

/* Sıfırlama Bağlantısı ve Accordion */
.reset-link {
  text-align: center;
  margin: 10px 0;
}

.reset-link a {
  color: #007bff;
  text-decoration: none;
  font-size: 1rem;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

.reset-link a:hover {
  text-decoration: underline;
  color: #0056b3;
}

.accordion {
  margin: 10px 0;
  border-radius: 8px;
  overflow: hidden;
}

.accordion-header {
  background-color: #007bff;
  color: white;
  padding: 10px;
  font-size: 1.1rem;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  cursor: pointer;
  transition: background-color 0.2s;
}

.accordion-header:hover {
  background-color: #0056b3;
}

.accordion-header.active {
  background-color: #0056b3;
}

.accordion-content {
  display: none;
  background-color: #f8f9fa;
  padding: 15px;
  border: 1px solid #ddd;
  border-top: none;
}

.word-list {
  max-height: 200px;
  overflow-y: auto;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

.word-item {
  padding: 5px 0;
  font-size: 1rem;
  color: #555;
  display: flex;
  align-items: center;
  gap: 5px;
}

.check-icon {
  color: #28a745;
  font-size: 1.2rem;
}

.cross-icon {
  color: #dc3545;
  font-size: 1.2rem;
}

/* Mobil uyumluluk */
@media (max-width: 600px) {
  body {
    margin: 0;
    padding: 0;
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    margin: 0 auto;
    min-height: calc(100vh - 50px);
  }

  h1 {
    font-size: 1.5rem;
  }

  header p {
    font-size: 14px;
  }

  .level-card {
    padding: 10px;
  }

  .level-card h2 {
    font-size: 1.3rem;
  }

  .level-card p {
    font-size: 0.9rem;
  }

  .instructions h2 {
    font-size: 1.2rem;
  }

  .instructions p {
    font-size: 14px;
  }

  .word-boxes, .letter-bank {
    padding: 10px;
    gap: 8px;
  }

  .box {
    width: 40px;
    height: 40px;
  }

  .letter {
    width: 40px;
    height: 40px;
  }

  .progress-bar-container {
    height: 12px;
  }

  .back-home, .next-level {
    padding: 8px 16px;
    font-size: 14px;
    min-width: 120px;
  }

  .back-home {
    margin-top: 8px;
  }

  .navigation-buttons {
    gap: 10px;
  }

  .level-header {
    font-size: 1.2rem;
    padding: 10px;
  }

  .level-card h3, header h3 {
    font-size: 0.9rem;
  }

  .definition {
    font-size: 1rem;
  }

  .game-container {
    padding: 10px;
  }

  .definition-container {
    padding: 10px;
  }

  .buttons {
    margin: 10px 0;
  }

  .reset-link a {
    font-size: 0.9rem;
  }

  .accordion-header {
    font-size: 1rem;
    padding: 8px;
  }

  .accordion-content {
    padding: 10px;
  }

  .word-item {
    font-size: 0.9rem;
  }

  #next-btn {
    padding: 8px 16px;
    font-size: 14px;
  }

  .stats, .score-board {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .stats p, .score-board p {
    font-size: 1.1rem;
    margin: 0;
  }

  .sticky-header {
    padding: 8px 0;
  }

  .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;
  }

  .nav-levels {
    flex-direction: column;
    gap: 8px;
  }

  .tips h2 {
    font-size: 1.2rem;
  }

  .tips p {
    font-size: 14px;
  }
}

/* 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;
  width: 100%;
}

.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: #ffffff;
  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;
}

/* 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;
}

.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;
}

/* Navigasyon butonları için yan yana hizalama */
.nav-levels {
  display: flex;
  flex-direction: row;
  gap: 10px;
  justify-content: center;
}