@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
  background: linear-gradient(135deg, #f5e6ca, #e6ccb2, #ddb892, #c8b6a6);
  background-size: 300% 300%;
  animation: gradient 15s ease infinite;
  font-family: 'Press Start 2P', cursive; /* Ana font olarak değiştirildi */
  color: #4a4a4a;
  min-height: 100vh;
}

@keyframes gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Başlık ayarları güncellendi */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Press Start 2P', cursive;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.4;
}

/* Form elemanları için daha okunabilir font */
input, button, textarea, select, label, p, div, span, a {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem; /* Biraz daha küçük font boyutu */
  line-height: 1.5;
}

/* Navbar */
nav {
  background-color: rgba(93, 64, 55, 0.9);
  padding: 0.8rem 1rem;
}

nav a {
  color: #f5f5dc;
  font-size: 0.9rem; /* Font boyutu artırıldı */
  padding: 0.5rem 0.8rem;
  border-radius: 0.3rem;
  transition: background-color 0.3s;
}

nav a:hover {
  background-color: rgba(245, 245, 220, 0.2);
  text-decoration: none;
}

/* Game card */
.game-card {
  background-color: rgba(251, 248, 240, 0.97);
  padding: 2.5rem;
  border-radius: 1.2rem;
  box-shadow: 0 12px 24px rgba(91, 60, 17, 0.3);
  color: #3e2723;
  width: 100%;
  max-width: 550px;
  margin: 2rem auto;
  transition: transform 0.3s ease;
}

.game-card:hover {
  transform: translateY(-5px);
}

/* Timer */
#timer {
  font-size: 1.3rem;
  font-weight: normal; /* Font zaten kalın görünüyor */
  color: #7c3626;
  background-color: rgba(244, 227, 219, 0.9);
  padding: 0.7rem;
  border-radius: 0.8rem;
  margin-bottom: 1.5rem;
  border: 2px solid rgba(124, 54, 38, 0.5);
}

/* İpuçları bölümü */
.hint-container {
  background-color: #f8f4e3;
  border-radius: 0.8rem;
  padding: 1.2rem;
  margin-bottom: 1.5rem;
  border: 1px solid #d7cca1;
}

.hint-item {
  background-color: #eee8d5;
  padding: 0.8rem;
  border-radius: 0.5rem;
  margin-bottom: 0.8rem;
  border-left: 4px solid #b58863;
}

.hint-label {
  font-weight: normal; /* Font zaten kalın görünüyor */
  color: #6d4c41;
  margin-right: 0.5rem;
  font-size: 0.9rem; /* Font boyutu artırıldı */
}

/* Letter box */
.letter-box {
  width: 4rem;
  height: 4rem;
  font-size: 1.8rem; /* Font boyutu artırıldı */
  text-align: center;
  border: 3px solid #5d4037;
  border-radius: 0.7rem;
  background-color: #fdf6e3;
  transition: all 0.25s ease;
  margin: 0.3rem;
  box-shadow: 0 4px 6px rgba(93, 64, 55, 0.2);
}

.letter-box:focus {
  transform: scale(1.15);
  box-shadow: 0 0 15px rgba(131, 105, 83, 0.8);
  border-color: #8d6e63;
  outline: none;
}

/* İpucu butonları */
.hint-button {
  background-color: #6d4c41;
  color: #f5f5f5;
  padding: 0.8rem 1rem;
  border-radius: 0.6rem;
  font-weight: normal; /* Font zaten kalın görünüyor */
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  border: none;
  width: 100%;
  max-width: 280px;
  box-shadow: 0 4px 6px rgba(109, 76, 65, 0.3);
  font-size: 0.9rem; /* Font boyutu artırıldı */
}

.hint-button:hover {
  background-color: #5d4037;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(93, 64, 55, 0.4);
}

/* Tahmin butonu */
.submit-button {
  width: 100%;
  background-color: #556b2f;
  color: #f5f5f5;
  font-size: 1.1rem; /* Font boyutu artırıldı */
  font-weight: normal; /* Font zaten kalın görünüyor */
  padding: 1rem;
  border-radius: 0.8rem;
  border: none;
  margin-top: 1.5rem;
  box-shadow: 0 4px 6px rgba(85, 107, 47, 0.3);
  transition: all 0.3s ease;
}

.submit-button:hover {
  background-color: #4b5a24;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(75, 90, 36, 0.4);
}

/* Responsive ayarlar */
@media (min-width: 768px) {
  .game-card {
    padding: 3rem;
  }
  
  h1 {
    font-size: 1.8rem; /* Font boyutu küçültüldü */
  }
  
  .letter-box {
    width: 4rem;
    height: 4rem;
    font-size: 1.5rem; /* Font boyutu küçültüldü */
  }
  
  input, button, textarea, select, label, p, div, span, a {
    font-size: 0.7rem; /* Font boyutu küçültüldü */
  }
}

@media (max-width: 767px) {
  h1 {
    font-size: 1.4rem; /* Font boyutu küçültüldü */
  }
  
  .game-card {
    padding: 2rem;
    margin: 1rem auto;
  }
  
  .letter-box {
    width: 3.2rem;
    height: 3.2rem;
    font-size: 1.3rem; /* Font boyutu küçültüldü */
  }
  
  input, button, textarea, select, label, p, div, span, a {
    font-size: 0.65rem; /* Font boyutu küçültüldü */
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: 1.2rem; /* Font boyutu küçültüldü */
  }
  
  .game-card {
    padding: 1.5rem;
    max-width: 95%;
  }
  
  #timer {
    font-size: 0.9rem; /* Font boyutu küçültüldü */
  }
  
  .letter-box {
    width: 2.8rem;
    height: 2.8rem;
    font-size: 1.1rem; /* Font boyutu küçültüldü */
    margin: 0.2rem;
  }
  
  .hint-button {
    padding: 0.6rem 0.8rem;
    font-size: 0.6rem; /* Font boyutu küçültüldü */
  }
  
  .submit-button {
    padding: 0.8rem;
    font-size: 0.7rem; /* Font boyutu küçültüldü */
  }
  
  input, button, textarea, select, label, p, div, span, a {
    font-size: 0.6rem; /* Font boyutu küçültüldü */
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1rem; /* Font boyutu küçültüldü */
  }
  
  .game-card {
    padding: 1.2rem;
  }
  
  .letter-box {
    width: 2.4rem;
    height: 2.4rem;
    font-size: 1rem; /* Font boyutu küçültüldü */
    margin: 0.15rem;
  }
  
  .hint-item {
    padding: 0.6rem;
  }
  
  input, button, textarea, select, label, p, div, span, a {
    font-size: 0.55rem; /* Font boyutu küçültüldü */
  }
}

/* 'Press Start 2P' fontu için ek satır aralığı düzeltmeleri */
p, div, span {
  line-height: 1.6;
  margin-bottom: 0.8rem;
}

/* Form etiketleri için boşluk ayarları */
label {
  display: block;
  margin-bottom: 0.5rem;
}

/* Pixel-art tarzında butonlar için ek stil */
button, .btn-primary, .submit-button, .hint-button {
  line-height: 1.2;
  letter-spacing: 0.5px;
}

/* Bildirimlerin Pixel-art stilinde gösterilmesi için eklenen CSS */
.pixel-popup {
  font-family: 'Press Start 2P', cursive;
  border-radius: 1rem;
  background-color: #fdf6e3;
  border: 4px solid #5d4037;
  box-shadow: 0 0 0 4px #fdf6e3, 0 0 0 8px #5d4037;
}

.pixel-box {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.success-box {
  background-color: rgba(200, 230, 201, 0.8);
}

.error-box {
  background-color: rgba(239, 214, 203, 0.8);
}

.timeout-box {
  background-color: rgba(225, 220, 203, 0.8);
}

.pixel-character {
  font-size: 4rem;
  animation: bounce 1s infinite alternate;
}

.pixel-character-wrong {
  font-size: 4rem;
  animation: shake 0.5s infinite;
}

.pixel-character-timeout {
  font-size: 4rem;
  animation: rotate 2s linear infinite;
}

.pixel-score {
  background-color: #d7cca1;
  color: #5d4037;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: bold;
  font-size: 1.4rem;
  border: 2px solid #8d6e63;
  animation: pulse 1.5s infinite;
}

.pixel-stars {
  font-size: 2rem;
  letter-spacing: 0.5rem;
  animation: spin 3s linear infinite;
  margin-top: 0.5rem;
}

.correct-word {
  margin: 1rem 0;
  font-size: 0.8rem;
}

.word-reveal {
  color: #7c3626;
  font-size: 1.2rem;
  letter-spacing: 0.2rem;
  animation: blink 1s infinite;
}

.pixel-explosion {
  font-size: 2.5rem;
  animation: explode 1.5s infinite;
}

.pixel-message {
  font-size: 0.8rem;
  text-align: center;
  margin: 0.5rem 0;
}

.pixel-hourglass {
  font-size: 2rem;
  animation: flip 2s infinite;
}

.pixel-button {
  font-family: 'Press Start 2P', cursive;
  background-color: #556b2f;
  color: #f5f5dc;
  border: none;
  border-radius: 0.5rem;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  border: 3px solid #4b5a24;
  box-shadow: 0 4px 0 #4b5a24;
}

.pixel-button:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #4b5a24;
}

.pixel-button-wrong {
  font-family: 'Press Start 2P', cursive;
  background-color: #7c3626;
  color: #f5f5dc;
  border: none;
  border-radius: 0.5rem;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  border: 3px solid #5d2a1e;
  box-shadow: 0 4px 0 #5d2a1e;
}

.pixel-button-wrong:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #5d2a1e;
}

.pixel-button-timeout {
  font-family: 'Press Start 2P', cursive;
  background-color: #5c6bc0;
  color: #f5f5dc;
  border: none;
  border-radius: 0.5rem;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  border: 3px solid #3949ab;
  box-shadow: 0 4px 0 #3949ab;
}

.pixel-button-timeout:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #3949ab;
}

.pixel-toast {
  font-family: 'Press Start 2P', cursive;
  background-color: rgba(93, 64, 55, 0.9);
  color: #f5f5dc;
  border: 2px solid #d7cca1;
  padding: 0.5rem;
}

.hint-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.pixel-hint-icon {
  font-size: 1.5rem;
  animation: pulse 1s infinite alternate;
}

.pixel-cost {
  color: #ffeb3b;
  font-weight: bold;
}

/* Animasyonlar */
@keyframes bounce {
  from { transform: translateY(0px); }
  to { transform: translateY(-10px); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

@keyframes explode {
  0% { transform: scale(0.8); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0.8; }
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes flip {
  0%, 100% { transform: rotateX(0); }
  50% { transform: rotateX(180deg); }
}

/* Spinner animasyonu */
.spinner {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Sayfaya eklenen sallama animasyonu */
.shake {
  animation: shake 0.5s;
}

/* Doğru cevap için kutlama animasyonu */
.celebration {
  animation: celebration 2s;
}

@keyframes celebration {
  0% { transform: scale(1); }
  25% { transform: scale(1.1); }
  50% { transform: rotate(5deg); }
  75% { transform: rotate(-5deg); }
  100% { transform: scale(1); }
}

/* Yeni harf girildiğinde animasyon */
.letter-entered {
  animation: letter-entered 0.3s;
}

@keyframes letter-entered {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); background-color: rgba(181, 136, 99, 0.3); }
  100% { transform: scale(1); }
}

/* Seviye sistemi için CSS eklentileri */

/* Zorluk seviyeleri */
.difficulty-easy {
  background-color: rgba(52, 211, 153, 0.2);
  border-left: 4px solid #34D399;
}

.difficulty-medium {
  background-color: rgba(251, 191, 36, 0.2);
  border-left: 4px solid #FBBF24;
}

.difficulty-hard {
  background-color: rgba(239, 68, 68, 0.2);
  border-left: 4px solid #EF4444;
}

.level-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  font-weight: bold;
  color: white;
}

.level-easy {
  background-color: #34D399;
}

.level-medium {
  background-color: #FBBF24;
}

.level-hard {
  background-color: #EF4444;
}

/* Seviye atlama bildirimi */
.level-up-box {
  background-color: rgba(181, 136, 99, 0.2);
  padding: 1.5rem;
  border-radius: 1rem;
  border: 3px solid #b58863;
  text-align: center;
}

.pixel-character-levelup {
  font-size: 4rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px) scale(1.1); }
  100% { transform: translateY(0px); }
}

.level-title {
  font-size: 1.2rem;
  margin: 0.7rem 0;
  color: #7c3626;
  font-weight: bold;
}

.level-description {
  font-size: 0.8rem;
  margin: 0.7rem 0;
  color: #4B5563;
}

.level-rewards {
  font-size: 0.9rem;
  margin: 0.7rem 0;
  background-color: rgba(181, 136, 99, 0.15);
  padding: 0.5rem;
  border-radius: 0.5rem;
  color: #6d4c41;
  font-weight: bold;
  animation: pulse 2s infinite;
}

/* Profil sayfası seviye göstergeleri */
.progress-bar {
  height: 20px;
  background-color: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 5px;
}

.progress {
  height: 100%;
  background-color: #b58863;
  border-radius: 10px;
}

/* Rozet simgeleri */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 9999px;
  margin: 0.25rem;
  background-color: #f3f4f6;
  border: 2px solid #d1d5db;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.badge-locked {
  filter: grayscale(100%);
  opacity: 0.6;
}

.badge:hover {
  transform: scale(1.1);
}

.badge-info {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.badge:hover .badge-info {
  opacity: 1;
}

/* game.css dosyasına ekleyelim */
.letter-purchased {
  background-color: rgba(211, 217, 167, 0.9) !important;
  border-color: #808000 !important;
  color: #556b2f !important;
  animation: purchasePulse 2s infinite;
}

@keyframes purchasePulse {
  0% { box-shadow: 0 0 0 0 rgba(128, 128, 0, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(128, 128, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(128, 128, 0, 0); }
}

.pixel-coins {
  background-color: #d7cca1;
  color: #5d4037;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: bold;
  margin-top: 0.5rem;
  border: 2px solid #8d6e63;
  display: inline-block;
  animation: coinShine 2s ease-in-out infinite;
}

@keyframes coinShine {
  0% { background-color: #d7cca1; }
  50% { background-color: #e6d8b5; }
  100% { background-color: #d7cca1; }
}