/* Shared slide styles — drawn on a 1920×1080 stage, scaled to fit. */
:root {
  --stage-bg: #0a0d1a;
  --stage-bg-2: #1a1430;
  --gold: #f2c46d;
  --text: #ffffff;
  --soft: #d9dcea;
  --mint: #bfe6cf;
  --muted: #8f93a8;
}

.stage-wrap {
  position: relative;
  overflow: hidden;
  background: #000;
}

.stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1920px;
  height: 1080px;
  transform-origin: center center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 0%, var(--stage-bg-2) 0%, var(--stage-bg) 70%);
  color: var(--text);
  font-family: 'Noto Sans', 'Segoe UI', system-ui, sans-serif;
}

.stage .layer {
  position: absolute;
  inset: 0;
}

/* script-specific fonts */
.sc-dev { font-family: 'Noto Serif Devanagari', 'Noto Sans Devanagari', 'Nirmala UI', serif; }
.sc-bn { font-family: 'Noto Serif Bengali', 'Noto Sans Bengali', 'Nirmala UI', serif; }
.sc-ta { font-family: 'Noto Sans Tamil', 'Nirmala UI', sans-serif; }
.sc-latin { font-family: 'Noto Serif', Georgia, serif; }

/* ── text slides ── */
.tslide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 40px 80px 50px;
}
.thead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: 'Noto Sans', system-ui, sans-serif;
  font-size: 34px;
  letter-spacing: 0.04em;
  color: var(--gold);
  opacity: 0.85;
  min-height: 48px;
  border-bottom: 2px solid rgba(242, 196, 109, 0.25);
  padding-bottom: 10px;
}
.tcount { font-variant-numeric: tabular-nums; opacity: 0.8; }
.tbox {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 20px;
}
.tinner {
  width: 100%;
  text-align: center;
  line-height: 1.35;
  font-size: 60px;
}
.tinner > div { white-space: pre-line; margin: 0 0 0.45em; }
.tinner > div:last-child { margin-bottom: 0; }
.tinner .ref { color: var(--gold); font-family: 'Noto Sans', sans-serif; font-weight: 600; font-size: 0.75em; letter-spacing: 0.06em; }
.tinner .orig { font-size: 1.12em; color: var(--text); font-weight: 500; }
.tinner .translit { font-size: 1em; color: var(--gold); font-style: italic; }
.tinner .syn { font-size: 0.55em; color: var(--muted); text-align: justify; text-align-last: center; line-height: 1.5; }
.tinner .eng { font-size: 0.72em; color: var(--soft); font-family: 'Noto Sans', sans-serif; }
.tinner .tam { font-size: 0.78em; color: var(--mint); }
.tinner .muted { color: var(--muted); }
.t-verse .tinner .orig { font-size: 1em; }
.t-verse .tinner .translit { font-size: 0.9em; }

/* ── image slides ── */
.islide { position: absolute; inset: 0; background: #000; }
.islide .ibg {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(40px) brightness(0.45);
}
.islide .ifg { position: absolute; inset: 0; width: 100%; height: 100%; }
.islide .icap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px 80px 40px;
  font-size: 48px;
  text-align: center;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}
.placeholder, .pslide .pbadge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  font-size: 56px;
  color: var(--soft);
  padding: 80px;
}
.pslide { position: absolute; inset: 0; background: #000; }
.pslide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.pslide .pbadge small { font-size: 0.5em; color: var(--muted); margin-top: 20px; word-break: break-all; }

.blankslide { position: absolute; inset: 0; background: #000; }

/* ── media layers on the display ── */
.vslide, .wslide { position: absolute; inset: 0; background: #000; }
.vslide iframe, .vslide video, .vslide > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.wslide iframe { position: absolute; left: 0; top: 0; border: 0; background: #fff; transform-origin: 0 0; }

/* ── welcome ── */
.welcome {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}
.welcome .wsite { font-size: 84px; color: var(--gold); font-family: 'Noto Serif', serif; }
.welcome .wclock { font-size: 220px; font-weight: 200; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.welcome .wdate { font-size: 52px; color: var(--soft); }
.welcome .wscreen { margin-top: 60px; font-size: 32px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }

/* ── donor ticker ── */
.ticker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 96px;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, #5a1d12, #7a2b14 40%, #5a1d12);
  border-top: 3px solid var(--gold);
  font-size: 44px;
  overflow: hidden;
  z-index: 5;
}
.ticker .tlabel {
  flex: none;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 36px;
  background: var(--gold);
  color: #3a1206;
  font-weight: 700;
  font-size: 38px;
  letter-spacing: 0.03em;
  z-index: 1;
}
.ticker .twindow { flex: 1; overflow: hidden; white-space: nowrap; height: 100%; display: flex; align-items: center; }
.ticker .ttrack {
  display: inline-block;
  padding-left: 100%;
  white-space: nowrap;
  animation: ticker-move linear infinite;
  will-change: transform;
}
.ticker .ttrack .dn { color: #fff; font-weight: 600; }
.ticker .ttrack .dnote { color: #ffd9a0; font-size: 0.8em; margin-left: 12px; }
.ticker .ttrack .sep { color: var(--gold); margin: 0 40px; }
@keyframes ticker-move {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* fade-in for slide changes */
.fade-in { animation: fade-in 0.45s ease both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
