/* =========================================================
   TASARIM SİSTEMİ (Renkleri buradan kolayca özelleştirebilirsiniz)
   ========================================================= */
:root {
  /* Kurumsal Ana Renkler */
  --primary: #0056a3;
  --primary-hover: #00417d;
  --primary-deep: #003566;
  --primary-soft: #eff6fc;
  --primary-border: #bfd9f2;

  /* Şehircilik Atölyesi Kurumsal Palet */
  --teal: #009386;
  --teal-hover: #00796e;
  --amber: #f6b93b;
  --magenta: #b61d62;
  --indigo: #4a3f78;

  /* Yüzey ve Metin Renkleri */
  --bg-page: #edf3f9;
  --bg-card: #ffffff;
  --bg-subtle: #f7fafd;
  --text-main: #0f1f33;
  --text-secondary: #47586c;
  --text-muted: #76879b;
  --border-color: #dde6f0;
  --border-soft: #edf2f7;
  --danger: #d63031;
  --success: #009386;

  /* Köşe ve Derinlik */
  --radius-card: 22px;
  --radius-item: 13px;
  --radius-btn: 12px;
  --shadow-card:
    0 24px 60px -12px rgba(15, 38, 68, 0.11),
    0 6px 20px -4px rgba(15, 38, 68, 0.05),
    0 0 0 1px rgba(210, 224, 240, 0.65);
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.bg-decoration {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px circle at 10% 10%, rgba(0, 147, 134, 0.085), transparent 60%),
    radial-gradient(520px circle at 92% 14%, rgba(246, 185, 59, 0.095), transparent 58%),
    radial-gradient(620px circle at 88% 92%, rgba(74, 63, 120, 0.085), transparent 60%),
    radial-gradient(560px circle at 12% 88%, rgba(0, 86, 163, 0.08), transparent 60%),
    linear-gradient(180deg, #f3f7fc 0%, #e9f1f9 100%);
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 16px 22px;
}

/* =========================================================
   ANA KART VE LOGO
   ========================================================= */
.survey-card {
  width: 100%;
  max-width: 760px;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.brand-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 6px;
  width: 100%;
}

.ribbon-teal { background: var(--teal); }
.ribbon-amber { background: var(--amber); }
.ribbon-magenta { background: var(--magenta); }
.ribbon-indigo { background: var(--indigo); }

.card-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 22px 32px 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border-bottom: 1px solid var(--border-soft);
}

.brand-logo {
  max-height: 62px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.brand-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  text-align: center;
}

.brand-main {
  font-weight: 800;
  font-size: 0.96rem;
  letter-spacing: 0.04em;
  color: var(--indigo);
}

.brand-divider {
  width: 2px;
  height: 22px;
  background: var(--border-color);
}

.brand-sub {
  font-weight: 700;
  font-size: 0.96rem;
  letter-spacing: 0.05em;
  color: var(--teal);
}

/* =========================================================
   EKRAN GEÇİŞLERİ
   ========================================================= */
.screen {
  display: none;
  padding: 30px 40px 34px;
  animation: fadeSlideIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.screen.active {
  display: block;
}

.question-animate {
  animation: questionFade 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

/* =========================================================
   KARŞILAMA EKRANI
   ========================================================= */
.section-tag {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.welcome-title {
  margin: 0 0 18px;
  font-size: 1.62rem;
  font-weight: 800;
  line-height: 1.26;
  letter-spacing: -0.025em;
  color: var(--text-main);
}

.welcome-box {
  position: relative;
  background: var(--bg-subtle);
  border: 1px solid #e4ecf5;
  border-radius: 14px;
  padding: 22px 24px 22px 28px;
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.68;
  overflow: hidden;
}

.welcome-box::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--teal) 0%, var(--primary) 100%);
}

.welcome-box p {
  margin: 0 0 13px;
}

.welcome-box p:last-child {
  margin-bottom: 0;
}

.welcome-thanks {
  font-weight: 700;
  color: var(--text-main);
  padding-top: 2px;
}

.welcome-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  background: #f4f8fc;
  border: 1px solid #e3ecf5;
  border-radius: 10px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.meta-chip svg {
  color: var(--primary);
  flex-shrink: 0;
}

/* =========================================================
   KVKK EKRANI
   ========================================================= */
.kvkk-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.kvkk-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--primary-soft) 0%, #e1eefb 100%);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kvkk-eyebrow {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--teal);
  margin-bottom: 2px;
}

.kvkk-title {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.3;
}

.kvkk-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 20px 22px;
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.72;
  margin-bottom: 18px;
}

.kvkk-consent-card {
  font-weight: 600;
}

/* =========================================================
   İLERLEME ÇUBUĞU
   ========================================================= */
.progress-wrapper {
  margin-bottom: 26px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
}

.progress-step {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: #f2f6fb;
  padding: 4px 10px;
  border-radius: 8px;
}

.progress-percent {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--primary);
}

.progress-track {
  width: 100%;
  height: 8px;
  background: #e6eef6;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal) 0%, var(--primary) 100%);
  border-radius: 999px;
  transition: width 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================================
   SORU VE SEÇENEK KARTLARI
   ========================================================= */
.question-title {
  margin: 0 0 8px;
  font-size: 1.24rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.42;
  color: var(--primary-deep);
}

.question-hint {
  margin: 0 0 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.option-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px 18px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-item);
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
  user-select: none;
}

.option-card:hover {
  border-color: #9ec5ea;
  background: #fafdff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 86, 163, 0.06);
}

.option-card.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 3px rgba(0, 86, 163, 0.08);
}

.option-card.disabled-option {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.option-card input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.custom-control {
  flex-shrink: 0;
  width: 21px;
  height: 21px;
  margin-top: 2px;
  border: 2px solid #b8c7d8;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-radio {
  border-radius: 50%;
}

.custom-radio::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  transform: scale(0);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-checkbox {
  border-radius: 6px;
}

.custom-checkbox::after {
  content: "";
  width: 11px;
  height: 6px;
  border-left: 2.3px solid #ffffff;
  border-bottom: 2.3px solid #ffffff;
  transform: rotate(-45deg) scale(0);
  margin-bottom: 2px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.option-card.selected .custom-control,
.option-card input:checked + .custom-control {
  border-color: var(--primary);
  background: var(--primary);
}

.option-card.selected .custom-radio::after,
.option-card input:checked + .custom-radio::after {
  transform: scale(1);
}

.option-card.selected .custom-checkbox::after,
.option-card input:checked + .custom-checkbox::after {
  transform: rotate(-45deg) scale(1);
}

.option-text {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.52;
}

.option-text strong {
  font-weight: 700;
  color: var(--text-main);
}

/* "Diğer" Açıklama Girişi */
.other-input-wrap {
  display: none;
  padding-left: 12px;
  border-left: 3px solid var(--primary-border);
  margin-left: 8px;
  animation: fadeSlideIn 0.2s ease;
}

.other-input-wrap.visible {
  display: block;
}

/* Metin / Sayı Giriş Kutusu */
.text-input {
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--text-main);
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-item);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.text-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 86, 163, 0.11);
}

.inline-error {
  margin: 12px 0 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--danger);
}

/* =========================================================
   BUTONLAR
   ========================================================= */
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
}

.actions-center {
  justify-content: center;
  border-top: none;
  margin-top: 24px;
  padding-top: 4px;
}

.actions-between {
  justify-content: space-between;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 24px;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-lg {
  padding: 14px 34px;
  font-size: 0.98rem;
  border-radius: 13px;
}

.btn-icon {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.btn:hover:not(:disabled) .icon-right {
  transform: translateX(3px);
}

.btn:hover:not(:disabled) .icon-left {
  transform: translateX(-3px);
}

.btn-primary {
  background: linear-gradient(180deg, #0a63b3 0%, var(--primary) 100%);
  color: #ffffff;
  box-shadow: 0 8px 20px -4px rgba(0, 86, 163, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #00549f 0%, var(--primary-hover) 100%);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -6px rgba(0, 86, 163, 0.40);
}

.btn-primary:active:not(:disabled),
.btn-success:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled,
.btn-success:disabled {
  background: #edf2f7;
  color: #9aa8b8;
  border-color: #e2e9f0;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: #f3f6fa;
  color: var(--text-secondary);
  border-color: #e3eaf2;
}

.btn-secondary:hover:not(:disabled) {
  background: #e7eef6;
  color: var(--text-main);
}

.btn-success {
  background: linear-gradient(180deg, #06a294 0%, var(--teal) 100%);
  color: #ffffff;
  box-shadow: 0 8px 20px -4px rgba(0, 147, 134, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-success:hover:not(:disabled) {
  background: linear-gradient(180deg, #008b7e 0%, var(--teal-hover) 100%);
  transform: translateY(-1px);
}

/* =========================================================
   DURUM EKRANLARI
   ========================================================= */
.state-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 16px;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 3.5px solid #e3ebf3;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.state-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.success-icon {
  background: linear-gradient(135deg, rgba(0, 147, 134, 0.14), rgba(0, 147, 134, 0.06));
  border: 1px solid rgba(0, 147, 134, 0.22);
  color: var(--success);
}

.error-icon {
  background: rgba(214, 48, 49, 0.10);
  border: 1px solid rgba(214, 48, 49, 0.20);
  color: var(--danger);
}

.state-title {
  margin: 0 0 10px;
  font-size: 1.48rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.state-text {
  margin: 0 0 22px;
  max-width: 460px;
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.65;
}

.page-footer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
}

.footer-sep {
  opacity: 0.5;
}

/* =========================================================
   MOBİL UYUMLULUK
   ========================================================= */
@media (max-width: 640px) {
  .page-wrapper {
    padding: 10px 10px 16px;
    justify-content: flex-start;
  }

  .survey-card {
    border-radius: 18px;
  }

  .card-header {
    padding: 14px 16px 12px;
  }

  .brand-logo {
    max-height: 44px;
  }

  .screen {
    padding: 18px 16px 22px;
  }

  .welcome-title {
    font-size: 1.22rem;
    margin-bottom: 12px;
  }

  .welcome-box {
    padding: 14px 14px 14px 18px;
    font-size: 0.88rem;
    line-height: 1.56;
  }

  .welcome-box p {
    margin-bottom: 10px;
  }

  .welcome-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin-top: 14px;
  }

  .meta-chip {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 5px;
    padding: 9px 6px;
    font-size: 0.72rem;
    line-height: 1.25;
  }

  .kvkk-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }

  .kvkk-title {
    font-size: 1.08rem;
  }

  .kvkk-box {
    padding: 16px;
    font-size: 0.91rem;
  }

  .question-title {
    font-size: 1.08rem;
  }

  .option-card {
    padding: 13px 14px;
    gap: 12px;
  }

  .option-text {
    font-size: 0.91rem;
  }

  .actions {
    margin-top: 20px;
    padding-top: 16px;
  }

  .actions-center {
    margin-top: 16px;
    padding-top: 2px;
  }

  .btn {
    padding: 11px 18px;
    font-size: 0.9rem;
  }

  .btn-lg {
    width: 100%;
    padding: 13px 20px;
  }
}