/* Flip Book – tek sayfa, temiz */

.flip-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.25rem 0.75rem 3rem;
  text-align: center;
}

.flip-title {
  font-family: var(--font-display, 'Nunito', sans-serif);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--pink-deep, #D4849A);
  margin-bottom: 0.3rem;
}

body.majority-boy .flip-title { color: var(--blue-deep, #5BA3C0); }

.flip-sub {
  color: var(--text-light, #7A6F65);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  padding: 0 0.5rem;
}

/* Kitap çerçevesi */
#flipBook {
  position: relative;
  width: min(480px, 92vw);
  height: min(640px, 72vh);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.14);
  background: #fff9f5;
}

/* Tüm sayfalar üst üste; sadece aktif görünür */
#flipBook .fb-page {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  box-sizing: border-box;
  overflow: hidden;
}

#flipBook .fb-page.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

/* Kapak */
.fb-page.--cover-front,
.fb-page.--cover-back {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  color: #fff;
}

.fb-page.--cover-front {
  background: linear-gradient(145deg, #F8C8DC 0%, #E8A0BF 45%, #D4849A 100%);
}
.fb-page.--cover-back {
  background: linear-gradient(145deg, #A8D8EA 0%, #7EC8E3 45%, #5BA3C0 100%);
}

body.majority-girl .fb-page.--cover-front,
body.majority-girl .fb-page.--cover-back {
  background: linear-gradient(145deg, #F8C8DC 0%, #E8A0BF 45%, #D4849A 100%) !important;
}
body.majority-boy .fb-page.--cover-front,
body.majority-boy .fb-page.--cover-back {
  background: linear-gradient(145deg, #A8D8EA 0%, #7EC8E3 45%, #5BA3C0 100%) !important;
}

.cover-emoji { font-size: 3rem; margin-bottom: 0.85rem; }
.fb-page.--cover-front h2,
.fb-page.--cover-back h2 {
  font-family: var(--font-display, 'Nunito', sans-serif);
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  font-weight: 800;
  margin-bottom: 0.4rem;
}
.fb-page.--cover-front p,
.fb-page.--cover-back p {
  font-size: 0.95rem;
  opacity: 0.92;
  max-width: 90%;
  line-height: 1.45;
}
.cover-family {
  margin-top: 1.25rem;
  font-size: 0.88rem;
  opacity: 0.9;
  border-top: 1px solid rgba(255,255,255,0.35);
  padding-top: 0.85rem;
  line-height: 1.55;
}

/* İthaf */
.fb-dedication {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(180deg, #FFF9F5, #FFF5EE);
  box-sizing: border-box;
}
body.majority-boy .fb-dedication {
  background: linear-gradient(180deg, #F0F9FC, #E3F2FD);
}
.ded-label { color: #7A6F65; margin-bottom: 0.4rem; }
.ded-baby {
  font-family: var(--font-display, 'Nunito', sans-serif);
  font-size: 1.45rem;
  font-weight: 800;
  color: #D4849A;
  margin-bottom: 0.3rem;
}
body.majority-boy .ded-baby { color: #5BA3C0; }
.ded-for { color: #7A6F65; margin-bottom: 1.25rem; }
.ded-parents {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  font-size: 1.05rem;
  margin-bottom: 1rem;
}
.ded-note {
  font-style: italic;
  color: #7A6F65;
  max-width: 90%;
  line-height: 1.5;
  font-size: 0.92rem;
}
.ded-year { margin-top: 1rem; color: #bbb; font-size: 0.85rem; }

/* İçerik sayfası */
.fb-inner {
  height: 100%;
  padding: 1.5rem 1.25rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  background:
    linear-gradient(90deg, rgba(232,160,191,0.08) 0, rgba(232,160,191,0.08) 14px, transparent 14px),
    #FFFDF9;
  position: relative;
  text-align: left;
}
.fb-inner::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(to bottom, transparent, #E8A0BF, transparent);
  opacity: 0.5;
}
.fb-decor {
  position: absolute;
  font-size: 1.2rem;
  opacity: 0.3;
  pointer-events: none;
}
.fb-decor.tr { top: 10px; right: 12px; }
.fb-decor.bl { bottom: 10px; left: 26px; }
.fb-greeting {
  font-style: italic;
  color: #7A6F65;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}
.fb-name {
  font-family: var(--font-display, 'Nunito', sans-serif);
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 0.15rem;
}
.fb-rel {
  font-size: 0.9rem;
  color: #D4849A;
  font-weight: 600;
  margin-bottom: 0.55rem;
}
body.majority-boy .fb-rel { color: #5BA3C0; }
.fb-gender { font-weight: 700; font-size: 1.05rem; margin: 0.3rem 0 0.55rem; }
.fb-gender.girl { color: #D4849A; }
.fb-gender.boy { color: #5BA3C0; }
.fb-comment {
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.55;
  font-style: italic;
  border-left: 3px solid #F8C8DC;
  padding-left: 0.7rem;
  margin: 0.35rem 0;
  overflow: auto;
}
.fb-date {
  font-size: 0.78rem;
  color: #999;
  text-align: right;
  margin-top: auto;
}
.fb-page-num {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: #ccc;
}

.flip-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.1rem;
  margin-top: 1.35rem;
}
.flip-controls button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #F8C8DC;
  background: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.majority-boy .flip-controls button { border-color: #A8D8EA; }
.flip-controls button:hover:not(:disabled) {
  background: #F8C8DC;
  transform: scale(1.05);
}
body.majority-boy .flip-controls button:hover:not(:disabled) { background: #A8D8EA; }
.flip-controls button:disabled { opacity: 0.35; cursor: not-allowed; }
.flip-counter {
  font-weight: 700;
  color: #7A6F65;
  min-width: 70px;
}

.flip-empty {
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  max-width: 380px;
  margin: 1.5rem auto;
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
}

@media (max-width: 480px) {
  #flipBook {
    width: min(300px, 92vw);
    height: min(430px, 65vh);
  }
  .fb-inner { padding: 1.15rem 1rem 1.15rem 1.4rem; }
  .fb-name { font-size: 1.05rem; }
  .cover-emoji { font-size: 2.4rem; }
}
