@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&family=Patrick+Hand&display=swap');

* { 
  box-sizing: border-box; margin: 0; padding: 0; 
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* 1. ORTAK (BASE) AYARLAR */
html, body {
  background: #f5f0e8;
}

#app {
  font-family: 'Patrick Hand', cursive;
  background: #f5f0e8;
  color: #2c1a0e;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notebook {
  background-color: #f5f0e8;
  /* İşte o harika defter çizgileri geri döndü! */
  background-image: repeating-linear-gradient(transparent, transparent 35px, rgba(200, 184, 154, 0.45) 35px, rgba(200, 184, 154, 0.45) 36px);
  background-position: 0 10px; /* Çizgilerin metinlerle hizalanması için ufak bir ayar */
  border-radius: 4px;
  border: 1px solid #bba98a;
  box-shadow: 3px 3px 0 #bba98a, 6px 6px 0 #d4c5a9;
  position: relative;
  width: 100%;
}

.notebook::before {
  content: ''; position: absolute; left: 44px; top: 0; bottom: 0;
  width: 1.5px; background: #e8b4b8; opacity: 0.7;
}

/* 📱 2. MOBİL GÖRÜNÜM (Telefonlar için sıkı kilit) */
@media (max-width: 768px) {
  html, body {
    height: 100dvh;
    overflow: hidden; /* Sadece mobilde kaydırmayı engelle */
  }
  #app {
    height: 100dvh;
    padding: 12px;
  }
  .notebook {
    max-width: 500px;
    max-height: 95dvh;
    overflow-y: auto; /* İçerik taşarsa defterin içi kaysın, sayfa değil */
    padding: 20px 16px 20px 56px;
  }
}

/* 💻 3. MASAÜSTÜ GÖRÜNÜM (Geniş ve Ferah Tasarım) */
@media (min-width: 769px) {
  html, body {
    min-height: 100vh;
    overflow: auto; /* Bilgisayarda normal sayfa kaydırması serbest */
  }
  #app {
    min-height: 100vh;
    padding: 40px 20px;
  }
  .notebook {
    max-width: 680px; /* Orjinal geniş defter boyutu */
    height: auto;
    padding: 40px 40px 50px 80px; /* Kenar boşluklarını ferahlattık */
    overflow: hidden;
  }
  .notebook::before {
    left: 60px; /* Kırmızı defter çizgisini sola orantılı kaydırdık */
  }
  /* Bilgisayarda tıklanacak alanlar daha belirgin olsun */
  .options-grid { gap: 16px; margin-bottom: 24px; }
  .start-btn { padding: 16px 48px; }
}

.notebook::before {
  content: ''; position: absolute; left: 44px; top: 0; bottom: 0;
  width: 1.5px; background: #e8b4b8; opacity: 0.7;
}

.notebook-rings {
  position: absolute; left: 12px; top: 0; bottom: 0;
  display: flex; flex-direction: column; justify-content: space-around; pointer-events: none;
}

.ring { width: 20px; height: 20px; border: 2.5px solid #8a7060; border-radius: 50%; background: #ede8d8; }

.screen { display: none; }
.screen.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── START ── */
.doodle-title {
  font-family: 'Caveat', cursive; font-weight: 700; color: #2c1a0e;
  line-height: 1.1; margin-bottom: 6px; display: block; text-align: center;
  font-size: clamp(32px, 8vw, 44px);
}
.doodle-sub { color: #5a3e28; margin-bottom: 16px; line-height: 1.6; text-align: center; font-size: clamp(14px, 3.5vw, 16px); }
.info-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; font-family: 'Caveat', cursive; font-size: clamp(16px, 4vw, 19px); color: #5a3e28; }
.mode-chips { display: flex; gap: 10px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.mode-chip { font-family: 'Caveat', cursive; font-size: clamp(14px, 3.5vw, 16px); padding: 4px 12px; border-radius: 20px; border: 1.5px solid; font-weight: 600; }
.chip-red  { color: #c0392b; border-color: #c0392b; background: #fde8e6; }
.chip-blue { color: #1a4a7a; border-color: #1a4a7a; background: #e6f0fb; }

.start-btn {
  font-family: 'Caveat', cursive; font-weight: 700; background: #2c1a0e; color: #f5f0e8;
  border: none; border-radius: 6px; padding: 12px 36px; cursor: pointer;
  box-shadow: 4px 4px 0 #8a7060; transition: all 0.15s; display: block; margin: 0 auto;
  font-size: clamp(22px, 6vw, 30px);
}
.start-btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 #8a7060; }

/* ── GAME ── */
.level-badge { font-family: 'Caveat', cursive; font-size: clamp(14px, 3vw, 16px); color: #8a7060; position: absolute; top: 10px; right: 12px; }
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 6px; }
.score-box { font-family: 'Caveat', cursive; font-weight: 700; color: #1a4a7a; border: 2px solid #1a4a7a; border-radius: 6px; padding: 2px 10px; background: #e6f0fb; font-size: clamp(16px, 4vw, 22px); }
.lives-box { display: flex; gap: 4px; align-items: center; font-size: clamp(18px, 4.5vw, 22px); }
.heart.lost { opacity: 0.2; filter: grayscale(1); }
.timer-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.timer-label { font-family: 'Caveat', cursive; font-size: clamp(14px, 3.5vw, 17px); color: #5a3e28; }
.timer-bar-bg { width: clamp(90px, 25vw, 120px); height: 10px; background: #ede8d8; border: 1.5px solid #5a3e28; border-radius: 4px; overflow: hidden; }
.timer-bar { height: 100%; background: #1e6b3c; border-radius: 2px; transition: width 0.1s linear, background 0.3s; }

.progress-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #5a3e28; background: #f5f0e8; transition: all 0.3s; }
.dot.done    { background: #1e6b3c; border-color: #1e6b3c; }
.dot.current { border-color: #1a4a7a; box-shadow: 0 0 0 3px rgba(26,74,122,0.2); }

.question-area { text-align: center; margin-bottom: 18px; padding: 8px 0; }

/* DİKKAT ÇEKİCİ ROZET TASARIMI */
.mode-badge {
  display: inline-block;
  font-family: 'Caveat', cursive;
  padding: 6px 20px;
  border-radius: 30px;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: clamp(18px, 5vw, 24px); /* Yazı çok daha büyük */
  letter-spacing: 1px;
  text-transform: uppercase;
  animation: badgePulse 1.5s ease-in-out infinite; /* Kalp atışı animasyonu */
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.badge-zit { background: #c0392b; color: #fff; border: 2px solid #8e2a20; text-shadow: 1px 1px 2px rgba(0,0,0,0.3); }
.badge-es  { background: #1a4a7a; color: #fff; border: 2px solid #103050; text-shadow: 1px 1px 2px rgba(0,0,0,0.3); }

.english-word { font-family: 'Caveat', cursive; font-weight: 700; color: #2c1a0e; line-height: 1; display: block; margin-bottom: 4px; font-size: clamp(40px, 11vw, 56px); }
.turkish-hint { font-family: 'Caveat', cursive; color: #8a7060; margin-bottom: 4px; display: block; font-size: clamp(16px, 4.5vw, 20px); }

/* ── ŞIKLAR ── */
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
@media (max-width: 360px) { .options-grid { grid-template-columns: 1fr; } }

@keyframes stamp-in { 0% { transform: scale(1.12) rotate(-2deg); } 60% { transform: scale(0.97) rotate(1deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px) rotate(-1deg); } 75% { transform: translateX(5px) rotate(1deg); } }
.anim-correct { animation: stamp-in 0.35s ease; }
.anim-wrong   { animation: shake 0.4s ease; }

.streak-area { text-align: center; font-family: 'Caveat', cursive; color: #5a3e28; min-height: 24px; margin-bottom: 10px; font-size: clamp(16px, 4vw, 19px); font-weight: 600; }

.next-btn {
  width: 100%; font-family: 'Caveat', cursive; font-weight: 700; background: #2c1a0e; color: #f5f0e8;
  border: none; border-radius: 6px; padding: 12px; cursor: pointer;
  box-shadow: 3px 3px 0 #8a7060; transition: all 0.15s; display: none; font-size: clamp(18px, 5vw, 24px);
}
.next-btn.show { display: block; animation: fadeIn 0.3s ease; }
.next-btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 #8a7060; }

/* ── END ── */
.end-content { text-align: center; padding: 20px 0; }
.result-title { font-family: 'Caveat', cursive; font-weight: 700; display: block; margin-bottom: 8px; color: #2c1a0e; font-size: clamp(36px, 9vw, 50px); }
.result-score-big { font-family: 'Caveat', cursive; font-weight: 700; color: #1a4a7a; line-height: 1; display: block; font-size: clamp(60px, 15vw, 80px); }
.result-stars { font-size: clamp(26px, 7vw, 36px); letter-spacing: 4px; display: block; margin: 10px 0 16px; }
.result-details { color: #5a3e28; margin-bottom: 28px; line-height: 1.7; font-size: clamp(15px, 4vw, 18px); font-weight: 600; }
.restart-btn {
  font-family: 'Caveat', cursive; font-weight: 700; background: #2c1a0e; color: #f5f0e8;
  border: none; border-radius: 6px; padding: 12px 32px; cursor: pointer;
  box-shadow: 4px 4px 0 #8a7060; transition: all 0.15s; font-size: clamp(20px, 5.5vw, 28px);
}
.restart-btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 #8a7060; }

/* ── STAMP ── */
.stamp {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%) rotate(-12deg) scale(0);
  font-family: 'Caveat', cursive; font-weight: 700; border: 5px solid; border-radius: 12px; padding: 10px 24px;
  pointer-events: none; z-index: 999; opacity: 0; line-height: 1; font-size: clamp(40px, 12vw, 70px);
}
.stamp.show { animation: stamp-anim 0.9s ease forwards; }
.stamp.ok  { color: #1e6b3c; border-color: #1e6b3c; background: rgba(212,237,218,0.95); }
.stamp.bad { color: #b03020; border-color: #b03020; background: rgba(253,232,230,0.95); }