/* Konu Bazlı Testler — Modern Light Theme */

.kt-hub, .kt-test {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --primary-glow: rgba(99, 102, 241, 0.25);

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.08);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.08);
  --warning: #f59e0b;

  --bg: #f8fafc;
  --bg-dark: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;

  --radius: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);

  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.kt-hub *, .kt-test *, .kt-hub *::before, .kt-test *::before { box-sizing: border-box; }

/* ============ BREADCRUMB ============ */
.kt-breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.kt-breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.kt-breadcrumb a:hover { text-decoration: underline; }
.kt-bc-sep { margin: 0 6px; }

/* ============ HUB PAGE ============ */
.kt-hub-card {
  padding: 0;
}

.kt-hub-title {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 12px;
  line-height: 1.2;
  color: var(--text);
}

.kt-hub-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 0 28px;
}

/* Stats */
.kt-hub-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  padding: 20px;
  background: var(--bg);
  border-radius: var(--radius-md);
}

.kt-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.kt-stat-val {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}

.kt-stat-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Test Grid */
.kt-test-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 36px;
}

.kt-test-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}

.kt-test-item:hover {
  border-color: var(--primary-light);
  background: var(--bg-dark);
}

.kt-test-num {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}

.kt-test-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kt-test-title {
  font-weight: 600;
  font-size: 15px;
}

.kt-test-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.kt-test-arrow {
  font-size: 18px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Categories Nav */
.kt-categories-nav {
  margin-bottom: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.kt-categories-nav h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px;
}

.kt-cat-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.kt-cat-link {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.15s;
}

.kt-cat-link:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* SEO Content */
.kt-seo-content {
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.kt-seo-content h2, .kt-seo-content h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 24px 0 10px;
  color: var(--text);
}

.kt-seo-content p, .kt-seo-content li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.kt-seo-content ul { padding-left: 20px; margin: 0 0 16px; }

.kt-seo-content details {
  margin-bottom: 8px;
  padding: 14px 18px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.kt-seo-content summary {
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  color: var(--text);
}

.kt-seo-content details p {
  margin: 8px 0 0;
}

/* ============ TEST PAGE ============ */
.kt-quiz-area {
  padding: 0;
}

.kt-quiz-header {
  margin-bottom: 24px;
}

.kt-quiz-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 16px;
  color: var(--text);
}

/* Progress */
.kt-quiz-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kt-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-dark);
  border-radius: 100px;
  overflow: hidden;
}

.kt-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 100px;
  transition: width 0.4s ease;
}

.kt-progress-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 40px;
  text-align: right;
}

/* Question Container */
.kt-question-container.kt-animate {
  animation: ktFadeIn 0.3s ease-out;
  will-change: transform, opacity;
}

@keyframes ktFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.kt-q-counter {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
  display: inline-block;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.kt-q-image {
  border-radius: var(--radius-md);
  overflow: hidden;
  max-height: 240px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg);
  margin-bottom: 16px;
}

.kt-q-image img {
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
}

.kt-q-text {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 20px;
}

.kt-q-text p { margin: 0 0 8px; }
.kt-q-text p:last-child { margin-bottom: 0; }
.kt-q-text ul, .kt-q-text ol { margin: 8px 0; padding-left: 20px; }
.kt-q-text li { margin-bottom: 4px; }
.kt-q-text strong { font-weight: 800; }
.kt-q-text br { display: block; margin-bottom: 4px; content: ""; }

.kt-fb-detail { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin: 0; }
.kt-fb-detail p { margin: 0 0 6px; }
.kt-fb-detail p:last-child { margin-bottom: 0; }
.kt-fb-detail strong { font-weight: 700; }

/* Options */
.kt-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kt-option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}

.kt-option-btn:hover:not(:disabled) {
  border-color: var(--primary-light);
  background: var(--bg-dark);
}

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

.kt-option-label {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  color: var(--text-secondary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.kt-option-text {
  flex: 1;
  line-height: 1.5;
}

/* Answer States */
.kt-option-btn.kt-correct {
  background: var(--success-bg);
  border-color: var(--success);
}

.kt-option-btn.kt-correct .kt-option-label {
  background: var(--success);
  color: #fff;
}

.kt-option-btn.kt-wrong {
  background: var(--danger-bg);
  border-color: var(--danger);
}

.kt-option-btn.kt-wrong .kt-option-label {
  background: var(--danger);
  color: #fff;
}

/* Feedback */
.kt-feedback {
  margin-top: 16px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  animation: ktFadeIn 0.3s ease-out;
}

.kt-fb-status {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.kt-fb-correct { color: var(--success); }
.kt-fb-wrong { color: var(--danger); }

.kt-fb-detail {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Next Button */
.kt-btn-next {
  width: 100%;
  padding: 16px;
  margin-top: 16px;
  font-size: 16px;
  font-weight: 700;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.kt-btn-next:hover { background: var(--primary-dark); }

/* ============ RESULTS ============ */
.kt-results-area {
  animation: ktFadeIn 0.4s ease-out;
}

.kt-results-card {
  padding: 36px 0;
  text-align: center;
}

.kt-results-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.kt-results-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--text);
}

.kt-results-score {
  font-size: 56px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 4px;
}

.kt-results-score span {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}

.kt-results-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 24px 0;
}

.kt-rs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.kt-rs-val { font-size: 24px; font-weight: 800; color: var(--text); }
.kt-rs-lbl { font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }

/* Progress Bar Result */
.kt-results-bar {
  height: 12px;
  background: var(--bg-dark);
  border-radius: 100px;
  position: relative;
  overflow: visible;
  margin-bottom: 8px;
}

.kt-results-bar-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.8s ease;
}

.kt-bar-pass { background: var(--success); }
.kt-bar-fail { background: var(--danger); }

.kt-results-bar-threshold {
  position: absolute;
  top: -4px;
  width: 3px;
  height: 20px;
  background: var(--text);
  border-radius: 2px;
  transform: translateX(-50%);
}

.kt-results-note {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 24px;
}

/* Navigation Links */
.kt-nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}

.kt-nav-btn {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.15s;
}

.kt-nav-btn:hover { background: var(--bg-dark); }

.kt-nav-btn.kt-nav-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.kt-nav-btn.kt-nav-primary:hover { background: var(--primary-dark); }

/* Share/Retry */
.kt-share-row {
  display: flex;
  gap: 12px;
}

.kt-btn-share, .kt-btn-retry {
  flex: 1;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  border: none;
  transition: all 0.15s;
}

.kt-btn-share {
  background: var(--bg);
  border: 2px solid var(--border);
  color: var(--text);
}

.kt-btn-share:hover { background: var(--bg-dark); }

.kt-btn-retry {
  background: var(--primary);
  color: #fff;
}

.kt-btn-retry:hover { background: var(--primary-dark); }

/* ============ MOBILE ============ */
@media (max-width: 600px) {
  .kt-hub, .kt-test { padding: 0; }
  .kt-hub-title { font-size: 24px; }
  .kt-quiz-title { font-size: 20px; }
  .kt-hub-stats { padding: 16px; gap: 8px; }
  .kt-stat-val { font-size: 24px; }
  .kt-q-text { font-size: 15px; }
  .kt-option-btn { padding: 14px 16px; font-size: 14px; }
  .kt-option-label { min-width: 36px; height: 36px; font-size: 14px; }
  .kt-results-score { font-size: 48px; }
  .kt-share-row { flex-direction: column; }
  .kt-nav-links { flex-direction: column; }
  .kt-nav-btn { text-align: center; }
  .kt-cat-links { gap: 6px; }
  .kt-cat-link { padding: 8px 14px; font-size: 13px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .kt-hub *, .kt-test *, .kt-hub *::before, .kt-test *::before {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
