/* style.css (Tam, Eksiksiz ve Son Sürüm) */

/* — 1) TEMEL AYARLAR VE GÖVDE (BODY) — */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

/* — 9) AI YORUM BUTONU VE MODAL STİLLERİ — */
.ai-button-container {
  text-align: center;
  margin: 20px 0;
}

#aiReviewBtn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  font-size: 1.1rem;
  padding: 14px 28px;
}
#aiReviewBtn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 15px rgba(118, 75, 162, 0.4);
}
#aiReviewBtn:disabled {
    background: #ccc;
    cursor: wait;
}

.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none; /* JS ile gösterilecek */
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-content {
  background: #fff;
  padding: 32px;
  border-radius: 16px;
  max-width: 700px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close-btn {
  position: absolute;
  top: 10px; right: 15px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #aaa;
  cursor: pointer;
}

.modal-content h3 {
  margin-bottom: 20px;
  font-size: 1.8rem;
}

.ai-response-area {
  font-size: 1.1rem;
  line-height: 1.7;
  white-space: pre-wrap; /* Satır sonlarını korur */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #333;
  background-color: #fdf6f2; /* Daha yumuşak bir arka plan rengi */
  background-image: url('splash-bg.svg'); /* SVG arka planı isteğe bağlı */
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
}

/* — 2) EKRAN YÖNETİMİ — */
.screen {
  display: none; /* Varsayılan olarak tüm ekranları gizle */
  width: 100%;
  min-height: 100vh;
}

.screen.active {
  display: flex; /* Sadece aktif olanı göster ve flexbox ile ortala */
  flex-direction: column;
}

/* — 3) GENEL KART STİLİ (ANA İÇERİK ALANI) — */
.card {
  background: #ffffff;
  margin: 40px auto;
  border-radius: 16px; /* Daha yuvarlak köşeler */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  width: calc(100% - 32px);
  max-width: 600px;
  padding: 24px 32px;
}

/* — 4) BUTONLAR — */
.btn {
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}
.btn:disabled {
  background-color: #e0e0e0;
  cursor: not-allowed;
}

.btn-primary { background: #ff6b6b; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #e74c3c; transform: translateY(-2px); }

.btn-secondary { background: #feca57; color: #333; }
.btn-secondary:hover:not(:disabled) { background: #f39c12; transform: translateY(-2px); }

.btn-small { padding: 10px 20px; font-size: 0.9rem; }

.btn-nav {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #555;
  cursor: pointer;
  padding: 0 12px;
}

/* — 5) GİRİŞ EKRANI (SPLASH) — */
#splash.active {
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px 0;
}

.splash-content h1 { font-size: 2.8rem; text-align: center; margin-bottom: 0; }
.splash-content h2 { font-size: 1.5rem; text-align: center; margin: 0 0 24px; color: #777; }

#userForm { display: flex; flex-direction: column; gap: 16px; }
#userForm input, #userForm select {
  width: 100%;
  padding: 14px;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-size: 1rem;
}
#userForm input:focus, #userForm select:focus { outline: 2px solid #ff9a9e; border-color: transparent; }

/* — 6) TEST EKRANI (QUIZ) — */
#quiz { padding-bottom: 80px; /* Alttaki sabit footer için boşluk */ }

.question-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px); /* Modern bulanıklık efekti */
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  z-index: 10;
}
.question-header .progress-info { flex: 1; text-align: center; font-weight: 500; }

.progress-bar-wrapper {
  position: fixed;
  top: 57px; /* Header'ın hemen altı */
  left: 0; right: 0;
  height: 4px;
  background: #eee;
  z-index: 10;
}
.progress-bar { width: 0; height: 100%; background: #ff6b6b; transition: width 0.3s ease; }

.quiz-content {
  margin: 100px auto 0; /* Header ve progress bar için boşluk */
  padding-bottom: 100px; /* Footer için boşluk */
  width: calc(100% - 32px);
  max-width: 600px;
}

.question-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 24px;
}
.question-card h2 { margin-bottom: 20px; font-size: 1.25rem; line-height: 1.5; }

.options { list-style: none; }
.options li {
  background: #f7f7f7;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
}
.options li:hover { border-color: #ff9a9e; }
.options li.selected { background: #ff6b6b; border-color: #ff6b6b; color: #fff; font-weight: 500; }

.quiz-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid #eee;
  z-index: 10;
}

/* — 7) SONUÇ EKRANI (RESULT) — */
#result { padding: 40px 16px; }

.result-content { margin-bottom: 80px; }
.result-content h2 { font-size: 2rem; margin-bottom: 24px; text-align: center; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin: 0 auto 32px;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  max-width: 800px;
}
.info-grid div { text-align: left; }

.result-chart-container {
  width: 95%;
  max-width: 1200px;
  height: 600px; /* Grafik yüksekliği */
  margin: 40px auto;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.score-table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px auto;
  max-width: 1200px;
  font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden; /* Köşelerin yuvarlak görünmesi için */
}
.score-table th, .score-table td {
  border: 1px solid #e0e0e0;
  padding: 10px;
    background-color: aliceblue;
  text-align: center;
}
.score-table th { background-color: #f7f7f7; font-weight: 600; }
.score-table tr:first-child th { font-size: 1rem; }
.score-table td:first-child, .score-table th:first-child {
  font-weight: 600;
  text-align: left;
  padding-left: 16px;
  background-color: #f7f7f7;
}

.interpretation {
  text-align: left;
  margin: 32px auto;
  max-width: 800px;
  background: #f7f7f7;
  border-left: 5px solid #ff6b6b;
  padding: 16px;
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1.6;
}

.result-buttons {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  z-index: 10;
}

/* — 8) MOBİL İYİLEŞTİRME — */
@media (max-width: 768px) {
  .card { padding: 16px; }
  .result-chart-container { height: 450px; } /* Mobil için daha uygun yükseklik */
  .info-grid { grid-template-columns: 1fr; }
  .score-table { font-size: 0.75rem; } /* Tablo yazıları küçülecek */
  .score-table th, .score-table td { padding: 6px; }
}

@media (max-width: 480px) {
  .result-chart-container { height: 350px; }
  .result-buttons { flex-direction: column; }
}