/* ==========================================================================
   SOSYO-BİLİŞSEL DEĞERLENDİRME ANKETİ - LIGHT EDITORIAL DESIGN SYSTEM
   Ultra-Clean, White-Dominant, Premium Academic / Corporate Aesthetic
   ========================================================================== */

:root {
  /* THEME 1: CORPORATE / INSTITUTIONAL (Resmi & Bilimsel - Beyaz/Gri Tabanlı) */
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --card-border-hover: #cbd5e1;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 20px 40px -10px rgba(15, 23, 42, 0.07);

  --text-main: #0f172a;       /* Çok net ve okunaklı koyu arduvaz */
  --text-muted: #475569;      /* Açıklama ve gövde metinleri */
  --text-dim: #94a3b8;        /* İkincil etiketler */

  --accent: #1e40af;          /* Kurumsal Oxford Mavisi */
  --accent-light: #eff6ff;
  --accent-border: #bfdbfe;
  --accent-glow: rgba(30, 64, 175, 0.12);

  --btn-primary-bg: #0f172a;  /* Çok şık, minimal koyu buton */
  --btn-primary-text: #ffffff;
  --btn-primary-hover: #1e293b;

  --badge-bg: #f1f5f9;
  --badge-text: #1e293b;
  --badge-border: #e2e8f0;

  --option-bg: #ffffff;
  --option-border: #e2e8f0;
  --option-hover-bg: #f8fafc;
  --option-hover-border: #94a3b8;
  --option-selected-bg: #eff6ff;
  --option-selected-border: #2563eb;
  --option-selected-text: #1e3a8a;

  --notice-bg: #f8fafc;
  --notice-border: #2563eb;
  --notice-text: #334155;

  --ambient-color-1: rgba(37, 99, 235, 0.03);
  --ambient-color-2: rgba(14, 165, 233, 0.03);

  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* THEME 2: WARM (Sorular ilerledikçe yumuşayan sıcak krem/mor ton) */
[data-theme="warm"] {
  --bg-primary: #faf8f5;
  --bg-secondary: #f4eee7;
  --card-bg: #ffffff;
  --card-border: #ede5dc;
  --card-border-hover: #cbd5e1;
  --card-shadow: 0 4px 6px -1px rgba(76, 29, 149, 0.03), 0 20px 40px -10px rgba(59, 20, 89, 0.07);

  --text-main: #181126;
  --text-muted: #524763;
  --text-dim: #9b8da9;

  --accent: #6d28d9;
  --accent-light: #f5f3ff;
  --accent-border: #ddd6fe;
  --accent-glow: rgba(109, 40, 217, 0.12);

  --btn-primary-bg: #6d28d9;
  --btn-primary-text: #ffffff;
  --btn-primary-hover: #5b21b6;

  --badge-bg: #f5f3ff;
  --badge-text: #6d28d9;
  --badge-border: #ddd6fe;

  --option-selected-bg: #f5f3ff;
  --option-selected-border: #7c3aed;
  --option-selected-text: #4c1d95;

  --notice-bg: #fdfaf7;
  --notice-border: #7c3aed;
  --notice-text: #4c1d95;

  --ambient-color-1: rgba(124, 58, 237, 0.04);
  --ambient-color-2: rgba(236, 72, 153, 0.03);
}

/* THEME 3: ROMANTIC (Final / Tebessüm ettiren tatlı gül kurusu ton) */
[data-theme="romantic"] {
  --bg-primary: #fff7f8;
  --bg-secondary: #feeef1;
  --card-bg: #ffffff;
  --card-border: #fed7df;
  --card-border-hover: #fca5b9;
  --card-shadow: 0 4px 6px -1px rgba(225, 29, 72, 0.04), 0 20px 40px -10px rgba(190, 18, 60, 0.08);

  --text-main: #1e0d13;
  --text-muted: #643f4a;
  --text-dim: #a8828e;

  --accent: #e11d48;
  --accent-light: #fff1f2;
  --accent-border: #fecdd3;
  --accent-glow: rgba(225, 29, 72, 0.14);

  --btn-primary-bg: #e11d48;
  --btn-primary-text: #ffffff;
  --btn-primary-hover: #be123c;

  --badge-bg: #fff1f2;
  --badge-text: #e11d48;
  --badge-border: #fecdd3;

  --option-selected-bg: #fff1f2;
  --option-selected-border: #e11d48;
  --option-selected-text: #9f1239;

  --notice-bg: #fff1f2;
  --notice-border: #e11d48;
  --notice-text: #881337;

  --ambient-color-1: rgba(225, 29, 72, 0.04);
  --ambient-color-2: rgba(244, 114, 182, 0.03);
}

/* Reset & Temel Yapı */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.4s ease, color 0.3s ease;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Hafif Arka Plan Deseni (Minimalist & Çok Temiz) */
.ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(circle 800px at 15% 10%, var(--ambient-color-1), transparent 70%),
    radial-gradient(circle 900px at 85% 90%, var(--ambient-color-2), transparent 70%);
  transition: all 0.6s ease;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: 
    radial-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at 50% 50%, black 50%, transparent 95%);
}

/* Header */
.top-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.header-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge {
  width: 36px;
  height: 36px;
  background: #0f172a;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: var(--transition-smooth);
}

[data-theme="warm"] .brand-badge {
  background: #6d28d9;
}

[data-theme="romantic"] .brand-badge {
  background: #e11d48;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-main);
  text-transform: uppercase;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.session-status {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
  display: inline-block;
  animation: pulseLive 2s infinite ease-in-out;
}

@keyframes pulseLive {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.9); opacity: 0.6; }
}

.security-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
}

/* İlerleme Çubuğu */
.progress-wrapper {
  max-width: 680px;
  margin: 28px auto 0 auto;
  padding: 0 24px;
  width: 100%;
  position: relative;
  z-index: 10;
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--btn-primary-bg);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 600;
}

/* Ana Bölüm & Kartlar */
.main-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 20px;
  position: relative;
  z-index: 10;
}

.card-container {
  width: 100%;
  max-width: 650px;
}

.survey-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 42px 40px;
  box-shadow: var(--card-shadow);
  transition: var(--transition-smooth);
  animation: cardAppear 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
}

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

/* Başlangıç Kartı */
.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--badge-bg);
  color: var(--badge-text);
  border: 1px solid var(--badge-border);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.welcome-heading {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 16px;
}

.highlight-text {
  color: var(--accent);
  display: inline-block;
}

.welcome-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 28px;
}

/* Bilgi Tablosu (Info Grid) */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  border: 1px solid var(--card-border);
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.info-val {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Resmi Uyarı Kutusu */
.notice-callout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--notice-bg);
  border-left: 3px solid var(--notice-border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  margin-bottom: 30px;
  border-top: 1px solid var(--card-border);
  border-right: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

.notice-callout svg {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.notice-callout p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Butonlar */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  box-shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.15);
}

.btn-primary:hover {
  background: var(--btn-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -2px rgba(15, 23, 42, 0.22);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-muted);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background: #f8fafc;
  color: var(--text-main);
  border-color: #cbd5e1;
}

.action-footer {
  display: flex;
  justify-content: flex-end;
}

/* Soru Başlığı ve Alanı */
.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.question-badge {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}

.question-theme-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--badge-text);
  background: var(--badge-bg);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--badge-border);
}

.question-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.question-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 26px;
}

/* Şıklar (Options) - Temiz Beyaz Kartlar */
.options-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.option-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--option-bg);
  border: 1.5px solid var(--option-border);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
  user-select: none;
}

.option-card:hover {
  background: var(--option-hover-bg);
  border-color: var(--option-hover-border);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.option-card.selected {
  background: var(--option-selected-bg);
  border-color: var(--option-selected-border);
  box-shadow: 0 0 0 1px var(--option-selected-border);
}

.option-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-smooth);
  background: #ffffff;
}

.option-card.selected .option-indicator {
  border-color: var(--option-selected-border);
  background: var(--option-selected-border);
}

.option-indicator::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.option-card.selected .option-indicator::after {
  opacity: 1;
}

.option-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.45;
}

.option-card.selected .option-label {
  color: var(--option-selected-text);
  font-weight: 600;
}

/* Açık uçlu metin alanı */
.text-input-group {
  margin-bottom: 24px;
}

.custom-textarea {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  resize: vertical;
  transition: var(--transition-smooth);
}

.custom-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Hata Mesajı */
.validation-message {
  font-size: 0.825rem;
  font-weight: 600;
  color: #dc2626;
  margin-bottom: 18px;
  display: none;
  animation: shake 0.3s ease;
}

.validation-message.show {
  display: block;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.question-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--card-border);
}

/* Bitiş Ekranı (Finish View) */
.finish-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  color: var(--accent);
  box-shadow: 0 4px 20px var(--accent-glow);
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.finish-title {
  text-align: center;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 10px;
}

.finish-desc {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 26px auto;
}

.result-summary-box {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.sum-label {
  color: var(--text-muted);
  font-weight: 500;
}

.sum-val {
  font-weight: 700;
  color: var(--text-main);
}

.sum-val.highlight {
  color: var(--accent);
  font-style: italic;
  font-weight: 600;
}

.finish-actions {
  display: flex;
  justify-content: center;
}

/* Confetti Canvas */
.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

/* Intermission Card Styling */
.intermission-content {
  text-align: center;
  padding: 10px 0 20px 0;
}

.intermission-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.intermission-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-main);
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}

.intermission-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 28px auto;
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 20px 16px;
  font-size: 0.75rem;
  color: var(--text-dim);
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.5);
}

/* Responsive Düzenlemeler */
@media (max-width: 640px) {
  .survey-card {
    padding: 28px 20px;
    border-radius: 14px;
  }

  .welcome-heading {
    font-size: 1.65rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px;
  }

  .header-container {
    padding: 12px 16px;
  }

  .brand-sub, .security-badge {
    display: none;
  }

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

  .btn {
    padding: 12px 18px;
    font-size: 0.88rem;
  }
}

/* Özel Kural Popup Modalı (Bu web sitede kuralları ben koyuyorum) */
.custom-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  animation: fadeInModal 0.25s ease forwards;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.custom-modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px #e2e8f0;
  animation: scaleInModal 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes scaleInModal {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-icon {
  font-size: 2.8rem;
  line-height: 1;
  margin-bottom: 14px;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.modal-message {
  font-size: 1.05rem;
  font-weight: 700;
  color: #e11d48;
  line-height: 1.5;
  margin-bottom: 24px;
}

.modal-btn {
  width: 100%;
}

/* Şık Kaybolma Animasyonu (Puff Out) */
.option-card.vanish {
  animation: puffOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
}

@keyframes puffOut {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  40% {
    transform: scale(1.04);
    opacity: 0.8;
  }
  100% {
    transform: scale(0.5);
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    border-width: 0;
    overflow: hidden;
  }
}
