/* =====================================================
   Yıldız Bebek – Cinsiyet Tahmin Sitesi
   Ana Tema: Toz Pembe + Bebek Mavisi
   ===================================================== */

:root {
  --pink: #F8C8DC;
  --pink-dark: #E8A0BF;
  --pink-deep: #D4849A;
  --blue: #A8D8EA;
  --blue-dark: #7EC8E3;
  --blue-deep: #5BA3C0;
  --cream: #FFF8F0;
  --white: #FFFFFF;
  --text: #4A3F35;
  --text-light: #7A6F65;
  --shadow: 0 8px 32px rgba(74, 63, 53, 0.12);
  --radius: 20px;
  --font-display: 'Nunito', 'Segoe UI', sans-serif;
  --font-body: 'Quicksand', 'Segoe UI', sans-serif;
  --girl-pct: 50;
  --boy-pct: 50;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ---------- LIQUID BACKGROUND (Ana Sayfa) ---------- */
.liquid-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(135deg, var(--pink) 0%, var(--blue) 100%);
}

.liquid-container {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

.liquid-pink {
  flex: 0 0 calc(var(--girl-pct) * 1%);
  background: linear-gradient(180deg, 
    rgba(248, 200, 220, 0.95) 0%,
    rgba(232, 160, 191, 0.98) 50%,
    rgba(212, 132, 154, 1) 100%);
  position: relative;
  transition: flex-basis 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.liquid-blue {
  flex: 1 1 auto;
  background: linear-gradient(180deg,
    rgba(168, 216, 234, 1) 0%,
    rgba(126, 200, 227, 0.98) 50%,
    rgba(91, 163, 192, 0.95) 100%);
  position: relative;
  transition: flex 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Dalga yüzeyi */
.wave {
  position: absolute;
  left: 0;
  right: 0;
  height: 40px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0,20 Q150,0 300,20 T600,20 T900,20 T1200,20 V40 H0 Z' fill='%23ffffff' fill-opacity='0.25'/%3E%3C/svg%3E") repeat-x;
  background-size: 600px 40px;
  animation: waveMove 8s linear infinite;
  pointer-events: none;
}

.liquid-pink .wave { bottom: -1px; }
.liquid-blue .wave { top: -1px; transform: scaleY(-1); }

@keyframes waveMove {
  0% { background-position-x: 0; }
  100% { background-position-x: 600px; }
}

/* Kabarcıklar */
.bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.bubble {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  animation: rise linear infinite;
  bottom: -20px;
}

@keyframes rise {
  0% { transform: translateY(0) scale(1); opacity: 0.6; }
  100% { transform: translateY(-110vh) scale(0.4); opacity: 0; }
}

/* Parıltı */
.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 8px 2px rgba(255,255,255,0.8);
  animation: sparkle 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* ---------- NAV ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.4);
  box-shadow: 0 2px 20px rgba(0,0,0,0.05);
  padding: 0.75rem 1.5rem;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--pink-deep);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  transition: all 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--pink);
  color: var(--pink-deep);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
}

/* ---------- HERO / ANA SAYFA ---------- */
.hero {
  min-height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
}

.hero-glass {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 28px;
  padding: 2.5rem 2rem;
  max-width: 640px;
  width: 100%;
  box-shadow: var(--shadow);
  animation: fadeUp 0.8s ease;
}

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

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--pink-dark), var(--pink-deep));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 132, 154, 0.4);
}

.btn-secondary {
  background: rgba(255,255,255,0.8);
  color: var(--text);
  border: 2px solid var(--pink);
}

.btn-secondary:hover {
  background: var(--pink);
  transform: translateY(-2px);
}

.btn-blue {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-deep));
  color: white;
}

.btn-blue:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(91, 163, 192, 0.4);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

/* Stats cards */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.stat-card {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 1rem 1.4rem;
  min-width: 120px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  text-align: center;
}

.stat-card .icon { font-size: 1.6rem; margin-bottom: 0.25rem; }
.stat-card .value { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; color: var(--text); }
.stat-card .label { font-size: 0.8rem; color: var(--text-light); }

/* ---------- FORM / TAHMİN SAYFASI ---------- */
.page-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.card {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.5);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--pink-deep);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #eee;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.25s;
  background: white;
}

.form-control:focus {
  outline: none;
  border-color: var(--pink-dark);
  box-shadow: 0 0 0 3px rgba(248, 200, 220, 0.4);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* Cinsiyet seçim kartları */
.gender-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

.gender-card {
  position: relative;
  border: 3px solid transparent;
  border-radius: 20px;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.gender-card input { position: absolute; opacity: 0; pointer-events: none; }

.gender-card .emoji { font-size: 3rem; display: block; margin-bottom: 0.5rem; }
.gender-card .label { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; }

.gender-card.girl { border-color: #f0d0dc; }
.gender-card.boy  { border-color: #c8e0ec; }

.gender-card.girl:hover,
.gender-card.girl.selected {
  border-color: var(--pink-deep);
  background: linear-gradient(180deg, #fff5f8, #ffe8f0);
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(232, 160, 191, 0.35);
}

.gender-card.boy:hover,
.gender-card.boy.selected {
  border-color: var(--blue-deep);
  background: linear-gradient(180deg, #f0f9fc, #e0f2f8);
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(126, 200, 227, 0.35);
}

/* Başarı animasyonu */
.success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  animation: fadeIn 0.4s ease;
}

.success-box {
  text-align: center;
  padding: 2.5rem;
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.success-box .big-emoji { font-size: 4rem; margin-bottom: 1rem; }
.success-box h2 { font-family: var(--font-display); font-size: 1.6rem; margin-bottom: 0.5rem; }
.success-box p { color: var(--text-light); margin-bottom: 1.5rem; }

/* ---------- ANI DEFTERİ (Page Flip) ---------- */
.notebook-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.notebook-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.notebook-header h1 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--pink-deep);
}

.notebook {
  perspective: 2000px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  height: 580px;
}

.notebook-page {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #FFFDF8 0%, #FFF5EE 100%);
  border-radius: 4px 16px 16px 4px;
  box-shadow: 
    0 10px 40px rgba(0,0,0,0.15),
    inset 0 0 60px rgba(248, 200, 220, 0.08);
  border: 1px solid #e8d5c4;
  padding: 2rem 1.75rem 2rem 2.5rem;
  display: none;
  flex-direction: column;
  transform-origin: left center;
  backface-visibility: hidden;
  overflow: hidden;
}

.notebook-page.active {
  display: flex;
  z-index: 2;
}

.notebook-page.flipping-out {
  display: flex;
  animation: pageFlipOut 0.6s ease forwards;
  z-index: 3;
}

.notebook-page.flipping-in {
  display: flex;
  animation: pageFlipIn 0.6s ease forwards;
  z-index: 2;
}

@keyframes pageFlipOut {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(-90deg); opacity: 0.3; }
}

@keyframes pageFlipIn {
  0% { transform: rotateY(90deg); opacity: 0.3; }
  100% { transform: rotateY(0deg); opacity: 1; }
}

/* Defter kenarı çizgisi */
.notebook-page::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--pink-dark), transparent);
  opacity: 0.4;
}

.page-decor {
  position: absolute;
  font-size: 1.4rem;
  opacity: 0.35;
  pointer-events: none;
}
.page-decor.top-right { top: 12px; right: 16px; }
.page-decor.bottom-left { bottom: 12px; left: 28px; }

.page-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.page-greeting {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--text-light);
  font-size: 0.95rem;
}

.page-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
}

.page-rel {
  font-size: 0.9rem;
  color: var(--pink-deep);
  font-weight: 600;
}

.page-gender {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0.4rem 0;
}

.page-gender.girl { color: var(--pink-deep); }
.page-gender.boy  { color: var(--blue-deep); }

.page-comment {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.55;
  flex: 1;
  font-style: italic;
  border-left: 3px solid var(--pink);
  padding-left: 0.75rem;
  margin: 0.5rem 0;
}

.page-date {
  font-size: 0.8rem;
  color: var(--text-light);
  text-align: right;
  margin-top: auto;
}

.notebook-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.notebook-nav button {
  background: white;
  border: 2px solid var(--pink);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notebook-nav button:hover:not(:disabled) {
  background: var(--pink);
  transform: scale(1.08);
}

.notebook-nav button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-counter {
  font-weight: 700;
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ---------- DOĞRU TAHMİN EDENLER ---------- */
.correct-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  text-align: center;
}

.correct-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--pink-deep), var(--blue-deep));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.correct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.correct-card {
  background: white;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s;
  animation: confettiCard 0.6s ease backwards;
}

.correct-card:hover { transform: translateY(-4px); }

.correct-card .crown {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 1.5rem;
  animation: bounce 2s ease infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes confettiCard {
  from { opacity: 0; transform: scale(0.8) translateY(20px); }
}

/* ---------- ALERT / FLASH ---------- */
.alert {
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  margin-bottom: 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.alert-success { background: #d4edda; color: #155724; }
.alert-error   { background: #f8d7da; color: #721c24; }
.alert-info    { background: #d1ecf1; color: #0c5460; }
.alert-warning { background: #fff3cd; color: #856404; }

/* ---------- KAPALI SAYFA ---------- */
.closed-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}
.closed-page .box {
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--shadow);
  max-width: 400px;
}
.closed-page .emoji { font-size: 3rem; margin-bottom: 1rem; }

/* ---------- FOOTER ---------- */
.site-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
  background: rgba(255,255,255,0.5);
}

/* ---------- MOBİL ---------- */
@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .notebook { height: 500px; }
  .notebook-page { padding: 1.5rem 1.25rem 1.5rem 2rem; }
  .gender-options { grid-template-columns: 1fr; }
  .hero-glass { padding: 1.75rem 1.25rem; }
}

/* Floating decorations */
.float-deco {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
  font-size: 2rem;
  animation: floatY 12s ease-in-out infinite;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-30px); }
}
/* =====================================================
   TAHMİNLER – Orta çizgi + sol kız / sağ erkek
   ===================================================== */

.tree-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.tree-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.tree-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--pink-deep);
}

.tree-header p {
  color: var(--text-light);
  margin-top: 0.35rem;
}

.tree-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  font-weight: 700;
  font-size: 0.9rem;
}

.legend-girl { color: var(--pink-deep); }
.legend-boy  { color: var(--blue-deep); }

.tree-empty {
  text-align: center;
  max-width: 420px;
  margin: 0 auto;
}

.tree-empty-emoji {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.prediction-tree {
  position: relative;
  padding: 0.5rem 0 2rem;
}

/* Ortadaki dikey çizgi */
.tree-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  margin-left: -2px;
  background: linear-gradient(
    180deg,
    var(--pink-dark) 0%,
    #c9b8d4 50%,
    var(--blue-dark) 100%
  );
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(232, 160, 191, 0.35);
}

.tree-item {
  position: relative;
  width: 50%;
  padding: 0.75rem 0;
  display: flex;
  align-items: center;
}

.tree-item.tree-left {
  margin-right: auto;
  padding-right: 2rem;
  justify-content: flex-end;
}

.tree-item.tree-right {
  margin-left: auto;
  padding-left: 2rem;
  justify-content: flex-start;
}

/* Ortadan karta uzanan dal */
.tree-branch {
  position: absolute;
  top: 50%;
  height: 3px;
  width: 2rem;
  margin-top: -1.5px;
  border-radius: 2px;
}

.tree-left .tree-branch {
  right: 0;
  background: linear-gradient(90deg, var(--pink-dark), var(--pink-deep));
}

.tree-right .tree-branch {
  left: 0;
  background: linear-gradient(90deg, var(--blue-deep), var(--blue-dark));
}

/* Ortadaki düğüm noktası */
.tree-node {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 2;
}

.tree-left .tree-node {
  right: -7px;
  background: var(--pink-deep);
}

.tree-right .tree-node {
  left: -7px;
  background: var(--blue-deep);
}

.tree-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 1rem 1.15rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  max-width: 100%;
  width: 100%;
  text-align: left;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 2px solid transparent;
}

.tree-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
}

.tree-card-girl {
  border-color: rgba(232, 160, 191, 0.45);
}

.tree-card-boy {
  border-color: rgba(126, 200, 227, 0.45);
}

.tree-card-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.tree-card-rel {
  font-size: 0.85rem;
  color: var(--pink-deep);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.tree-card-boy .tree-card-rel {
  color: var(--blue-deep);
}

.tree-card-gender {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.tree-card-comment {
  font-size: 0.88rem;
  color: var(--text-light);
  font-style: italic;
  line-height: 1.45;
  margin-bottom: 0.5rem;
}

.tree-card-date {
  font-size: 0.75rem;
  color: #aaa;
  display: block;
}

/* Mobil: tek kolon, çizgi solda */
@media (max-width: 640px) {
  .tree-legend {
    flex-direction: column;
    gap: 0.4rem;
  }

  .prediction-tree {
    padding-left: 1.5rem;
  }

  .tree-line {
    left: 0.5rem;
    margin-left: 0;
  }

  .tree-item {
    width: 100%;
    padding-left: 1.5rem;
    padding-right: 0;
    justify-content: flex-start !important;
  }

  .tree-item.tree-left,
  .tree-item.tree-right {
    margin-left: 0;
    margin-right: 0;
    padding-left: 1.5rem;
    padding-right: 0;
  }

  .tree-left .tree-branch,
  .tree-right .tree-branch {
    left: 0;
    right: auto;
    width: 1.5rem;
    background: linear-gradient(90deg, #c9b8d4, var(--pink-dark));
  }

  .tree-left .tree-node,
  .tree-right .tree-node {
    left: -0.5rem;
    right: auto;
    margin-left: -7px;
  }

  .tree-left .tree-node {
    background: var(--pink-deep);
  }

  .tree-right .tree-node {
    background: var(--blue-deep);
  }
}

/* =====================================================
   Çoğunluk teması – kız → pembe, erkek → mavi
   ===================================================== */
body.majority-girl {
  --theme-accent: var(--pink-deep);
  --theme-soft: var(--pink);
  --theme-btn: linear-gradient(135deg, var(--pink-dark), var(--pink-deep));
}
body.majority-boy {
  --theme-accent: var(--blue-deep);
  --theme-soft: var(--blue);
  --theme-btn: linear-gradient(135deg, var(--blue-dark), var(--blue-deep));
}
body.majority-neutral {
  --theme-accent: var(--pink-deep);
  --theme-soft: var(--pink);
  --theme-btn: linear-gradient(135deg, var(--pink-dark), var(--pink-deep));
}

body.majority-girl .nav-brand { color: var(--pink-deep); }
body.majority-boy .nav-brand { color: var(--blue-deep); }

body.majority-girl .nav-links a:hover,
body.majority-girl .nav-links a.active {
  background: var(--pink);
  color: var(--pink-deep);
}
body.majority-boy .nav-links a:hover,
body.majority-boy .nav-links a.active {
  background: var(--blue);
  color: var(--blue-deep);
}

body.majority-girl .btn-primary {
  background: linear-gradient(135deg, var(--pink-dark), var(--pink-deep));
}
body.majority-boy .btn-primary {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-deep));
}
body.majority-boy .btn-primary:hover {
  box-shadow: 0 8px 25px rgba(91, 163, 192, 0.4);
}

body.majority-girl .card-title { color: var(--pink-deep); }
body.majority-boy .card-title { color: var(--blue-deep); }

body.majority-girl .tree-header h1 { color: var(--pink-deep); }
body.majority-boy .tree-header h1 { color: var(--blue-deep); }

body.majority-girl .hero-glass {
  border-color: rgba(248, 200, 220, 0.7);
}
body.majority-boy .hero-glass {
  border-color: rgba(168, 216, 234, 0.7);
}

/* =====================================================
   TAHMİNLER – Orta çizgi + sol kız / sağ erkek
   ===================================================== */
.tree-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.tree-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.tree-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--pink-deep);
}

.tree-header p {
  color: var(--text-light);
  margin-top: 0.35rem;
}

.tree-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  font-weight: 700;
  font-size: 0.9rem;
}

.legend-girl { color: var(--pink-deep); }
.legend-boy  { color: var(--blue-deep); }

.tree-empty { text-align: center; max-width: 420px; margin: 0 auto; }
.tree-empty-emoji { font-size: 3rem; margin-bottom: 0.75rem; }

.prediction-tree {
  position: relative;
  padding: 0.5rem 0 2rem;
}

.tree-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  margin-left: -2px;
  background: linear-gradient(180deg, var(--pink-dark) 0%, #c9b8d4 50%, var(--blue-dark) 100%);
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(232, 160, 191, 0.35);
}

.tree-item {
  position: relative;
  width: 50%;
  padding: 0.75rem 0;
  display: flex;
  align-items: center;
}

.tree-item.tree-left {
  margin-right: auto;
  padding-right: 2rem;
  justify-content: flex-end;
}

.tree-item.tree-right {
  margin-left: auto;
  padding-left: 2rem;
  justify-content: flex-start;
}

.tree-branch {
  position: absolute;
  top: 50%;
  height: 3px;
  width: 2rem;
  margin-top: -1.5px;
  border-radius: 2px;
}

.tree-left .tree-branch {
  right: 0;
  background: linear-gradient(90deg, var(--pink-dark), var(--pink-deep));
}

.tree-right .tree-branch {
  left: 0;
  background: linear-gradient(90deg, var(--blue-deep), var(--blue-dark));
}

.tree-node {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 2;
}

.tree-left .tree-node {
  right: -7px;
  background: var(--pink-deep);
}

.tree-right .tree-node {
  left: -7px;
  background: var(--blue-deep);
}

.tree-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 1rem 1.15rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  max-width: 100%;
  width: 100%;
  text-align: left;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 2px solid transparent;
}

.tree-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
}

.tree-card-girl { border-color: rgba(232, 160, 191, 0.45); }
.tree-card-boy  { border-color: rgba(126, 200, 227, 0.45); }

.tree-card-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.tree-card-rel {
  font-size: 0.85rem;
  color: var(--pink-deep);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.tree-card-boy .tree-card-rel { color: var(--blue-deep); }

.tree-card-gender {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.tree-card-comment {
  font-size: 0.88rem;
  color: var(--text-light);
  font-style: italic;
  line-height: 1.45;
  margin-bottom: 0.5rem;
}

.tree-card-date {
  font-size: 0.75rem;
  color: #aaa;
  display: block;
}

@media (max-width: 640px) {
  .tree-legend { flex-direction: column; gap: 0.4rem; }
  .prediction-tree { padding-left: 1.5rem; }
  .tree-line { left: 0.5rem; margin-left: 0; }
  .tree-item { width: 100%; padding-left: 1.5rem; padding-right: 0; justify-content: flex-start !important; }
  .tree-item.tree-left,
  .tree-item.tree-right {
    margin-left: 0;
    margin-right: 0;
    padding-left: 1.5rem;
    padding-right: 0;
  }
  .tree-left .tree-branch,
  .tree-right .tree-branch {
    left: 0;
    right: auto;
    width: 1.5rem;
    background: linear-gradient(90deg, #c9b8d4, var(--pink-dark));
  }
  .tree-left .tree-node,
  .tree-right .tree-node {
    left: calc(0.5rem - 7px);
    right: auto;
  }
}

/* Daha güçlü çoğunluk teması */
body.majority-girl {
  --pink: #F8C8DC;
  --pink-dark: #E8A0BF;
  --pink-deep: #D4849A;
  --accent: #D4849A;
  --accent-soft: #F8C8DC;
  background: #FFF5F8;
}
body.majority-boy {
  --pink: #A8D8EA;
  --pink-dark: #7EC8E3;
  --pink-deep: #5BA3C0;
  --accent: #5BA3C0;
  --accent-soft: #A8D8EA;
  background: #F0F9FC;
}
body.majority-boy .site-nav {
  border-bottom-color: rgba(168, 216, 234, 0.5);
}
body.majority-girl .site-nav {
  border-bottom-color: rgba(248, 200, 220, 0.5);
}
body.majority-boy .btn-secondary {
  border-color: var(--blue);
}
body.majority-boy .btn-secondary:hover {
  background: var(--blue);
  color: var(--blue-deep);
}
body.majority-girl .btn-secondary {
  border-color: var(--pink);
}
body.majority-girl .form-control:focus {
  border-color: var(--pink-dark);
  box-shadow: 0 0 0 3px rgba(248, 200, 220, 0.4);
}
body.majority-boy .form-control:focus {
  border-color: var(--blue-dark);
  box-shadow: 0 0 0 3px rgba(168, 216, 234, 0.4);
}
body.majority-girl .flip-title { color: var(--pink-deep); }
body.majority-boy .flip-title { color: var(--blue-deep); }
body.majority-girl .site-footer { background: rgba(248, 200, 220, 0.25); }
body.majority-boy .site-footer { background: rgba(168, 216, 234, 0.25); }
body.majority-girl .stat-card { border-top: 3px solid var(--pink-dark); }
body.majority-boy .stat-card { border-top: 3px solid var(--blue-dark); }
body.majority-girl .tree-line {
  background: linear-gradient(180deg, var(--pink-dark), var(--pink-deep));
}
body.majority-boy .tree-line {
  background: linear-gradient(180deg, var(--blue-dark), var(--blue-deep));
}

/* Sonuç açıklandığında güçlü tema */
body.theme-revealed.majority-girl .liquid-blue {
  opacity: 0.15;
}
body.theme-revealed.majority-boy .liquid-pink {
  opacity: 0.15;
}
body.theme-revealed.majority-girl {
  background: linear-gradient(180deg, #FFF5F8, #FCE4EC);
}
body.theme-revealed.majority-boy {
  background: linear-gradient(180deg, #F0F9FC, #E3F2FD);
}
body.theme-revealed .btn-primary {
  animation: pulseBtn 2s ease infinite;
}
@keyframes pulseBtn {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* Tahminler tek sayfa – net mobil/desktop */
.tree-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}
.tree-header { text-align: center; margin-bottom: 1.25rem; }
.tree-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--pink-deep);
}
body.majority-boy .tree-header h1 { color: var(--blue-deep); }
.tree-header p { color: var(--text-light); margin-top: 0.35rem; }
.tree-legend {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  font-weight: 700;
  font-size: 0.9rem;
  flex-wrap: wrap;
}
.legend-girl { color: var(--pink-deep); }
.legend-boy { color: var(--blue-deep); }
.prediction-tree { position: relative; padding: 0.5rem 0 2rem; }
.tree-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  margin-left: -2px;
  background: linear-gradient(180deg, var(--pink-dark), #c9b8d4, var(--blue-dark));
  border-radius: 4px;
}
.tree-item {
  position: relative;
  width: 50%;
  padding: 0.65rem 0;
  display: flex;
  align-items: center;
}
.tree-item.tree-left {
  margin-right: auto;
  padding-right: 1.75rem;
  justify-content: flex-end;
}
.tree-item.tree-right {
  margin-left: auto;
  padding-left: 1.75rem;
  justify-content: flex-start;
}
.tree-branch {
  position: absolute;
  top: 50%;
  height: 3px;
  width: 1.75rem;
  margin-top: -1.5px;
  border-radius: 2px;
}
.tree-left .tree-branch {
  right: 0;
  background: var(--pink-deep);
}
.tree-right .tree-branch {
  left: 0;
  background: var(--blue-deep);
}
.tree-node {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  z-index: 2;
}
.tree-left .tree-node { right: -6px; background: var(--pink-deep); }
.tree-right .tree-node { left: -6px; background: var(--blue-deep); }
.tree-card {
  background: rgba(255,255,255,0.95);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  width: 100%;
  border: 2px solid transparent;
  text-align: left;
}
.tree-card-girl { border-color: rgba(232,160,191,0.5); }
.tree-card-boy { border-color: rgba(126,200,227,0.5); }
.tree-card-name { font-family: var(--font-display); font-weight: 800; font-size: 1rem; }
.tree-card-rel { font-size: 0.82rem; font-weight: 600; color: var(--pink-deep); margin: 0.15rem 0 0.35rem; }
.tree-card-boy .tree-card-rel { color: var(--blue-deep); }
.tree-card-gender { font-weight: 700; font-size: 0.88rem; margin-bottom: 0.3rem; }
.tree-card-comment { font-size: 0.85rem; color: var(--text-light); font-style: italic; margin-bottom: 0.4rem; }
.tree-card-date { font-size: 0.72rem; color: #aaa; }

@media (max-width: 640px) {
  .prediction-tree { padding-left: 1.25rem; }
  .tree-line { left: 0.4rem; margin-left: 0; }
  .tree-item,
  .tree-item.tree-left,
  .tree-item.tree-right {
    width: 100%;
    margin: 0;
    padding: 0.5rem 0 0.5rem 1.35rem;
    justify-content: flex-start !important;
  }
  .tree-left .tree-branch,
  .tree-right .tree-branch {
    left: 0;
    right: auto;
    width: 1.35rem;
  }
  .tree-left .tree-node,
  .tree-right .tree-node {
    left: calc(0.4rem - 6px);
    right: auto;
  }
}

/* ===== Tahminler – mobil kart listesi (güvenilir) ===== */
@media (max-width: 640px) {
  .tree-section { padding: 1.25rem 0.85rem 3rem; }
  .tree-legend { gap: 0.75rem; font-size: 0.85rem; }
  .prediction-tree {
    padding-left: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  .tree-line,
  .tree-branch,
  .tree-node { display: none !important; }

  .tree-item,
  .tree-item.tree-left,
  .tree-item.tree-right {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    justify-content: stretch !important;
  }

  .tree-card {
    width: 100%;
    border-width: 0;
    border-left-width: 5px;
    border-left-style: solid;
    border-radius: 14px;
  }
  .tree-card-girl {
    border-color: transparent;
    border-left-color: #E8A0BF;
    background: #fff5f8;
  }
  .tree-card-boy {
    border-color: transparent;
    border-left-color: #7EC8E3;
    background: #f0f9fc;
  }
}
