/* ── HEADER ── */
header {
  background: linear-gradient(180deg, #0d0a04 0%, #1e1508 100%);
  border-bottom: 2px solid var(--gold);
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

body.light-mode header {
  background: linear-gradient(180deg, #1a1200 0%, #2e2000 100%);
}

.logo-img-wrap { display: flex; align-items: center; }
.logo-img {
  height: 144px;
  width: auto;
  display: block;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.4));
  cursor: pointer;
  transition: opacity 0.2s;
}
.logo-img:hover { opacity: 0.85; }
body.light-mode .logo-img {
  filter: brightness(0.88) drop-shadow(0 1px 3px rgba(0,0,0,0.15));
}

.logo {
  font-family: Arial, sans-serif;
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.12em;
  text-shadow: 0 0 18px rgba(212,160,23,0.4);
  white-space: nowrap;
}
.logo span { color: #fff; font-weight: 400; }
.logo-tm {
  font-size: 0.75em;
  font-weight: 400;
  color: rgba(212,160,23,0.55);
  letter-spacing: 0;
  vertical-align: super;
  margin-left: 1px;
}

/* icon-only theme toggle */
.btn-icon {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(200,169,110,0.35);
  background: rgba(184,134,11,0.08);
  color: var(--gold-light);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-icon:hover { background: rgba(184,134,11,0.22); border-color: var(--gold-light); color: #fff; }

.header-controls {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}

/* ── BUTTONS ── */
.btn {
  font-family: Arial, sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  padding: 7px 13px;
  border: none;
  background: rgba(184,134,11,0.18);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 8px;
  white-space: nowrap;
}
.btn:hover { background: rgba(184,134,11,0.38); }
.btn.active { background: var(--gold); color: var(--ink); }

.btn-book-overview {
  font-family: Arial, sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border: none;
  background: rgba(184,134,11,0.15);
  color: rgba(212,160,23,0.85);
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
  white-space: nowrap;
  vertical-align: middle;
  position: relative;
  top: -2px;
}
.btn-book-overview:hover { background: rgba(184,134,11,0.3); color: var(--gold-light); }
body.light-mode .btn-book-overview { border-color: rgba(180,130,20,0.4); color: rgba(154,110,0,0.85); background: rgba(200,146,10,0.1); }
body.light-mode .btn-book-overview:hover { background: rgba(200,146,10,0.2); color: #9a6e00; }

/* ── BOOKMARK BUTTON ── */
.passage-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-bookmark {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--gold);
  opacity: 0.6;
  transition: all 0.2s;
  padding: 2px 6px;
  line-height: 1;
}
.btn-bookmark:hover { opacity: 1; transform: scale(1.15); }
.btn-bookmark.bookmarked { opacity: 1; }

/* ── VOICE GENDER TOGGLE ── */
.btn-voice-gender {
  font-family: Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(200,169,110,0.35);
  background: rgba(184,134,11,0.1);
  color: var(--gold-light);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.btn-voice-gender:hover { background: rgba(184,134,11,0.25); }
.btn-voice-gender.female { background: rgba(180,80,140,0.15); border-color: rgba(200,120,180,0.4); color: #d080b0; }
.btn-voice-gender.female:hover { background: rgba(180,80,140,0.28); }

/* ── FONT SIZE CONTROL ── */
.font-size-ctrl {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.font-size-btn {
  font-family: Arial, sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border: none;
  border-radius: 6px;
  background: rgba(184,134,11,0.15);
  color: var(--gold);
  cursor: pointer;
  transition: background 0.2s;
  font-weight: 600;
}
.font-size-btn:hover { background: rgba(184,134,11,0.3); }

/* ── USER BUTTON ── */
.btn-user {
  font-family: Arial, sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(200,169,110,0.4);
  background: rgba(184,134,11,0.1);
  color: var(--gold-light);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-user:hover { background: rgba(184,134,11,0.25); }
.btn-user.signed-in { border-color: var(--gold); color: var(--gold); }

/* ── SPEAKER ICON BUTTON ── */
.btn-read-aloud {
  background: none;
  border: none;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--gold);
  opacity: 0.55;
  padding: 3px 6px;
  border-radius: 6px;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-read-aloud:hover { opacity: 1; background: rgba(184,134,11,0.12); }
.btn-read-aloud.playing { opacity: 1; color: var(--gold-light); animation: pulse 1.5s infinite; }

/* ── STREAMING CURSOR ── */
.stream-cursor {
  display: inline-block;
  color: var(--gold);
  animation: blink 0.7s step-end infinite;
  font-weight: 300;
  margin-left: 2px;
}
