@import url('/streamers/fonts.css');

:root {
  color-scheme: dark;
  --accent: #ad63ff;
  --secondary: #47e3ff;
  --panel: .88;
  --ink: #f8f6ff;
  --muted: #c1b9d3;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0 !important;
  width: 100%;
  background: transparent !important;
  overflow: hidden;
  color: var(--ink);
}
body { padding: 15px !important; }
[hidden] { display: none !important; }
.overlay { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; width: 100%; max-width: 1410px; }

/* The canvas stays transparent; all galaxy light is contained inside the banner. */
.banner {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
  height: 190px;
  padding: 18px 30px 18px 16px;
  overflow: hidden;
  border: 1px solid #ffffff25;
  border-radius: 18px 4px 18px 4px;
  background: linear-gradient(110deg, rgba(13, 11, 30, var(--panel)), rgba(19, 12, 35, var(--panel)) 54%, rgba(9, 17, 30, var(--panel)));
  box-shadow: 0 7px 14px #0005, inset 0 1px #ffffff08;
  animation: banner-enter .75s cubic-bezier(.2,.8,.2,1) both;
}
.banner::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--secondary));
  opacity: .95;
}
.banner::after {
  content: "";
  position: absolute;
  inset: 0 12% auto 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--secondary), transparent);
  opacity: .8;
}
.galaxy { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.nebula {
  position: absolute;
  inset: -80% -10%;
  background:
    radial-gradient(ellipse at 14% 55%, color-mix(in srgb, var(--accent) 25%, transparent), transparent 36%),
    radial-gradient(ellipse at 91% 62%, color-mix(in srgb, var(--secondary) 16%, transparent), transparent 30%);
  animation: nebula-drift 18s ease-in-out infinite alternate;
}
.starfield {
  position: absolute;
  inset: 0;
  opacity: .55;
  background:
    radial-gradient(circle at 3% 21%, #fff9 0 1px, transparent 1.5px),
    radial-gradient(circle at 18% 78%, var(--secondary) 0 1px, transparent 1.6px),
    radial-gradient(circle at 28% 12%, #fff8 0 .7px, transparent 1.3px),
    radial-gradient(circle at 70% 86%, #fff8 0 .7px, transparent 1.3px),
    radial-gradient(circle at 78% 18%, var(--accent) 0 1px, transparent 1.6px),
    radial-gradient(circle at 91% 28%, #fffc 0 1px, transparent 1.6px),
    radial-gradient(circle at 97% 73%, #fff9 0 .8px, transparent 1.4px);
  animation: starlight 8s ease-in-out infinite alternate;
}
.orbit {
  position: absolute;
  top: -144px;
  right: -44px;
  width: 410px;
  height: 410px;
  border: 1px solid color-mix(in srgb, var(--secondary) 16%, transparent);
  border-radius: 50%;
  animation: orbit-turn 38s linear infinite;
}
.orbit::before {
  content: "";
  position: absolute;
  top: 52px;
  left: 54px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--secondary);
  box-shadow: 0 0 11px var(--secondary);
}
.orbit-two { inset: -84px -4px auto auto; width: 290px; height: 290px; border-color: color-mix(in srgb, var(--accent) 18%, transparent); animation-duration: 51s; animation-direction: reverse; }
.orbit-two::before { top: 37px; left: 38px; width: 3px; height: 3px; background: var(--accent); box-shadow: 0 0 9px var(--accent); }
.shooting-star {
  position: absolute;
  top: 26px;
  right: 340px;
  width: 90px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--secondary), #fff);
  opacity: 0;
  animation: shooting-star 15s ease-out infinite;
}
.broadcast-light-sweep {
  position: absolute;
  z-index: 0;
  top: -50%;
  left: -40%;
  width: 25%;
  height: 200%;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--secondary) 9%, transparent), transparent);
  transform: skewX(-22deg);
  opacity: 0;
  pointer-events: none;
  animation: banner-sweep 11s ease-in-out infinite;
}
.brand { position: relative; flex: 0 0 224px; height: 154px; display: grid; place-items: center; }
.brand::after { content: ""; position: absolute; right: -14px; top: 19px; bottom: 19px; width: 1px; background: linear-gradient(transparent, color-mix(in srgb, var(--accent) 45%, transparent), transparent); }
.brand-halo { position: absolute; inset: 5px -8px; background: radial-gradient(ellipse, color-mix(in srgb, var(--accent) 22%, transparent), transparent 68%); animation: brand-breathe 7s ease-in-out infinite alternate; }
.brand-logo { position: relative; width: 224px; height: 150px; object-fit: contain; filter: drop-shadow(0 4px 8px #0007); }
.banner-copy { position: relative; flex: 1; min-width: 0; }
.live-label { display: flex; align-items: center; gap: 14px; min-width: 0; height: 20px; font-size: 14px; font-weight: 650; letter-spacing: .035em; }
#name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--secondary); }
.label-rule { flex: 1; min-width: 16px; height: 1px; background: linear-gradient(90deg, #ffffff1f, transparent); }
.connection { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; }
.connection b { color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.signal { position: relative; width: 5px; height: 5px; border-radius: 50%; background: var(--secondary); }
.signal::after { content: ""; position: absolute; inset: -3px; border: 1px solid var(--secondary); border-radius: inherit; animation: signal-ring 3.8s ease-out infinite; }
h1 { font: 850 clamp(26px, 3.5vw, 48px)/1.04 "Segoe UI", Arial, sans-serif; letter-spacing: -.025em; margin: 10px 0 9px; max-height: 92px; overflow: hidden; overflow-wrap: anywhere; text-shadow: 0 2px 10px #0004; }
#subtitle { margin: 0; color: #ded8ed; font-size: 13px; line-height: 1.35; letter-spacing: .02em; overflow-wrap: anywhere; }
.banner-signature { position: relative; flex: 0 0 164px; display: flex; align-items: center; justify-content: center; gap: 12px; color: #e9e5f5; font-size: 14px; font-weight: 750; letter-spacing: .17em; }
.signature-caption { display: block; margin-top: 7px; font-size: 7px; letter-spacing: .21em; font-weight: 500; color: #b3abc6; }
.signature-star { width: 21px; height: 21px; flex-shrink: 0; background: linear-gradient(135deg, var(--secondary), #fff, var(--accent)); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: signature-glow 6s ease-in-out infinite alternate; }
.edge-bottom { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--accent), transparent 35%, transparent 65%, var(--secondary)); }
.edge-bottom::after { content: ""; display: block; width: 16%; height: 100%; background: linear-gradient(90deg, transparent, var(--secondary), #fff, transparent); animation: edge-glide 9s ease-in-out infinite; opacity: 0; }

/* Six rows fit inside the existing 960 × 350 source. */
.feed {
  position: relative;
  isolation: isolate;
  width: min(100%, 930px);
  padding: 0 8px 8px;
  border: 1px solid #ffffff21;
  border-radius: 12px 3px 12px 3px;
  background: linear-gradient(110deg, rgba(12, 11, 26, var(--panel)), rgba(17, 12, 30, var(--panel)));
  box-shadow: 0 6px 14px #0005;
  overflow: hidden;
}
.feed::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--accent), var(--secondary) 70%, transparent); }
.feed header { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; height: 44px; padding: 0 9px; overflow: hidden; }
.feed header::after { content: ""; position: absolute; left: -30%; top: 0; bottom: 0; width: 25%; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--secondary) 8%, transparent), transparent); animation: banner-sweep 13s ease-in-out infinite; opacity: 0; pointer-events: none; }
.feed-heading { display: flex; align-items: center; gap: 10px; min-width: 0; white-space: nowrap; }
.feed-logo { width: 50px; height: 34px; object-fit: contain; }
.feed-identifier { font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.feed-rule { width: 1px; height: 13px; margin: 0 2px; background: #ffffff28; }
.feed-heading strong { color: #bdb5cf; font-size: 11px; font-weight: 550; letter-spacing: .025em; }
.feed-status { display: flex; align-items: center; gap: 7px; font-size: 9px; font-weight: 650; letter-spacing: .08em; color: #c9e7e9; white-space: nowrap; }
.feed-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--secondary); }
.kills { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kill {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr) 43px;
  gap: 14px;
  align-items: center;
  flex-shrink: 0;
  height: 38px;
  padding: 0 14px;
  border: 1px solid #ffffff09;
  border-radius: 5px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, transparent), #ffffff03);
  font-size: 14px;
  font-weight: 600;
}
.kill::before { content: ""; position: absolute; inset: 8px auto 8px 0; width: 2px; background: var(--accent); opacity: .4; border-radius: 2px; }
.kill:first-child { border-color: color-mix(in srgb, var(--secondary) 18%, transparent); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 16%, transparent), color-mix(in srgb, var(--secondary) 5%, transparent)); }
.kill:first-child::before { background: var(--secondary); opacity: .9; }
.kill.is-new { animation: kill-arrive .55s cubic-bezier(.17,.85,.22,1) both; }
.kill.is-new::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(90deg, color-mix(in srgb, var(--secondary) 14%, transparent), transparent 75%); animation: kill-highlight 1.2s ease-out both; }
.killer, .victim { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.killer { color: var(--secondary); }
.victim { color: #eee8f6; }
.weapon { display: grid; place-items: center; width: 30px; height: 24px; color: #c9a1ef; }
.weapon svg { width: 18px; height: 18px; }
.kill time { font-size: 10px; font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; color: #a89cb9; }
.kill.expiring { animation: kill-expire var(--fade-duration, 5s) linear both; }
.kill.expiring::after { display: none; }
.empty { display: flex; align-items: center; justify-content: center; gap: 11px; height: 53px; margin: 0; font-size: 12px; color: #b4abc7; }
.empty-signal { width: 16px; height: 16px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 50%; position: relative; }
.empty-signal::after { content: ""; position: absolute; inset: 4px; border-radius: inherit; background: var(--accent); opacity: .65; animation: starlight 4s ease-in-out infinite alternate; }
.preview-tag { padding: 8px 8px 0; color: #b6a8c9; font-size: 8px; font-weight: 600; letter-spacing: .1em; text-align: right; }
.overlay[data-state="offline"] .signal, .feed[data-state="offline"] .feed-status::before { background: #e1af80; }
.overlay[data-state="offline"] .signal::after { display: none; }
.feed[data-state="offline"] .feed-status, .overlay[data-state="offline"] .connection b { color: #e1af80; }
.feed-only .banner, .banner-only .feed { display: none; }
.feed-only.overlay { max-width: 930px; }
html[data-obs-source="main"] .feed, html[data-obs-source="killfeed"] .banner { display: none !important; }
html[data-obs-source="killfeed"] .overlay { max-width: 930px; }
html[data-obs-source="killfeed"] .feed { width: 100%; }

@keyframes banner-enter { from { opacity: 0; transform: translate3d(0, 9px, 0); } to { opacity: 1; transform: none; } }
@keyframes nebula-drift { from { opacity: .65; transform: translate3d(-1%, 0, 0) scale(1); } to { opacity: 1; transform: translate3d(3%, 2%, 0) scale(1.08); } }
@keyframes starlight { from { opacity: .3; } to { opacity: .8; } }
@keyframes orbit-turn { to { transform: rotate(360deg); } }
@keyframes shooting-star { 0%, 76%, 100% { opacity: 0; transform: translate3d(0, 0, 0) rotate(24deg) scaleX(.3); } 79% { opacity: .7; } 87% { opacity: 0; transform: translate3d(290px, 129px, 0) rotate(24deg) scaleX(1); } }
@keyframes banner-sweep { 0%, 12% { opacity: 0; transform: translate3d(0, 0, 0) skewX(-22deg); } 22% { opacity: .8; } 57%, 100% { opacity: 0; transform: translate3d(600%, 0, 0) skewX(-22deg); } }
@keyframes brand-breathe { from { opacity: .45; transform: scale(.94); } to { opacity: .9; transform: scale(1.06); } }
@keyframes signal-ring { 0%, 70%, 100% { opacity: 0; transform: scale(.65); } 10% { opacity: .6; } 55% { opacity: 0; transform: scale(1.8); } }
@keyframes signature-glow { from { opacity: .55; transform: scale(.9); } to { opacity: 1; transform: scale(1); } }
@keyframes edge-glide { 0%, 10% { opacity: 0; transform: translate3d(-100%, 0, 0); } 18%, 75% { opacity: .8; } 90%, 100% { opacity: 0; transform: translate3d(700%, 0, 0); } }
@keyframes kill-arrive { from { opacity: 0; transform: translate3d(18px, 0, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
@keyframes kill-highlight { from { opacity: 1; } to { opacity: 0; } }
@keyframes kill-expire { from { opacity: var(--fade-from, 1); } to { opacity: 0; } }

@media (max-width: 1100px) {
  .banner-signature { display: none; }
  .banner { gap: 24px; }
  .brand { flex-basis: 196px; }
  .brand-logo { width: 196px; height: 140px; }
}
@media (max-width: 700px) {
  body { padding: 11px !important; }
  .overlay { gap: 12px; }
  .banner { height: 180px; gap: 16px; padding: 16px 18px 16px 9px; border-radius: 13px 3px 13px 3px; }
  .brand { flex-basis: 112px; height: 110px; }
  .brand-logo { width: 112px; height: 90px; }
  .brand::after { right: -8px; top: 12px; bottom: 12px; }
  .live-label { font-size: 11px; gap: 7px; }
  .connection b { font-size: 8px; letter-spacing: .025em; }
  .connection { gap: 5px; }
  .label-rule { min-width: 6px; }
  h1 { font-size: 30px; max-height: 66px; margin: 8px 0; }
  #subtitle { font-size: 10px; line-height: 1.4; }
  .orbit { right: -175px; }
  .orbit-two { right: -118px; }
  .feed { padding: 0 6px 6px; }
  .kill { gap: 7px; padding: 0 10px; font-size: 12px; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) 35px; }
  .weapon { width: 24px; }
  .kill time { font-size: 9px; }
}
@media (max-width: 470px) {
  .banner { gap: 12px; padding-right: 13px; }
  .brand { flex-basis: 78px; height: 90px; }
  .brand-logo { width: 80px; height: 66px; }
  .brand::after { right: -6px; top: 15px; bottom: 15px; }
  h1 { font-size: 24px; max-height: 66px; }
  .live-label { font-size: 10px; }
  .connection b { display: none; }
  #subtitle { font-size: 10px; }
  .feed header { padding: 0 5px; gap: 6px; }
  .feed-heading { gap: 6px; }
  .feed-identifier { font-size: 10px; }
  .feed-heading strong { font-size: 10px; }
  .feed-logo { width: 40px; height: 28px; }
  .feed-status { font-size: 8px; gap: 4px; }
  .kill { gap: 5px; padding: 0 8px; font-size: 10px; grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr) 31px; }
  .weapon { width: 20px; }
  .weapon svg { width: 15px; height: 15px; }
  .kill time { font-size: 8px; }
  .empty { font-size: 10px; }
}

/* User preference also stops JavaScript row movement (see overlay.js). */
.overlay.still, .overlay.still *, .overlay.still *::before, .overlay.still *::after { animation: none !important; transition: none !important; }
.overlay.still .broadcast-light-sweep, .overlay.still .shooting-star, .overlay.still .edge-bottom::after, .overlay.still .feed header::after, .overlay.still .signal::after, .overlay.still .kill.is-new::after { opacity: 0; }
.overlay.still .kill.expiring { opacity: .35; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .broadcast-light-sweep, .shooting-star, .edge-bottom::after, .feed header::after, .signal::after, .kill.is-new::after { opacity: 0; }
  .kill.expiring { opacity: .35; }
}
