/* 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 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;
}

.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.dragging {
  opacity: 0.7;
}

.buttons {
  margin: 20px 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.navigation-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 10px 0;
}

#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: 10px; /* Daha az boşluk */
}

.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;
}

/* Açılır-Kapanır Kapsayıcı Stilleri */
.collapsible-container {
  max-width: 600px; /* .container ile aynı genişlik */
  margin: 0 auto; /* Ortalamak için */
  margin-bottom: 20px;
}

.collapsible-header {
  background: #e6f0fa; /* Seviye kutuları ile aynı açık mavi */
  padding: 15px;
  width: 100%; /* Tam genişlik */
  text-align: center;
  border-radius: 10px;
  border: 1px solid #d1e0f5; /* Hafif kenarlık */
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Daha belirgin gölge, .level-header ile aynı */
}

.collapsible-header:hover {
  background: #d1e0f5; /* Hafif koyu hover efekti */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Hover'da daha güçlü gölge */
}

.collapsible-img {
  cursor: pointer; /* El işareti */
}

.collapsible-content {
  padding: 0; /* İç boşluk sıfırlandı, alt öğeler kendi padding'ine sahip */
  margin-top: 10px; /* Üstten hafif boşluk */
  display: none; /* Başlangıçta kapalı */
}

/* 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;
  }

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

  .level-header {
    font-size: 1.3rem;
    padding: 12px;
    margin-bottom: 10px; /* Mobil için de boşluk azaltıldı */
  }

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

  .collapsible-container {
    max-width: 100%; /* Mobil için .container ile uyumlu */
  }

  .collapsible-header {
    padding: 12px;
  }
}