@font-face { font-family: 'Inter'; font-weight: 400; src: url(fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; src: url(fonts/inter-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; src: url(fonts/inter-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 800; src: url(fonts/inter-latin-800-normal.woff2) format('woff2'); }

:root {
  --bg: #FAFAF8;
  --beige: #F4F0E8;
  --card: #FFFFFF;
  --text: #181818;
  --muted: #6F6A5F;
  --faint: #B8B3A6;
  --gold: #B39A61;
  --gold-soft: #F3ECDB;
  --border: #E7E3DA;
  --shadow: 0 2px 4px rgba(24, 24, 24, .04), 0 12px 32px rgba(24, 24, 24, .06);
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--bg); cursor: none; }
body { font-family: Inter, 'Segoe UI', Roboto, Arial, sans-serif; color: var(--text); font-variant-numeric: tabular-nums; }

/* feste 1920x1080-Bühne, wird auf die Bildschirmgrösse skaliert */
#stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; background: var(--bg); overflow: hidden; }

/* Kopfzeile */
header { height: 108px; padding: 0 48px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
header .logo { height: 62px; display: block; }
header .datum { text-align: center; }
header .datum .greg { font-size: 34px; font-weight: 600; letter-spacing: -.01em; }
header .datum .hijri { font-size: 24px; color: var(--gold); font-weight: 600; margin-top: 2px; }
header .uhr { text-align: right; font-size: 84px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
header .uhr small { font-size: 36px; font-weight: 600; color: var(--faint); margin-left: 6px; letter-spacing: 0; }

main { position: absolute; top: 108px; left: 48px; right: 48px; bottom: 36px; display: grid; gap: 24px; }
main.alles { grid-template-columns: 820px 496px 460px; }
main.gebet { grid-template-columns: 1fr; }
main.flyer { grid-template-columns: 1fr; }
main.beitraege { grid-template-columns: 1fr; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; position: relative; overflow: hidden; min-height: 0; }
.card h2 { font-size: 30px; font-weight: 700; letter-spacing: -.01em; }
.card .kopf { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.chip { font-size: 20px; font-weight: 600; color: var(--gold); background: var(--gold-soft); border-radius: 999px; padding: 4px 14px; }

/* Beiträge */
#beitraege { display: flex; flex-direction: column; }
.tabelle { flex: 1; display: flex; flex-direction: column; min-height: 0; transition: opacity .5s ease; }
.tabelle.aus { opacity: 0; }
.zeile { display: grid; grid-template-columns: 256px repeat(12, minmax(0, 1fr)); align-items: center; padding: 0 8px; border-radius: 10px; }
.zeile.kopfzeile { height: 40px; color: var(--muted); font-size: 19px; font-weight: 700; flex: none; border-bottom: 2px solid var(--border); border-radius: 0; margin-bottom: 6px; }
.zeile.daten { flex: 1; max-height: 60px; font-size: 20px; }
.zeile.daten:nth-child(odd) { background: #FAF8F3; }
.zeile .n { font-size: 21px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 8px; }
.zeile .c { text-align: center; font-weight: 600; letter-spacing: -.02em; }
.zeile .c.k { font-size: 15px; letter-spacing: -.04em; }
.zeile .c.leer { color: var(--faint); font-weight: 400; }
.zeile .c.jetzt { color: var(--gold); }
.zeile.kopfzeile .c.jetzt { color: var(--gold); }
.seite { flex: none; display: flex; justify-content: space-between; align-items: center; margin-top: 12px; color: var(--muted); font-size: 20px; font-weight: 600; }
.punkte { display: flex; gap: 8px; }
.punkte i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); display: block; transition: background .4s, transform .4s; }
.punkte i.an { background: var(--gold); transform: scale(1.25); }

/* Flyer */
#flyer { padding: 0; background: var(--beige); display: flex; flex-direction: column; }
.buehne { position: relative; flex: 1; min-height: 0; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.slide.an { opacity: 1; }
.slide .bg { position: absolute; inset: -30px; background-size: cover; background-position: center; filter: blur(34px) saturate(.8); opacity: .35; }
.slide .fg { position: absolute; inset: 20px; width: calc(100% - 40px); height: calc(100% - 40px); object-fit: contain; filter: drop-shadow(0 10px 26px rgba(24,24,24,.18)); }
.flyerfuss { flex: none; background: var(--card); border-top: 1px solid var(--border); padding: 16px 24px; min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.flyerfuss .t { font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
.flyerfuss .d { font-size: 22px; color: var(--muted); margin-top: 4px; font-weight: 600; }
.leer-buehne { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 26px; font-weight: 600; text-align: center; padding: 40px; }

/* Rechte Spalte */
.rechts { display: flex; flex-direction: column; gap: 20px; min-height: 0; }
#gebete { padding: 20px 24px 18px; }
#gebete .kopf { margin-bottom: 8px; }
#gebete h2 { font-size: 28px; }
.gz { display: grid; grid-template-columns: minmax(0, 1fr) 104px 118px; align-items: center; }
.gz.hd { color: var(--muted); font-size: 18px; font-weight: 700; height: 28px; text-transform: uppercase; letter-spacing: .06em; }
.gz.hd span:not(:first-child) { text-align: right; }
.gz.r { height: 54px; padding: 0 12px; margin: 2px -12px; border-radius: 12px; font-size: 28px; font-weight: 600; border: 2px solid transparent; transition: background .4s; }
.gz.r .nm { font-size: 23px; }
.gz.r .a { text-align: right; font-size: 34px; font-weight: 700; letter-spacing: -.02em; }
.gz.r .q { text-align: right; font-size: 34px; color: var(--muted); font-weight: 700; letter-spacing: -.02em; }
.gz.r.sr .nm, .gz.r.sr .a, .gz.r.sr .q { color: var(--muted); font-weight: 600; }
.gz.r.naechste { background: var(--gold-soft); border-color: var(--gold); }
.gz.r.naechste .q { color: var(--text); }
.gz.r.vorbei .nm, .gz.r.vorbei .a { color: var(--faint); }
.gz.r.vorbei .q { color: var(--faint); }
.badge { display: inline-block; font-size: 16px; font-weight: 700; color: #8A6D2B; background: #F8EBC8; border-radius: 6px; padding: 2px 8px; margin-top: 6px; }

#naechstes { padding: 16px 24px 18px; }
#naechstes .lbl { font-size: 18px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
#naechstes .nm { font-size: 32px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
#naechstes .cd { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; color: var(--text); }
.balken { height: 8px; border-radius: 99px; background: var(--beige); margin-top: 12px; overflow: hidden; }
.balken i { display: block; height: 100%; background: var(--gold); border-radius: 99px; transition: width 1s linear; }

#hinweise { flex: 1; padding: 20px 24px; min-height: 0; }
#hinweise h2 { font-size: 24px; margin-bottom: 10px; }
.eintrag { padding: 8px 0; border-top: 1px solid var(--border); }
.eintrag:first-of-type { border-top: 0; }
.eintrag .t { font-size: 24px; font-weight: 700; }
.eintrag .s { font-size: 20px; color: var(--muted); margin-top: 2px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.eintrag.wichtig .t::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); margin-right: 10px; vertical-align: middle; }

/* Gebet-only Layout: grosse Darstellung */
main.gebet .rechts { flex-direction: row; gap: 24px; }
main.gebet #gebete { flex: 1; }
main.gebet .gz.r { height: 100px; font-size: 40px; }
main.gebet .gz.r .nm { font-size: 40px; } main.gebet .gz.r .a { font-size: 58px; } main.gebet .gz.r .q { font-size: 40px; }
main.gebet .gz { grid-template-columns: 1fr 200px 200px; }
main.gebet .gz.hd { font-size: 24px; height: 40px; }
main.gebet #naechstes { width: 640px; flex: none; display: flex; flex-direction: column; justify-content: center; }
main.gebet #naechstes .nm { font-size: 56px; } main.gebet #naechstes .cd { font-size: 76px; }
main.gebet #hinweise { display: none; }

/* Status */
#status { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); padding: 4px 18px; border-radius: 99px; font-size: 18px; font-weight: 700; display: none; z-index: 5; }
#status.offline { display: block; background: #FDECEA; color: #A3261B; border: 1px solid #F3C4BF; }
#hinweisLeiste { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); font-size: 16px; color: var(--faint); font-weight: 600; }

/* ohne Iqama-Spalte */
.gz.ohne-iq { grid-template-columns: minmax(0, 1fr) 150px; }
main.gebet .gz.ohne-iq { grid-template-columns: 1fr 300px; }
