/* Gemeinsame Design-Tokens und Grundelemente für Fernseher und Handy */
:root {
  --bg: #1a1033;
  --bg-2: #241748;
  --panel: rgba(255, 255, 255, 0.07);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f7f3ff;
  --muted: #b9afd6;
  --accent: #ffd23f;
  --accent-2: #ff4d6d;
  --blue: #4d9dff;
  --red: #ff4d6d;
  --green: #3ddc84;
  --orange: #ff8c42;
  --purple: #b967ff;
  --yellow: #ffd23f;
  --cyan: #2ee6d6;
  --radius: 22px;
  --font: 'Segoe UI', 'Helvetica Neue', Arial, system-ui, sans-serif;
  --font-display: 'Segoe UI Black', 'Arial Black', 'Segoe UI', Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body {
  background: radial-gradient(1200px 800px at 15% 10%, #3a2470 0%, transparent 60%),
    radial-gradient(900px 700px at 90% 90%, #12386b 0%, transparent 55%),
    radial-gradient(700px 500px at 70% 20%, #5a1f5c 0%, transparent 60%),
    var(--bg);
  min-height: 100vh;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: var(--panel-strong);
  border-radius: 16px;
  padding: 14px 18px;
  transition: transform 0.08s ease, background 0.15s ease, opacity 0.15s ease;
}
button:active { transform: scale(0.97); }
button:disabled { opacity: 0.45; cursor: default; }

input, select {
  font: inherit;
  color: inherit;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  outline: none;
  width: 100%;
}
input:focus { border-color: var(--accent); }

/* Avatare */
.avatar {
  position: relative;
  border-radius: 50%;
  overflow: visible;
  flex: none;
  background: #2a1f55;
  box-shadow: 0 0 0 4px var(--ring), 0 6px 18px rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 900;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.avatar-initial { color: #fff; }
.avatar-badge {
  position: absolute;
  right: -6px;
  top: -8px;
  font-size: 0.55em;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}
.avatar-cluster {
  position: relative;
  border-radius: 50%;
  background: #1d1442;
  box-shadow: 0 0 0 4px var(--ring), 0 6px 18px rgba(0, 0, 0, 0.35);
  flex: none;
}
.avatar-cluster-item { position: absolute; box-shadow: 0 0 0 2px var(--ring); }
.cluster-2-0 { left: -6%; top: 14%; }
.cluster-2-1 { right: -6%; top: 30%; }
.cluster-3-0 { left: 21%; top: -6%; }
.cluster-3-1 { left: -8%; bottom: -2%; }
.cluster-3-2 { right: -8%; bottom: -2%; }
.cluster-4-0 { left: -6%; top: -6%; }
.cluster-4-1 { right: -6%; top: -6%; }
.cluster-4-2 { left: -6%; bottom: -6%; }
.cluster-4-3 { right: -6%; bottom: -6%; }

/* Toast + Offline */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: #fff;
  color: #1a1033;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 50;
  max-width: 90vw;
  text-align: center;
}
.toast-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-error { background: var(--red); color: #fff; }
.offline {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--red);
  color: #fff;
  text-align: center;
  padding: 8px;
  font-weight: 700;
  z-index: 60;
  display: none;
}
.offline-visible { display: block; }

.timer {
  position: relative;
  height: 14px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0;
}
.timer-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  border-radius: 999px;
  transition: width 0.1s linear;
}
.timer-label {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  line-height: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@keyframes pop { 0% { transform: scale(0.7); opacity: 0; } 60% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
