/* ═══════════════════════════════════════════════════════
   theme.css  –  Toggle-Button + Flashbang-Animation
   Nur Logik für den Theme-Switch.
   Farben kommen aus colors.css via var(--)
   ═══════════════════════════════════════════════════════ */

/* ── Top Controls ── */
.top-controls {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 10;
  display: flex;
  gap: .5rem;
  align-items: center;
}

/* ── Toggle-Buttons (Theme + Cookie) ── */
.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: .45rem .9rem;
  cursor: pointer;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: .12em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: .5rem;
  user-select: none;
  transition: color .2s, border-color .2s, background-color .7s ease;
}
.theme-toggle:hover {
  color: var(--text);
  border-color: var(--text);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* ── Icons ── */
.toggle-icon     { display: flex; align-items: center; }
.toggle-icon svg { width: 1rem; height: 1rem; }

.toggle-label { font-size: .8rem; letter-spacing: .15em; }

/* ── Flashbang Overlay ── */
#flashbang-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  overflow: hidden;
}
#flashbang-overlay.active { display: block; }

/* Die Granate: startet oben rechts (wo der Button sitzt) */
#flashbang-img {
  position: absolute;
  width: 100px;
  height: 100px;
  object-fit: contain;
  top:   1.1rem;
  right: 1.1rem;
}

/* Der weiße Blitz */
#flashbang-flash {
  position: absolute;
  inset: 0;
  background: #ffffff;
  opacity: 0;
}

/* ── Keyframes ── */

/* Granate fliegt von oben rechts zur Bildschirmmitte, dreht 720° */
@keyframes grenadeIn {
  0% {
    top:       1.1rem;
    right:     1.1rem;
    transform: rotate(0deg) scale(1);
    opacity:   1;
  }
  100% {
    top:       calc(50vh - 50px);
    right:     calc(50vw - 50px);
    transform: rotate(720deg) scale(1.15);
    opacity:   1;
  }
}

/* Blitz: schießt auf 100% und bleibt da – wird per JS sofort entfernt */
@keyframes flashBlind {
  0%   { opacity: 0; }
  30%  { opacity: 1; }
  100% { opacity: 1; }
}
