/* ==========================================================================
   LeFlare Fotowall – Corporate Design
   Farben und Schriften aus leflare.at uebernommen.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&family=Zalando+Sans+Expanded:wght@700;900&display=swap');

:root {
  --lf-black:     #000000;
  --lf-bg:        #333333;
  --lf-bg-deep:   #1c1c1c;
  --lf-line:      #4a4a4a;
  --lf-text:      #d9d9d9;
  --lf-text-dim:  #9a9a9a;
  --lf-white:     #ffffff;
  --lf-accent:    #fedf41;
  --lf-on-accent: #333333;
  --lf-danger:    #ff6b5e;

  --lf-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --lf-display: 'Zalando Sans Expanded', 'Zalando Sans', ui-sans-serif, system-ui,
                'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--lf-bg);
  color: var(--lf-text);
  font-family: var(--lf-mono);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--lf-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.lf-h1, .lf-h2 {
  font-family: var(--lf-display);
  font-weight: 900;
  color: var(--lf-white);
  letter-spacing: -0.01em;
  line-height: 1.02;
  margin: 0 0 .6rem;
  text-wrap: balance;
}
.lf-h1 { font-size: clamp(2rem, 8vw, 3rem); }
.lf-h2 { font-size: clamp(1.2rem, 5vw, 1.6rem); }

.lf-lead { color: var(--lf-text); margin: 0 0 1.6rem; }
.lf-kicker {
  color: var(--lf-accent);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 .5rem;
}

/* --- Buttons: kantig, gelb, Mono ---------------------------------------- */
.lf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  width: 100%;
  min-height: 62px;
  padding: 1rem 1.4rem;
  border: 0;
  border-radius: 0;
  background: var(--lf-accent);
  color: var(--lf-on-accent);
  font-family: var(--lf-mono);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: filter .15s ease, transform .05s ease;
  -webkit-tap-highlight-color: transparent;
}
.lf-btn:hover { filter: brightness(1.08); text-decoration: none; }
.lf-btn:active { transform: translateY(1px); }
.lf-btn:disabled { opacity: .45; cursor: default; }

.lf-btn--ghost {
  background: transparent;
  color: var(--lf-text);
  border: 1px solid var(--lf-line);
  font-weight: 400;
  min-height: 52px;
}
.lf-btn--ghost:hover { border-color: var(--lf-accent); color: var(--lf-accent); filter: none; }

.lf-btn--danger { background: transparent; border: 1px solid var(--lf-danger); color: var(--lf-danger); }

/* --- Einfache Seiten (Upload, Admin, Setup) ----------------------------- */
.lf-plain { min-height: 100dvh; display: flex; flex-direction: column; }

.lf-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--lf-line);
}
.lf-topbar img { height: 30px; width: auto; display: block; }
.lf-topbar__title {
  font-family: var(--lf-display);
  font-weight: 900;
  color: var(--lf-white);
  font-size: .95rem;
  letter-spacing: .02em;
}

.lf-sheet {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  flex: 1;
}
.lf-sheet--wide { max-width: 1100px; }

.lf-note {
  border-left: 3px solid var(--lf-accent);
  padding: .7rem 0 .7rem .9rem;
  margin: 1.4rem 0;
  color: var(--lf-text);
  font-size: .9rem;
}
.lf-note--err  { border-color: var(--lf-danger); color: var(--lf-danger); }
.lf-note--warn { border-color: var(--lf-accent); }

.lf-foot {
  padding: 1.5rem 1.25rem 2rem;
  color: var(--lf-text-dim);
  font-size: .78rem;
  text-align: center;
}

code {
  font-family: var(--lf-mono);
  background: var(--lf-bg-deep);
  padding: .15em .4em;
  color: var(--lf-accent);
}

/* --- Setup-Checkliste ---------------------------------------------------- */
.lf-checks { list-style: none; margin: 0 0 1rem; padding: 0; }
.lf-check {
  display: flex; gap: .9rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--lf-line);
  font-size: .88rem;
}
.lf-check__mark { font-weight: 700; color: var(--lf-accent); flex: 0 0 2rem; }
.lf-check--err .lf-check__mark { color: var(--lf-danger); }
.lf-check__body { display: flex; flex-direction: column; gap: .15rem; }
.lf-check__body strong { color: var(--lf-white); font-weight: 600; }
.lf-check__body span { color: var(--lf-text-dim); word-break: break-word; }

.lf-links { list-style: none; padding: 0; margin: 0; font-size: .85rem; }
.lf-links li { padding: .6rem 0; border-bottom: 1px solid var(--lf-line); }
.lf-links span { display: block; color: var(--lf-text-dim); font-size: .75rem;
                 text-transform: uppercase; letter-spacing: .06em; }
.lf-links a { word-break: break-all; }

/* ==========================================================================
   UPLOAD (Handy)
   ========================================================================== */
.lf-shot {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--lf-bg-deep);
  border: 1px solid var(--lf-line);
  overflow: hidden;
  margin-bottom: 1.2rem;
  display: flex; align-items: center; justify-content: center;
}
.lf-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lf-shot__hint { color: var(--lf-text-dim); font-size: .85rem; padding: 2rem; text-align: center; }

.lf-actions { display: flex; flex-direction: column; gap: .7rem; }

.lf-bar {
  height: 3px;
  background: var(--lf-line);
  margin-top: 1rem;
  overflow: hidden;
}
.lf-bar__fill { height: 100%; width: 0; background: var(--lf-accent); transition: width .2s ease; }

.lf-done { text-align: center; padding: 2.5rem 0; }
.lf-done__mark {
  font-family: var(--lf-display);
  font-weight: 900;
  font-size: 3.4rem;
  color: var(--lf-accent);
  line-height: 1;
  margin-bottom: 1rem;
}

.lf-hidden { display: none !important; }

/* ==========================================================================
   WALL (Beamer / TV)
   ========================================================================== */
.lf-wall {
  margin: 0;
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  background: var(--lf-black);
  cursor: none;
}

.lf-grid {
  display: grid;
  gap: 6px;
  padding: 6px;
  width: 100%;
  height: 100%;
  background: var(--lf-black);
}

.lf-tile {
  position: relative;
  overflow: hidden;
  background: var(--lf-bg-deep);
}
.lf-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity .9s ease, transform 1.6s ease;
  will-change: opacity, transform;
}
.lf-tile img.is-on { opacity: 1; transform: scale(1); }

/* Frisch hochgeladenes Foto bekommt einen gelben Rahmen, der ausblendet */
.lf-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 0 solid var(--lf-accent);
  pointer-events: none;
  transition: border-width .35s ease, opacity 1.2s ease .8s;
  opacity: 0;
}
.lf-tile.is-fresh::after { border-width: 5px; opacity: 1; }

/* Feste QR-Kachel unten rechts – wechselt nie */
.lf-tile--qr {
  background: var(--lf-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4%;
}
.lf-qrtile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .7em;
  width: 100%;
  height: 100%;
  container-type: inline-size;
}
.lf-qrtile__code {
  background: var(--lf-white);
  padding: 4%;
  line-height: 0;
  flex: 0 1 auto;
  min-height: 0;
  aspect-ratio: 1;
  max-height: 74%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lf-qrtile__code svg { width: 100%; height: 100%; display: block; }
.lf-qrtile__code svg rect[fill="#000000"],
.lf-qrtile__code svg path { fill: var(--lf-on-accent); }

.lf-qrtile__code--text {
  aspect-ratio: auto;
  max-height: none;
  padding: 8%;
  font-size: clamp(9px, 1.4cqw, 14px);
  line-height: 1.3;
  color: var(--lf-on-accent);
  word-break: break-all;
  text-align: center;
}

.lf-qrtile__label {
  font-family: var(--lf-mono);
  font-weight: 700;
  color: var(--lf-on-accent);
  text-transform: uppercase;
  letter-spacing: .06em;
  text-align: center;
  line-height: 1.25;
  font-size: clamp(9px, 5.5cqw, 20px);
  flex: 0 0 auto;
}

/* Leerer Zustand + Overlay */
.lf-empty {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  text-align: center;
  background: var(--lf-bg);
  padding: 2rem;
  z-index: 5;
  transition: opacity .6s ease;
}
.lf-empty img { height: 120px; }
.lf-empty h1 {
  font-family: var(--lf-display); font-weight: 900; color: var(--lf-white);
  font-size: clamp(1.8rem, 5vw, 3.4rem); margin: 0;
}
.lf-empty p { color: var(--lf-text); margin: 0; }
.lf-empty .lf-url { color: var(--lf-accent); font-weight: 600; word-break: break-all; }

.lf-badge {
  position: fixed;
  left: 22px; bottom: 18px;
  display: flex; align-items: center; gap: .8rem;
  padding: .55rem .9rem;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  z-index: 4;
  font-size: .75rem;
  letter-spacing: .06em;
  color: var(--lf-text-dim);
  text-transform: uppercase;
  transition: opacity .4s ease;
}
.lf-badge img { height: 20px; }
.lf-badge b { color: var(--lf-accent); font-weight: 700; }

/* oben rechts, damit der Knopf der QR-Kachel unten rechts nicht im Weg steht */
.lf-fs {
  position: fixed; right: 18px; top: 18px; z-index: 6;
  background: rgba(0,0,0,.55); color: var(--lf-text);
  border: 1px solid var(--lf-line); padding: .5rem .8rem;
  font-family: var(--lf-mono); font-size: .72rem; cursor: pointer;
  text-transform: uppercase; letter-spacing: .06em;
  opacity: 0; transition: opacity .3s ease;
}
.lf-wall:hover .lf-fs { opacity: 1; }

/* ==========================================================================
   ADMIN
   ========================================================================== */
.lf-adminGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 1.4rem;
}
.lf-card { position: relative; background: var(--lf-bg-deep); border: 1px solid var(--lf-line); }
.lf-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.lf-card__meta {
  display: flex; align-items: center; justify-content: space-between;
  padding: .4rem .5rem; font-size: .68rem; color: var(--lf-text-dim);
}
.lf-card__del {
  background: none; border: 0; color: var(--lf-danger);
  font-family: var(--lf-mono); font-size: .68rem; cursor: pointer; padding: 0;
  text-transform: uppercase; letter-spacing: .05em;
}
.lf-card.is-gone { opacity: .25; }

.lf-field {
  width: 100%; padding: .9rem 1rem; margin-bottom: .8rem;
  background: var(--lf-bg-deep); border: 1px solid var(--lf-line);
  color: var(--lf-white); font-family: var(--lf-mono); font-size: 1rem;
  border-radius: 0;
}
.lf-field:focus { outline: 2px solid var(--lf-accent); outline-offset: -2px; }

.lf-qr {
  background: var(--lf-white);
  padding: 14px;
  display: inline-block;
  line-height: 0;
  margin: 1rem 0;
}
.lf-qr svg { width: 100%; height: auto; display: block; }
.lf-qr svg rect[fill="#000000"], .lf-qr svg path { fill: var(--lf-on-accent); }
.lf-stats { display: flex; gap: 2rem; margin: 1.2rem 0; flex-wrap: wrap; }
.lf-stat b {
  display: block; font-family: var(--lf-display); font-weight: 900;
  font-size: 1.8rem; color: var(--lf-accent); line-height: 1;
}
.lf-stat span { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--lf-text-dim); }

@media (prefers-reduced-motion: reduce) {
  .lf-tile img { transition: opacity .2s linear; transform: none; }
}
