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

html {
  background: #111;
  height: 100%;
}

body {
  background: #111;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  /* kein padding — safe areas werden vom fixed lightshow-screen abgedeckt */
}

#app { width: 100%; padding: 2rem; }

.screen { display: none; flex-direction: column; align-items: center; gap: 1.5rem; animation: fadeIn 0.4s ease; }
.screen.active { display: flex; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.emoji { font-size: 4rem; }
h1 { font-size: 1.8rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.4rem; font-weight: 600; }
p { font-size: 1rem; opacity: 0.8; max-width: 320px; line-height: 1.5; }

.btn {
  background: #fff;
  color: #111;
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: transform 0.1s, opacity 0.1s;
}
.btn:active { transform: scale(0.96); opacity: 0.8; }

.counter {
  font-size: 6rem;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.counter-label { font-size: 0.9rem; opacity: 0.6; letter-spacing: 0.1em; text-transform: uppercase; }

.participants {
  font-size: 0.85rem;
  opacity: 0.5;
  margin-top: 0.5rem;
}

/* Lightshow fullscreen */
#lightshow-screen {
  position: fixed;
  inset: 0;
  background: #000;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
#lightshow-screen.active { display: flex; }

/* Safe area overlays — feste Pixel-Größe damit sie auf jedem Gerät greifen */
#safe-area-top, #safe-area-bottom {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 200;
  background: #111;
  pointer-events: none;
  display: none;
}
#safe-area-top    { top: 0;    height: 80px; }
#safe-area-bottom { bottom: 0; height: 80px; }
#safe-area-top.active, #safe-area-bottom.active { display: block; }

/* Admin styles */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  width: 100%;
  max-width: 400px;
}
.card {
  background: #1e1e1e;
  border-radius: 12px;
  padding: 1rem;
  text-align: left;
}
.card h3 { font-size: 0.75rem; opacity: 0.5; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.5rem; }
.card .value { font-size: 2rem; font-weight: 700; }
.card.full { grid-column: 1 / -1; }

select {
  width: 100%;
  background: #2a2a2a;
  color: #fff;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
  margin-top: 0.25rem;
}

.btn-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.btn-sm {
  flex: 1;
  background: #2a2a2a;
  color: #fff;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 0.6rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  min-width: 80px;
  transition: background 0.15s;
}
.btn-sm:hover { background: #3a3a3a; }
.btn-sm.primary { background: #4CAF50; border-color: #4CAF50; }
.btn-sm.danger { background: #f44336; border-color: #f44336; }
.btn-sm.warning { background: #FF9800; border-color: #FF9800; }

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4CAF50;
  margin-right: 0.4rem;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

input[type=number], input[type=color], input[type=range] {
  background: #2a2a2a;
  color: #fff;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
}
input[type=color] { width: 48px; height: 36px; padding: 2px; cursor: pointer; }
input[type=range] { width: 100%; }
label { font-size: 0.8rem; opacity: 0.6; display: block; margin-bottom: 0.25rem; }
