*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: #f0f0f0;
  color: #111;
  line-height: 1.6;
  font-size: 15px;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.container.narrow {
  max-width: 660px;
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #d0d0d0;
  font-size: 0.9rem;
  color: #555;
}

.nav a:hover { color: #111; }

.nav .title {
  font-weight: 600;
  color: #111;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}

.btn-primary {
  background: #111;
  color: #fff;
  border-color: #111;
}

.btn-primary:hover { background: #333; border-color: #333; }

.btn-secondary {
  background: #fff;
  color: #111;
  border-color: #c8c8c8;
}

.btn-secondary:hover { background: #f5f5f5; }

/* Home page */
.home-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.75rem;
  color: #111;
}

.courses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.course-card {
  background: #fff;
  border: 1px solid #d4d4d4;
  border-radius: 4px;
  padding: 1.5rem;
}

.course-card h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  line-height: 1.45;
  color: #111;
}

.course-actions {
  display: flex;
  gap: 0.6rem;
}

/* Quiz */
.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  color: #555;
}

.card {
  background: #fff;
  border: 1px solid #d4d4d4;
  border-radius: 4px;
  padding: 1.75rem;
}

.question-text {
  font-size: 0.975rem;
  font-weight: 500;
  line-height: 1.75;
  margin-bottom: 1.5rem;
  color: #111;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.option-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.65rem 1rem;
  background: #fff;
  border: 1px solid #d4d4d4;
  border-radius: 3px;
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.5;
  cursor: pointer;
  color: #111;
  transition: background 0.1s, border-color 0.1s;
}

.option-btn:hover:not(:disabled) {
  background: #f5f5f5;
  border-color: #aaa;
}

.option-btn:disabled { cursor: default; }

.option-btn.correct {
  background: #f0fdf4;
  border-color: #4ade80;
  color: #14532d;
  font-weight: 500;
}

.option-btn.wrong {
  background: #fef2f2;
  border-color: #f87171;
  color: #7f1d1d;
}

.feedback {
  font-size: 0.875rem;
  padding: 0.65rem 1rem;
  border-radius: 3px;
  margin-bottom: 1.1rem;
  display: none;
}

.feedback.correct {
  display: block;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.feedback.wrong {
  display: block;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

/* Results */
.results {
  background: #fff;
  border: 1px solid #d4d4d4;
  border-radius: 4px;
  padding: 3rem 2rem;
  text-align: center;
}

.results h2 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.results-score {
  font-size: 1.1rem;
  color: #444;
  margin-bottom: 1.75rem;
}

.results-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* Kaynaklar */
.kaynaklar-wrap {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.25rem;
  height: calc(100vh - 130px);
  min-height: 400px;
}

.kaynak-list {
  background: #fff;
  border: 1px solid #d4d4d4;
  border-radius: 4px;
  overflow-y: auto;
}

.kaynak-item {
  display: block;
  width: 100%;
  padding: 0.65rem 1rem;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid #ebebeb;
  cursor: pointer;
  font-size: 0.875rem;
  font-family: inherit;
  color: #333;
}

.kaynak-item:last-child { border-bottom: none; }
.kaynak-item:hover { background: #f5f5f5; }
.kaynak-item.active { background: #111; color: #fff; }

.pdf-wrap {
  background: #fff;
  border: 1px solid #d4d4d4;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdf-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.pdf-placeholder {
  color: #888;
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .kaynaklar-wrap {
    grid-template-columns: 1fr;
    height: auto;
  }
  .kaynak-list { height: auto; }
  .pdf-wrap { height: 70vh; }
}
