/* Kelime Oyunları CSS */

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.game-progress, .timer, .score {
  font-size: 1rem;
  font-weight: 500;
}

/* Flashcard Oyunu */
.flashcard-game {
  max-width: 600px;
  margin: 0 auto;
}

.flashcard {
  position: relative;
  width: 100%;
  height: 300px;
  perspective: 1000px;
  margin-bottom: 2rem;
  cursor: pointer;
}

.flashcard-front, .flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.6s;
}

.flashcard-front {
  background-color: #f9f9f9;
  transform: rotateY(0deg);
}

.flashcard-back {
  background-color: #f1f1f1;
  transform: rotateY(180deg);
}

.flashcard.flipped .flashcard-front {
  transform: rotateY(180deg);
}

.flashcard.flipped .flashcard-back {
  transform: rotateY(0deg);
}

.card-word {
  font-size: 2.5rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 1rem;
}

.card-translation {
  font-size: 2.5rem;
  font-weight: bold;
  color: #DD0000;
  margin-bottom: 0.5rem;
}

.card-example {
  font-style: italic;
  text-align: center;
  color: #555;
  font-size: 1.1rem;
}

.card-hint {
  margin-top: 2rem;
  color: #999;
  font-size: 0.875rem;
}

.game-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.feedback-buttons {
  display: flex;
  gap: 0.5rem;
}

.game-button {
  padding: 0.5rem 1rem;
  background-color: #f1f1f1;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
}

.game-button:hover {
  background-color: #e1e1e1;
}

.game-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.feedback-button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
}

.feedback-button.difficult {
  background-color: #ffebee;
  color: #c62828;
}

.feedback-button.difficult:hover {
  background-color: #ffcdd2;
}

.feedback-button.medium {
  background-color: #fff8e1;
  color: #ff8f00;
}

.feedback-button.medium:hover {
  background-color: #ffecb3;
}

.feedback-button.easy {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.feedback-button.easy:hover {
  background-color: #c8e6c9;
}

/* Eşleştirme Oyunu */
.matching-game {
  max-width: 800px;
  margin: 0 auto;
}

.matching-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.matching-card {
  position: relative;
  height: 100px;
  perspective: 1000px;
  cursor: pointer;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.matching-card.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.card-front {
  background-color: #DD0000;
}

.card-back {
  background-color: #f9f9f9;
  transform: rotateY(180deg);
  font-weight: 500;
  text-align: center;
}

.matching-card.matched .card-back {
  background-color: #e8f5e9;
  border: 2px solid #2e7d32;
}

.game-footer {
  display: flex;
  justify-content: center;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

/* Yazım Oyunu */
.spelling-game {
  max-width: 600px;
  margin: 0 auto;
}

.spelling-content {
  margin-bottom: 2rem;
}

.turkish-word {
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 1.5rem;
  color: #333;
}

.input-container {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.spelling-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.spelling-input:focus {
  border-color: #DD0000;
  outline: none;
}

.feedback {
  min-height: 60px;
}

.correct-answer,
.wrong-answer,
.warning {
  padding: 1rem;
  border-radius: 4px;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.correct-answer {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.wrong-answer {
  background-color: #ffebee;
  color: #c62828;
}

.warning {
  background-color: #fff8e1;
  color: #ff8f00;
}

.example {
  margin-top: 0.5rem;
  font-style: italic;
  color: #555;
  font-size: 0.95rem;
}

/* Oyun Sonu Ekranı */
.game-finished {
  text-align: center;
  padding: 2rem;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.game-finished h2 {
  margin-bottom: 1.5rem;
  color: #DD0000;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: #333;
}

.stat-label {
  font-size: 0.875rem;
  color: #666;
  margin-top: 0.25rem;
}

.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: #DD0000;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0 auto 1.5rem;
}

.score-value {
  font-size: 2rem;
  font-weight: bold;
}

.score-label {
  font-size: 0.875rem;
}

.result-details {
  margin-bottom: 1.5rem;
}

/* Dark Mode */
body.dark-mode .flashcard-front {
  background-color: #343841;
  color: #f5f5f5;
}

body.dark-mode .flashcard-back {
  background-color: #2a2d34;
  color: #f5f5f5;
}

body.dark-mode .card-word {
  color: #f5f5f5;
}

body.dark-mode .card-translation {
  color: #FFCE00;
}

body.dark-mode .card-example {
  color: #b0b0b0;
}

body.dark-mode .game-button {
  background-color: #3E4249;
  color: #f5f5f5;
}

body.dark-mode .game-button:hover {
  background-color: #4a5568;
}

body.dark-mode .game-finished {
  background-color: #343841;
  color: #f5f5f5;
}

body.dark-mode .card-front {
  background-color: #DD0000;
}

body.dark-mode .card-back {
  background-color: #343841;
  color: #f5f5f5;
}

body.dark-mode .matching-card.matched .card-back {
  background-color: #3c543e;
  border-color: #4caf50;
}

body.dark-mode .spelling-input {
  background-color: #2a2d34;
  border-color: #4a5568;
  color: #f5f5f5;
}

body.dark-mode .correct-answer {
  background-color: #3c543e;
  color: #a5d6a7;
}

body.dark-mode .wrong-answer {
  background-color: #543c3c;
  color: #ef9a9a;
}

body.dark-mode .warning {
  background-color: #54503c;
  color: #ffe082;
}

body.dark-mode .stat-value {
  color: #f5f5f5;
}

body.dark-mode .stat-label {
  color: #b0b0b0;
}

/* Mobil Uyumluluk */
@media (max-width: 768px) {
  .card-word, .card-translation {
    font-size: 1.75rem;
  }
  
  .matching-board {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .feedback-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .game-controls {
    flex-direction: column;
    gap: 1rem;
  }
  
  .game-button {
    width: 100%;
  }
  
  .stats {
    flex-wrap: wrap;
    gap: 1rem;
  }
}