:root {
  /* Dinamik arka plan renkleri - JS tarafından güncellenir */
  --bg-color: #e8e6e3;
  --text-color: #3a3a3a;
  --text-opacity: 0.85;

  /* Gradient renkleri - cevaplara göre değişir */
  --gradient-1: rgba(180, 160, 200, 0.15);
  --gradient-2: rgba(160, 180, 200, 0.12);
  --gradient-3: rgba(140, 160, 180, 0.1);
  --gradient-4: rgba(170, 150, 190, 0.12);
}

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

body {
  font-family:
    "Segoe UI",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: none;
}

body.transitions-enabled {
  transition:
    background-color 1.5s ease,
    color 1s ease;
}

/* Gündüz Modu */
body.day {
  color: #3a3a3a;
}

/* Gece Modu */
body.night {
  color: rgba(255, 255, 255, 0.85);
}

/* Gradient Arka Plan - Dinamik ve Canlı */
.gradient-bg {
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  opacity: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 15% 85%, var(--gradient-1) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 15%, var(--gradient-2) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, var(--gradient-3) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 70%, var(--gradient-4) 0%, transparent 45%);
  animation: gradientFlow 30s ease-in-out infinite;
  transition: opacity 2s ease;
}

.gradient-bg.visible {
  opacity: 1;
}

.gradient-bg.paused {
  animation-play-state: paused;
}

/* Canlı ve akıcı gradient akışı */
@keyframes gradientFlow {
  0% {
    transform: translate(0%, 0%) scale(1) rotate(0deg);
    filter: hue-rotate(0deg) brightness(1);
  }
  20% {
    transform: translate(10%, 5%) scale(1.02) rotate(1deg);
    filter: hue-rotate(5deg) brightness(1.02);
  }
  40% {
    transform: translate(5%, 15%) scale(1.01) rotate(-1deg);
    filter: hue-rotate(10deg) brightness(1);
  }
  60% {
    transform: translate(-5%, 10%) scale(1.03) rotate(1deg);
    filter: hue-rotate(8deg) brightness(1.01);
  }
  80% {
    transform: translate(-10%, 0%) scale(1.01) rotate(-1deg);
    filter: hue-rotate(3deg) brightness(1);
  }
  100% {
    transform: translate(0%, 0%) scale(1) rotate(0deg);
    filter: hue-rotate(0deg) brightness(1);
  }
}

/* Cevaplara göre tepki renkleri - FARKLI VE BELİRGİN */

/* Zihinsel yorgun - Derin mor/mavi (sakinleştirici) */
body.mood-zihinsel-yorgun {
  --gradient-1: rgba(90, 60, 180, 0.28);
  --gradient-2: rgba(70, 90, 200, 0.25);
  --gradient-3: rgba(100, 80, 190, 0.18);
  --gradient-4: rgba(80, 70, 170, 0.2);
}

/* Bedensel yorgun - Sıcak leylak/pembe (yumuşak) */
body.mood-bedensel-yorgun {
  --gradient-1: rgba(180, 130, 160, 0.26);
  --gradient-2: rgba(160, 140, 180, 0.22);
  --gradient-3: rgba(170, 150, 170, 0.16);
  --gradient-4: rgba(190, 140, 150, 0.18);
}

/* Karışık - Nötr gri tonları */
body.mood-karisik {
  --gradient-1: rgba(150, 140, 160, 0.22);
  --gradient-2: rgba(140, 150, 170, 0.18);
  --gradient-3: rgba(145, 145, 165, 0.14);
  --gradient-4: rgba(155, 140, 160, 0.16);
}

/* Dağınık - Hafif mor/mavi tonları */
body.mood-daginik {
  --gradient-1: rgba(160, 150, 170, 0.24);
  --gradient-2: rgba(150, 160, 180, 0.2);
  --gradient-3: rgba(155, 155, 175, 0.16);
  --gradient-4: rgba(165, 150, 170, 0.18);
}

/* Soru 2 cevaplarına göre ek tepkiler */
body.weight-zihnim {
  --gradient-1: rgba(80, 60, 190, 0.32);
  --gradient-2: rgba(60, 80, 210, 0.28);
}

body.weight-bedenim {
  --gradient-1: rgba(180, 100, 140, 0.28);
  --gradient-2: rgba(170, 120, 160, 0.24);
}

body.weight-ikisi-de {
  --gradient-1: rgba(130, 90, 170, 0.28);
  --gradient-2: rgba(110, 100, 190, 0.24);
}

body.weight-emin-degilim {
  --gradient-1: rgba(150, 140, 160, 0.22);
  --gradient-2: rgba(140, 150, 170, 0.18);
}

.container {
  position: relative;
  z-index: 1;
  max-width: 400px;
  width: 90%;
  padding: 40px 20px;
  text-align: center;
}

/* Ekranlar */
.screen {
  opacity: 1;
  transition: opacity 1s ease;
}

.screen.hidden {
  display: none;
}

.screen.fade-out {
  opacity: 0;
}

.screen.fade-in {
  opacity: 0;
  animation: fadeIn 0.9s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-15px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Metin Animasyonları - Yatay */
.text-fade-in {
  opacity: 0;
  animation: textFadeIn 0.8s ease forwards;
}

.text-fade-out {
  animation: textFadeOut 0.7s ease forwards;
}

@keyframes textFadeIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* Sıralı metin animasyonu - Yatay */
.suggestion-line {
  opacity: 0;
  display: block;
  margin-bottom: 16px;
  transform: translateX(-15px);
}

.suggestion-line.animate {
  animation: suggestionFadeIn 1s ease forwards;
}

@keyframes suggestionFadeIn {
  from {
    opacity: 0;
    transform: translateX(-15px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.suggestion-line:nth-child(1) {
  animation-delay: 0s;
}
.suggestion-line:nth-child(2) {
  animation-delay: 0.4s;
}
.suggestion-line:nth-child(3) {
  animation-delay: 0.8s;
}

/* Kapanış sonrası boş ekran */
body.closed .container {
  opacity: 0;
  transition: opacity 0.8s ease;
}

/* Tamam yazısı */
.tamam-text {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: 0.5px;
  opacity: 0;
  z-index: 10;
  transition: opacity 1.2s ease;
}

.tamam-text.visible {
  opacity: 0.4;
}

.tamam-text.fade-out {
  opacity: 0;
  transition: opacity 1.2s ease;
}

body.night .tamam-text {
  color: rgba(255, 255, 255, 0.5);
}

body.day .tamam-text {
  color: rgba(0, 0, 0, 0.35);
}

/* Açılış Metni */
.opening-text {
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: 0.5px;
  line-height: 1.6;
  opacity: 0;
  transform: translateX(-20px);
}

.opening-text.fade-in {
  animation: openingFadeIn 1.2s ease forwards;
}

.opening-text.fade-out {
  animation: openingFadeOut 1s ease forwards;
}

@keyframes openingFadeIn {
  0% {
    opacity: 0;
    transform: translateX(-20px);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

@keyframes openingFadeOut {
  0% {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translateX(20px);
    filter: blur(4px);
  }
}

body.night .opening-text {
  color: rgba(255, 255, 255, 0.7);
}

body.day .opening-text {
  color: rgba(0, 0, 0, 0.6);
}

/* Soru Metni - Sayfadaki en net element */
.question-text {
  font-family:
    "Segoe UI",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 40px;
  line-height: 1.5;
}

body.night .question-text {
  color: rgba(255, 255, 255, 0.9);
}

body.day .question-text {
  color: rgba(0, 0, 0, 0.8);
}

/* Seçenekler - Gerçek buton gibi değil, hafif çerçeveli */
.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 10 seçenek için kompakt düzen */
.options-compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 320px;
}

.options-compact .option-btn {
  padding: 10px 14px;
  font-size: 0.92rem;
}

.option-btn {
  background: transparent;
  border: 1px solid;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
  border-radius: 4px;
  opacity: 0.7;
}

body.night .option-btn {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
}

body.night .option-btn:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.03);
}

body.day .option-btn {
  border-color: rgba(0, 0, 0, 0.2);
  color: rgba(0, 0, 0, 0.6);
}

body.day .option-btn:hover {
  opacity: 1;
  border-color: rgba(0, 0, 0, 0.3);
  background: rgba(0, 0, 0, 0.03);
}

/* Öneri Ekranı - Okunur ama baskın değil */
.suggestion-container {
  margin-bottom: 50px;
}

.suggestion-text {
  font-family:
    "Segoe UI",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-size: 1.12rem;
  font-weight: 300;
  line-height: 1.85;
  margin-bottom: 0;
}

body.night .suggestion-text {
  color: rgba(255, 255, 255, 0.85);
}

body.day .suggestion-text {
  color: rgba(0, 0, 0, 0.7);
}

.closing-text {
  font-size: 0.9rem;
  margin-bottom: 35px;
  margin-top: 45px;
  font-weight: 400;
  opacity: 0;
}

.closing-text.animate {
  animation: textFadeIn 0.7s ease forwards;
  animation-delay: 0.8s;
}

body.night .closing-text {
  color: rgba(255, 255, 255, 0.45);
}

body.day .closing-text {
  color: rgba(0, 0, 0, 0.35);
}

/* Kapat butonu - fısıldar, bağırmaz */
button.close-btn {
  background: transparent;
  border: 1px solid;
  padding: 12px 40px;
  font-size: 0.9rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  border-radius: 4px;
  opacity: 0;
}

button.close-btn.animate {
  animation: textFadeIn 0.6s ease forwards;
  opacity: 0.5;
}

body.night button.close-btn {
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.55);
}

body.night button.close-btn:hover {
  opacity: 0.8;
  border-color: rgba(255, 255, 255, 0.4);
}

body.day button.close-btn {
  border-color: rgba(0, 0, 0, 0.15);
  color: rgba(0, 0, 0, 0.4);
}

body.day button.close-btn:hover {
  opacity: 0.7;
  border-color: rgba(0, 0, 0, 0.25);
}

/* Devam Butonu - İzin alma hareketi gibi */
.continue-btn {
  opacity: 0;
  background: transparent;
  border: none;
  padding: 12px 24px;
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: opacity 0.3s ease;
  font-family: inherit;
  text-decoration: none;
  user-select: none;
}

.continue-btn.visible {
  opacity: 0.45;
}

body.night .continue-btn {
  color: rgba(255, 255, 255, 0.45);
}

body.night .continue-btn:hover {
  opacity: 0.75;
}

body.day .continue-btn {
  color: rgba(0, 0, 0, 0.45);
}

body.day .continue-btn:hover {
  opacity: 0.75;
}

/* Aksiyon Butonları Container - Alt alta, ortalanmış */
.action-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

/* Kapat/Atla Butonu - Çok geri planda */
.skip-btn {
  opacity: 0;
  background: transparent;
  border: none;
  padding: 8px 16px;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: opacity 0.3s ease;
  font-family: inherit;
  text-decoration: none;
  user-select: none;
}

.skip-btn.visible {
  opacity: 0.28;
}

body.night .skip-btn {
  color: rgba(255, 255, 255, 0.28);
}

body.night .skip-btn:hover {
  opacity: 0.45;
}

body.day .skip-btn {
  color: rgba(0, 0, 0, 0.28);
}

body.day .skip-btn:hover {
  opacity: 0.45;
}

/* Responsive */
@media (max-width: 480px) {
  .opening-text {
    font-size: 1.3rem;
  }

  .question-text {
    font-size: 1.15rem;
    margin-bottom: 30px;
  }

  .option-btn {
    padding: 12px 20px;
    font-size: 0.95rem;
  }

  .suggestion-text {
    font-size: 1.1rem;
  }
}
