html,body{
  margin:0;
  width:100%;
  height:100%;
  overflow:hidden;
  background:transparent !important;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Arial,sans-serif;
}
.overlay{
  position:relative;
  width:100vw;
  height:100vh;
  background:transparent !important;
  pointer-events:none;
}
.wall{
  position:absolute;
  inset:0;
  z-index:5;
  display:grid;
  grid-template-columns:repeat(10,1fr);
  grid-template-rows:repeat(15,1fr);
  align-items:stretch;
  justify-items:stretch;
  padding:0;
}
.unit{
  position:relative;
  margin:3px;
  opacity:0;
  transform:translate3d(0,-140px,0) scale(.9) rotate(-4deg);
  transition:opacity .15s ease, transform .38s cubic-bezier(.175,.885,.32,1.275), filter .2s ease;
  will-change:transform,opacity;
}
.unit.on{
  opacity:.9;
  transform:translate3d(0,0,0) scale(1) rotate(0);
}
.skin-brick .unit{
  border-radius:10px;
  background:
    linear-gradient(90deg,rgba(255,255,255,.18),transparent 25%,rgba(0,0,0,.13) 55%,transparent 78%),
    repeating-linear-gradient(0deg,transparent 0 42%,rgba(60,18,12,.42) 43% 49%,transparent 50% 100%),
    linear-gradient(180deg,#ff9c50 0%,#d95029 48%,#8c211b 100%);
  border:2px solid rgba(75,18,12,.56);
  box-shadow:inset 0 4px 0 rgba(255,255,255,.18),inset 0 -7px 0 rgba(0,0,0,.22),0 6px 16px rgba(0,0,0,.32);
}
.skin-flood .unit{
  border-radius:42% 48% 12px 12px;
  background:
    radial-gradient(circle at 35% 22%,rgba(255,255,255,.72),transparent 10%),
    linear-gradient(180deg,#9cf6ff 0%,#12baf0 46%,#0873d9 100%);
  border:2px solid rgba(255,255,255,.22);
  box-shadow:0 0 18px rgba(0,213,255,.45),inset 0 -9px 0 rgba(0,0,0,.13);
  animation:wave 1.9s ease-in-out infinite;
}
.skin-lava .unit{
  border-radius:12px;
  background:
    radial-gradient(circle at 30% 25%,#fff68a 0 12%,transparent 14%),
    radial-gradient(circle at 70% 60%,#ff3300 0 16%,transparent 18%),
    linear-gradient(180deg,#ffd23f,#ff6a00 46%,#64100b 100%);
  border:2px solid rgba(255,230,120,.28);
  box-shadow:0 0 22px rgba(255,90,0,.68),inset 0 -8px 0 rgba(0,0,0,.25);
  animation:lava 1.15s ease-in-out infinite;
}
.skin-slime .unit{
  border-radius:20px 24px 14px 18px;
  background:
    radial-gradient(circle at 35% 22%,rgba(255,255,255,.75),transparent 9%),
    linear-gradient(180deg,#baff42,#39df38 50%,#119d37);
  border:2px solid rgba(200,255,80,.35);
  box-shadow:0 0 18px rgba(57,223,56,.45),inset 0 -8px 0 rgba(0,0,0,.16);
  animation:slime 2.1s ease-in-out infinite;
}
.skin-smoke .unit{
  border-radius:50%;
  background:
    radial-gradient(circle at 38% 30%,rgba(255,255,255,.42),transparent 18%),
    radial-gradient(circle at 55% 55%,rgba(90,94,110,.92),rgba(18,20,28,.86) 72%);
  border:1px solid rgba(255,255,255,.1);
  box-shadow:0 0 28px rgba(185,185,210,.28);
  filter:blur(.2px);
  animation:smoke 2.4s ease-in-out infinite;
}
.unit.gold{
  filter:saturate(1.25) brightness(1.18);
  box-shadow:0 0 30px rgba(255,210,63,.78),inset 0 4px 0 rgba(255,255,255,.22),inset 0 -7px 0 rgba(0,0,0,.2);
}
@keyframes wave{50%{transform:translate3d(0,-4px,0) scale(1.02)}}
@keyframes lava{50%{filter:brightness(1.28) saturate(1.22)}}
@keyframes slime{50%{border-radius:26px 16px 24px 12px;transform:translate3d(0,2px,0) scale(1.015)}}
@keyframes smoke{50%{transform:translate3d(0,-8px,0) scale(1.08);opacity:.78}}

.hud{
  position:absolute;
  z-index:25;
  top:22px;
  left:50%;
  transform:translateX(-50%);
  min-width:760px;
  height:58px;
  padding:0 24px;
  border-radius:999px;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:18px;
  background:rgba(6,8,18,.62);
  border:1px solid rgba(255,255,255,.22);
  box-shadow:0 18px 48px rgba(0,0,0,.38),inset 0 1px 0 rgba(255,255,255,.14);
  backdrop-filter:blur(8px);
}
.hud strong{color:#ffd23f;font-weight:1000}
.hud span{font-weight:900}
#skinLabel{
  color:#071018;
  background:#ffd23f;
  border-radius:999px;
  padding:7px 11px;
  font-size:13px;
}
#status.critical{color:#ff355f;text-shadow:0 0 18px #ff355f}
#status.ko{color:#ffd23f;text-shadow:0 0 18px #ffd23f}

.dangerLine{
  position:absolute;
  z-index:14;
  left:0;
  right:0;
  top:20%;
  border-top:5px dashed rgba(255,45,68,.9);
  filter:drop-shadow(0 0 16px rgba(255,45,68,.95));
  opacity:.92;
}
.dangerLine span{
  position:absolute;
  right:26px;
  top:-40px;
  color:#fff;
  background:rgba(255,45,68,.82);
  border:1px solid rgba(255,255,255,.24);
  border-radius:999px;
  padding:8px 13px;
  font-size:14px;
  font-weight:1000;
}
.vignette{
  position:absolute;
  inset:0;
  z-index:12;
  opacity:0;
  box-shadow:inset 0 0 160px 46px rgba(255,0,45,0);
}
.vignette.critical{animation:pulse 1s ease-in-out infinite}
@keyframes pulse{
  0%,100%{opacity:.22;box-shadow:inset 0 0 110px 30px rgba(255,0,45,.35)}
  50%{opacity:1;box-shadow:inset 0 0 190px 62px rgba(255,0,45,.74)}
}
.eventBadge{
  position:absolute;
  z-index:26;
  left:50%;
  bottom:34px;
  transform:translateX(-50%);
  color:#fff;
  background:rgba(8,10,20,.66);
  border:1px solid rgba(255,255,255,.2);
  border-radius:20px;
  padding:13px 20px;
  font-weight:950;
  backdrop-filter:blur(8px);
  box-shadow:0 16px 42px rgba(0,0,0,.36);
}
.ko{
  position:absolute;
  z-index:45;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%) rotate(-8deg) scale(.2);
  opacity:0;
  color:#fff;
  font-size:132px;
  font-weight:1000;
  letter-spacing:-.08em;
  text-shadow:0 12px 0 #111,0 0 46px #ff2d44;
  background:linear-gradient(90deg,#ff2d44,#ffd23f);
  border:8px solid #fff;
  border-radius:30px;
  padding:24px 44px;
}
.ko.on{animation:slam .62s cubic-bezier(.17,.67,.15,1.35) forwards}
@keyframes slam{
  0%{opacity:0;transform:translate(-50%,-160%) rotate(-14deg) scale(.15)}
  72%{opacity:1;transform:translate(-50%,-50%) rotate(-8deg) scale(1.12)}
  100%{opacity:1;transform:translate(-50%,-50%) rotate(-8deg) scale(1)}
}
.particles{
  position:absolute;
  inset:0;
  z-index:18;
  overflow:hidden;
}
.particle{
  position:absolute;
  bottom:12%;
  left:50%;
  font-size:28px;
  opacity:0;
  animation:pop .85s ease-out forwards;
}
@keyframes pop{
  0%{opacity:1;transform:translate(-50%,0) scale(.7)}
  100%{opacity:0;transform:translate(var(--x),var(--y)) scale(1.25) rotate(30deg)}
}
@media(max-width:900px){
  .hud{min-width:auto;width:94vw;font-size:12px;gap:8px}
  .ko{font-size:64px}
}

/* STREAMERFUN_OBS_TRANSPARENCY_GUARD_S7A2_START */
html,
body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  overflow: hidden !important;
  background: transparent !important;
  background-color: rgba(0, 0, 0, 0) !important;
}

body {
  pointer-events: none !important;
}

#root,
#app,
.app-root,
.overlay-root,
.obs-root {
  width: 100vw !important;
  height: 100vh !important;
  overflow: hidden !important;
  background: transparent !important;
  background-color: rgba(0, 0, 0, 0) !important;
  pointer-events: none !important;
}

canvas,
svg,
video {
  pointer-events: none !important;
}

* {
  box-sizing: border-box;
}
/* STREAMERFUN_OBS_TRANSPARENCY_GUARD_S7A2_END */

/* STREAMERFUN_OVERLAY_RULEBOT_S7A3_START */
.sf-rulebot {
  position: fixed;
  left: 50%;
  top: 78px;
  z-index: 2147483000;
  width: min(760px, 72vw);
  transform: translate(-50%, -18px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  padding: 16px 20px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: linear-gradient(135deg, rgba(8, 8, 18, 0.80), rgba(25, 20, 44, 0.66));
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(10px);
  color: #ffffff;
  text-align: center;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  transition: opacity 420ms ease, transform 420ms ease;
}

.sf-rulebot.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.sf-rulebot-title {
  font-size: 22px;
  line-height: 1;
  font-weight: 1000;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #ffd23f;
  text-shadow: 0 3px 22px rgba(255, 210, 63, 0.35);
  margin-bottom: 8px;
}

.sf-rulebot-lines {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px 16px;
  flex-wrap: wrap;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 900;
}

.sf-rulebot-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.sf-rulebot-command {
  color: #00d5ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 1000;
}

.sf-rulebot-danger {
  color: #ff4d7d;
  font-weight: 1000;
}

@media (max-width: 900px) {
  .sf-rulebot {
    top: 52px;
    width: 86vw;
    padding: 12px 14px;
  }

  .sf-rulebot-title {
    font-size: 17px;
  }

  .sf-rulebot-lines {
    font-size: 14px;
  }
}
/* STREAMERFUN_OVERLAY_RULEBOT_S7A3_END */

/* STREAMERFUN_DUEL_OPPONENT_PREVIEW_S8B_START */
.sf-match-meta {
  position: fixed;
  left: 28px;
  top: 24px;
  z-index: 2147482600;
  min-width: 390px;
  max-width: 780px;
  pointer-events: none;
  padding: 14px 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(135deg, rgba(8, 8, 18, 0.78), rgba(20, 20, 45, 0.62));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
  color: #ffffff;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.sf-match-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.sf-match-player {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sf-match-player-name {
  font-size: 23px;
  font-weight: 1000;
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 245px;
}

.sf-match-player-login {
  margin-top: 4px;
  color: rgba(255,255,255,0.68);
  font-size: 13px;
  font-weight: 850;
}

.sf-match-vs {
  color: #ffd23f;
  font-size: 18px;
  font-weight: 1000;
  text-shadow: 0 0 20px rgba(255, 210, 63, 0.42);
}

.sf-match-timer {
  margin-left: auto;
  min-width: 100px;
  text-align: center;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 210, 63, 0.14);
  border: 1px solid rgba(255, 210, 63, 0.38);
}

.sf-match-timer-value {
  color: #ffd23f;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 27px;
  line-height: 1;
  font-weight: 1000;
}

.sf-match-status {
  margin-top: 5px;
  color: rgba(255,255,255,0.72);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.sf-duel-preview {
  position: fixed;
  right: 28px;
  top: 126px;
  z-index: 2147482550;
  width: 342px;
  pointer-events: none;
  transform: translateZ(0);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: #ffffff;
}

.sf-duel-preview.is-hidden {
  display: none !important;
}

.sf-duel-preview-card {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.24);
  background: rgba(8,8,18,0.70);
  box-shadow: 0 24px 80px rgba(0,0,0,0.48);
  backdrop-filter: blur(10px);
}

.sf-duel-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 10px;
  background: linear-gradient(90deg, rgba(255,210,63,0.16), rgba(0,213,255,0.10));
  border-bottom: 1px solid rgba(255,255,255,0.14);
}

.sf-duel-preview-title {
  min-width: 0;
}

.sf-duel-preview-kicker {
  color: #ffd23f;
  font-size: 10px;
  line-height: 1;
  font-weight: 1000;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sf-duel-preview-name {
  margin-top: 4px;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 21px;
  line-height: 1;
  font-weight: 1000;
  letter-spacing: -0.04em;
}

.sf-duel-preview-score {
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #ffffff;
  font-size: 20px;
  font-weight: 1000;
}

.sf-duel-preview-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,77,125,0.24), transparent 34%),
    radial-gradient(circle at 88% 14%, rgba(0,213,255,0.18), transparent 32%),
    rgba(8,8,18,0.82);
}

.sf-duel-preview-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  filter: saturate(1.08) contrast(1.06);
}

.sf-duel-preview-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 86px;
  font-weight: 1000;
  color: rgba(255,255,255,0.86);
  background:
    radial-gradient(circle at center, rgba(255,210,63,0.22), transparent 36%),
    linear-gradient(135deg, rgba(255,77,125,0.36), rgba(0,213,255,0.24));
}

.sf-mini-effect {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(15, 1fr);
  gap: 1px;
  padding: 8px;
  align-content: end;
}

.sf-mini-cell {
  border-radius: 3px;
  opacity: 0;
  transform: translateY(5px) scale(0.92);
  transition: opacity 160ms ease, transform 160ms ease;
  background: linear-gradient(135deg, #c27332, #7a3d1e);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.25), 0 1px 4px rgba(0,0,0,0.18);
}

.sf-mini-cell.is-filled {
  opacity: 0.92;
  transform: translateY(0) scale(1);
}

.sf-duel-preview[data-skin="flood"] .sf-mini-cell.is-filled {
  background: linear-gradient(180deg, rgba(0,213,255,0.86), rgba(0,86,255,0.72));
  border-radius: 7px;
  box-shadow: 0 0 12px rgba(0,213,255,0.36);
}

.sf-duel-preview[data-skin="lava"] .sf-mini-cell.is-filled {
  background: linear-gradient(180deg, rgba(255,220,80,0.96), rgba(255,68,0,0.86), rgba(120,0,0,0.82));
  box-shadow: 0 0 13px rgba(255,92,0,0.48);
}

.sf-duel-preview[data-skin="slime"] .sf-mini-cell.is-filled {
  background: linear-gradient(180deg, rgba(142,255,64,0.90), rgba(28,171,51,0.82));
  border-radius: 10px;
  box-shadow: 0 0 11px rgba(118,255,70,0.42);
}

.sf-duel-preview[data-skin="smoke"] .sf-mini-cell.is-filled {
  background: radial-gradient(circle, rgba(230,230,230,0.86), rgba(92,92,110,0.60));
  border-radius: 999px;
  box-shadow: 0 0 15px rgba(255,255,255,0.22);
}

.sf-duel-preview.is-danger .sf-duel-preview-card {
  border-color: rgba(255,77,125,0.88);
  box-shadow: 0 0 0 2px rgba(255,77,125,0.18), 0 24px 90px rgba(255,0,60,0.32);
}

.sf-duel-preview.is-ko .sf-duel-preview-stage::after {
  content: "K.O.";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(10,0,8,0.54);
  color: #ff4d7d;
  font-size: 76px;
  font-weight: 1000;
  letter-spacing: -0.06em;
  text-shadow: 0 5px 0 rgba(0,0,0,0.45), 0 0 30px rgba(255,77,125,0.75);
}

.sf-duel-preview-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 13px 12px;
  color: rgba(255,255,255,0.74);
  font-size: 12px;
  font-weight: 850;
}

.sf-duel-preview-status {
  color: #ffd23f;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 1100px) {
  .sf-duel-preview {
    width: 278px;
    right: 18px;
    top: 108px;
  }

  .sf-match-meta {
    left: 18px;
    top: 18px;
    min-width: 320px;
  }

  .sf-match-player-name {
    font-size: 18px;
    max-width: 180px;
  }

  .sf-match-timer-value {
    font-size: 22px;
  }
}
/* STREAMERFUN_DUEL_OPPONENT_PREVIEW_S8B_END */

/* STREAMERFUN_OVERLAY_LAYOUT_SAFE_EDITOR_S8G_START */
#sf-rulebot,
.sf-rulebot {
  display: none !important;
  visibility: hidden !important;
}

html.sf-rules-enabled #sf-rulebot,
html.sf-rules-enabled .sf-rulebot {
  display: block !important;
  visibility: visible !important;
}

html.sf-layout-editing,
html.sf-layout-editing body {
  pointer-events: auto !important;
  cursor: default !important;
}

html.sf-layout-editing .sf-match-meta,
html.sf-layout-editing .sf-duel-preview {
  pointer-events: auto !important;
  cursor: move !important;
  user-select: none !important;
  touch-action: none !important;
  outline: 2px dashed rgba(255, 210, 63, 0.95);
  outline-offset: 4px;
}

html.sf-layout-editing .sf-match-meta::after,
html.sf-layout-editing .sf-duel-preview::after {
  content: "drag";
  position: absolute;
  right: 8px;
  top: -28px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 210, 63, 0.95);
  color: #071018;
  font-size: 11px;
  line-height: 1;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(0,0,0,0.28);
}

.sf-layout-toolbar {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 2147483647;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 10px;
  pointer-events: auto !important;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(8, 8, 18, 0.84);
  color: #ffffff;
  box-shadow: 0 18px 60px rgba(0,0,0,0.46);
  backdrop-filter: blur(10px);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

html.sf-layout-editing .sf-layout-toolbar {
  display: flex;
}

.sf-layout-toolbar strong {
  color: #ffd23f;
  font-weight: 1000;
}

.sf-layout-toolbar span {
  font-size: 13px;
  font-weight: 850;
  color: rgba(255,255,255,0.82);
}

.sf-layout-toolbar button {
  pointer-events: auto !important;
  border: 0;
  border-radius: 12px;
  padding: 9px 11px;
  background: #ffd23f;
  color: #071018;
  font-size: 12px;
  font-weight: 1000;
  cursor: pointer;
}

.sf-layout-toolbar button.sf-layout-dark {
  background: rgba(255,255,255,0.12);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.20);
}
/* STREAMERFUN_OVERLAY_LAYOUT_SAFE_EDITOR_S8G_END */

/* STREAMERFUN_HIDE_LEGACY_CENTER_HUD_S8H_START */
/*
  Alte zentrale Overlay-Anzeige ausblenden.
  Neue Anzeige bleibt:
  - #sf-match-meta = Namen/Timer
  - #sf-duel-preview = Gegner-Vorschau
  - #ko = K.O.-Banner
*/
.hud,
.eventBadge,
#eventBadge {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Debug-Fallback: mit &debughud=1 könnte JS später diese Klasse setzen. */
html.sf-debug-legacy-hud .hud,
html.sf-debug-legacy-hud .eventBadge,
html.sf-debug-legacy-hud #eventBadge {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}
/* STREAMERFUN_HIDE_LEGACY_CENTER_HUD_S8H_END */
