/* Fotari-Geburtstag — Styles */

:root {
  --bg: #14141f;
  --bg-soft: #1f1f2e;
  --bg-card: #262638;
  --accent: #ffb347;
  --accent-2: #ff6b9d;
  --text: #f5f5f7;
  --text-dim: #9999a8;
  --success: #4ade80;
  --border: rgba(255,255,255,0.08);
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0,0,0,0.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* hidden-Attribut MUSS gewinnen, auch gegen Class-Rules mit display: */
[hidden] { display: none !important; }

/* A11y-Trick: File-Inputs visuell weg, aber klickbar (iOS Safari mag display:none nicht auf File-Inputs) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  padding-bottom: 60px;
}

/* ---------- HERO ---------- */
.hero {
  padding: 32px 20px 28px;
  text-align: center;
  background: linear-gradient(135deg, #2a1e3a 0%, #14141f 100%);
  border-bottom: 1px solid var(--border);
}
.hero-eyebrow {
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 600;
}
.hero h1 {
  font-size: clamp(34px, 8vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 15px;
}

/* ---------- TASKS ---------- */
.tasks {
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 540px;
  margin: 0 auto;
}
.loading {
  text-align: center;
  padding: 40px 0;
  color: var(--text-dim);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.card-num {
  display: inline-block;
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.card-text {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 500;
  margin-bottom: 18px;
}

.card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 18px;
  border-radius: 10px;
  transition: transform 0.06s ease, opacity 0.15s ease, background 0.15s ease;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #1a1a2e;
}
.btn.ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn.ghost:hover { background: rgba(255,255,255,0.09); }

/* ---------- PREVIEW ---------- */
.preview {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.preview-img {
  width: 100%;
  border-radius: 10px;
  display: block;
  max-height: 480px;
  object-fit: contain;
  background: #000;
}
.preview-actions {
  display: flex;
  gap: 10px;
}
.preview-actions .btn { flex: 1; }

/* ---------- UPLOADING ---------- */
.uploading {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  background: rgba(255,179,71,0.08);
  border-radius: 10px;
  color: var(--accent);
}
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,179,71,0.3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- SUCCESS ---------- */
.success {
  margin-top: 16px;
  padding: 18px;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 10px;
  text-align: center;
}
.success-icon {
  font-size: 38px;
  color: var(--success);
  font-weight: 800;
  line-height: 1;
}
.success-text {
  margin: 8px 0 14px;
  font-weight: 600;
}

/* ---------- DONE STATE (komplett gesperrt) ---------- */
.card.done .card-text { opacity: 0.55; }
.card.done .card-actions { display: none; }

/* ---------- FOOTER ---------- */
.footer {
  text-align: center;
  margin-top: 30px;
  padding: 0 20px;
}
.ghost-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  padding: 12px;
  display: inline-block;
}
.ghost-link:hover { color: var(--accent); }

/* ---------- TOAST ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 14px;
  z-index: 1000;
  animation: toast-in 0.25s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ============================================================
   LIGHTBOX (shared — Gäste-Galerie + Host)
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}
.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 14, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.lb-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
  transition: grid-template-columns 0.3s ease;
}
.lightbox.panel-hidden .lb-content {
  grid-template-columns: 1fr 0px;
}
.lightbox.panel-hidden .lb-panel {
  opacity: 0;
  pointer-events: none;
}
.lb-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: white;
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s;
}
.lb-close:hover { background: rgba(255,255,255,0.16); }
.lb-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  min-width: 0;
  min-height: 0;
}
.lb-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  transition: transform 0.3s ease;
}
.lb-panel {
  background: var(--bg-soft, #1f1f2e);
  border-left: 1px solid var(--border, rgba(255,255,255,0.08));
  overflow-y: auto;
  transition: opacity 0.25s ease;
}
.lb-panel-inner {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: var(--text, #f5f5f7);
}
.lb-label {
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent, #ffb347);
  font-weight: 600;
}
.lb-task {
  font-size: 19px;
  line-height: 1.45;
  font-weight: 500;
}
.lb-meta {
  font-size: 13px;
  color: var(--text-dim, #9999a8);
}
.lb-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.lb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  background: rgba(255,255,255,0.05);
  color: var(--text, #f5f5f7);
  font-family: inherit;
  transition: background 0.15s, transform 0.06s;
}
.lb-btn:hover { background: rgba(255,255,255,0.1); }
.lb-btn:active { transform: scale(0.98); }
.lb-btn.lb-primary {
  background: linear-gradient(135deg, var(--accent, #ffb347), var(--accent-2, #ff6b9d));
  color: #1a1a2e;
  border-color: transparent;
}
.lb-btn.lb-danger {
  color: #ff8a8a;
  border-color: rgba(255, 138, 138, 0.3);
  background: rgba(255, 138, 138, 0.08);
}
.lb-btn.lb-danger:hover { background: rgba(255, 138, 138, 0.15); }
.lb-hint {
  font-size: 12px;
  color: var(--text-dim, #9999a8);
  line-height: 1.5;
  border-top: 1px solid var(--border, rgba(255,255,255,0.08));
  padding-top: 16px;
  margin-top: 8px;
}

/* Mobile: Panel rutscht nach unten */
@media (max-width: 768px) {
  .lb-content { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .lightbox.panel-hidden .lb-content { grid-template-rows: 1fr 0; }
  .lb-panel {
    border-left: none;
    border-top: 1px solid var(--border, rgba(255,255,255,0.08));
    max-height: 40vh;
  }
  .lb-panel-inner { padding: 22px 20px; }
  .lb-stage { padding: 20px; }
}

/* ============================================================
   GALERIE-CARDS — clean by default, Caption on hover/tap
   ============================================================ */
.photo {
  position: relative;
  background: var(--bg-card, #262638);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.photo:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}
.photo img {
  display: block;
  width: 100%;
  height: auto;
}
.photo .photo-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 14px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
  color: white;
  font-size: 13px;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.photo:hover .photo-caption,
.photo.show-caption .photo-caption {
  opacity: 1;
  transform: translateY(0);
}
