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

:root {
  --bg: #faf9f7;
  --fg: #2d2d2d;
  --muted: #777;
  --accent: #6c5ce7;
  --rule: #e0ddd8;
}

body {
  font-family: 'DM Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--fg);
  font-size: 17px;
  line-height: 1.65;
  -webkit-tap-highlight-color: transparent;
}

#app {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- WELCOME ---- */

.welcome {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 0;
}

.welcome h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 20px;
}

.welcome h1 span { color: var(--accent); }

.welcome p {
  font-size: 1.06rem;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 12px;
  line-height: 1.7;
}

.welcome-info {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 40px;
  letter-spacing: 0.3px;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  border: 2px solid var(--fg);
  background: var(--fg);
  color: var(--bg);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn:hover {
  background: var(--bg);
  color: var(--fg);
}

.btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.btn:disabled:hover {
  background: var(--fg);
  color: var(--bg);
}

.btn--outline {
  background: var(--bg);
  color: var(--fg);
}

.btn--outline:hover {
  background: var(--fg);
  color: var(--bg);
}

/* ---- QUIZ ---- */

.quiz {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 40px 0 60px;
}

.progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.progress-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  min-width: 56px;
}

.progress-track {
  flex: 1;
  height: 2px;
  background: var(--rule);
}

.progress-bar {
  height: 100%;
  background: var(--fg);
  transition: width 0.3s ease;
}

.q-category {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 12px;
}

.q-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  line-height: 1.3;
}

.q-text {
  font-size: 1.06rem;
  line-height: 1.7;
  color: var(--fg);
  margin-bottom: 36px;
  max-width: 640px;
}


.options {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-top: 1px solid var(--rule);
  margin-bottom: 40px;
}

.option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border: none;
  border-bottom: 1px solid var(--rule);
  background: none;
  font-family: inherit;
  font-size: 0.94rem;
  color: var(--fg);
  text-align: left;
  cursor: pointer;
  transition: color 0.1s;
}

.option:hover { color: var(--accent); }

.option.selected {
  color: var(--accent);
  font-weight: 600;
}

.option-circle {
  width: 16px;
  height: 16px;
  border: 2px solid var(--rule);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.1s;
}

.option:hover .option-circle { border-color: var(--accent); }

.option.selected .option-circle {
  border-color: var(--accent);
  background: var(--accent);
}

.option.selected .option-circle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 6px;
  height: 6px;
  background: var(--bg);
  border-radius: 50%;
}

.nav {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.nav .btn { flex: 1; text-align: center; }

.btn-back {
  background: var(--bg);
  color: var(--muted);
  border-color: var(--rule);
}

.btn-back:hover {
  color: var(--fg);
  border-color: var(--fg);
  background: var(--bg);
}

.btn-back:disabled {
  opacity: 0.2;
}

/* FIX #10: .btn.btn-back disabled hover spesifikilik düzeltmesi */
.btn.btn-back:disabled:hover {
  color: var(--muted);
  border-color: var(--rule);
  background: var(--bg);
}

/* ---- QUESTION TRANSITION ---- */

.q-body { opacity: 1; transition: opacity 0.1s ease; }
.q-body.fade-out { opacity: 0; }

/* ---- RESULT ---- */

.result {
  padding: 48px 0 80px;
}

.result h2 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 4px;
}

.result-sub {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 36px;
}

.compass-container {
  width: 100%;
  margin-bottom: 36px;
}

.compass-container svg {
  width: 100%;
  height: auto;
  display: block;
}

.result-quadrant {
  border-top: 2px solid var(--fg);
  padding-top: 20px;
  margin-bottom: 32px;
}

.result-quadrant-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.result-quadrant-desc {
  font-size: 1.06rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.result-scores {
  display: flex;
  gap: 24px;
  font-size: 0.88rem;
  color: var(--muted);
}

.result-scores strong {
  color: var(--fg);
  font-weight: 700;
}

.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.result-actions .btn {
  flex: 1;
  text-align: center;
  min-width: 160px;
}

/* ---- TOAST ---- */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--fg);
  color: var(--bg);
  padding: 10px 24px;
  font-size: 0.82rem;
  font-weight: 500;
  z-index: 100;
  opacity: 0;
  animation: toast 2.5s ease forwards;
}

@keyframes toast {
  0% { opacity: 0; }
  12% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* ---- RESPONSIVE ---- */

@media (max-width: 480px) {
  body { font-size: 16px; }
  #app { padding: 0 16px; }
  .welcome h1 { font-size: 2.2rem; }
  .q-title { font-size: 1.25rem; }
  .result h2 { font-size: 1.8rem; }
  .result-actions { flex-direction: column; }
  .result-actions .btn { min-width: auto; }
}
