:root {
  --gold: #ffb23e;
  --cyan: #47e5ff;
  --violet: #8f5cff;
  --text: #f7f8ff;
  --muted: #aeb6cc;
  --panel: rgba(13, 18, 33, 0.88);
  --line: rgba(255, 255, 255, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: transparent;
  font-family: "Barlow", system-ui, sans-serif;
}

.stream-stage {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  padding: 3rem;
}

.stream-alert {
  width: min(46rem, 92vw);
  min-height: 13rem;
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: 1.2rem;
  align-items: center;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 178, 62, 0.24), transparent 28rem),
    radial-gradient(circle at 82% 0%, rgba(71, 229, 255, 0.18), transparent 24rem),
    var(--panel);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48), inset 0 1px rgba(255, 255, 255, 0.14);
  opacity: 0;
  transform: translateY(2rem) scale(0.94);
  position: relative;
  overflow: hidden;
}

.stream-alert.show {
  animation: streamIn 0.55s cubic-bezier(0.2, 0.9, 0.18, 1.12) forwards, streamPulse 1.7s ease 0.55s infinite alternate;
}

.stream-alert.hide {
  animation: streamOut 0.38s ease forwards;
}

.stream-alert-glow {
  position: absolute;
  inset: auto -8rem -10rem auto;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: rgba(143, 92, 255, 0.28);
  filter: blur(24px);
}

.stream-alert-image {
  height: 10.8rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1.2rem;
  background: linear-gradient(135deg, rgba(255, 178, 62, 0.2), rgba(71, 229, 255, 0.12));
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.stream-alert-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.65rem;
  filter: drop-shadow(0 20px 26px rgba(0, 0, 0, 0.42));
}

.stream-alert-image img:not([src]),
.stream-alert-image img[src=""] {
  display: none;
}

.stream-alert-image span {
  color: rgba(255, 255, 255, 0.82);
  font-family: "Rajdhani", sans-serif;
  font-size: 4.6rem;
}

.stream-alert-copy {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.stream-kicker {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.stream-alert h1 {
  margin: 0.25rem 0;
  color: var(--text);
  font-family: "Rajdhani", sans-serif;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 0.9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-alert p {
  margin: 0.25rem 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.3vw, 1.35rem);
  font-weight: 700;
}

.stream-alert strong {
  display: block;
  margin-top: 0.45rem;
  color: var(--cyan);
  font-size: clamp(1.05rem, 2.5vw, 1.45rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-status {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
  opacity: 0;
}

.stream-status.show {
  opacity: 1;
}

@keyframes streamIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes streamOut {
  to {
    opacity: 0;
    transform: translateY(-1.5rem) scale(0.98);
  }
}

@keyframes streamPulse {
  from {
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48), 0 0 0 rgba(255, 178, 62, 0);
  }
  to {
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48), 0 0 44px rgba(255, 178, 62, 0.28);
  }
}

@media (max-width: 620px) {
  .stream-alert {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .stream-alert-image {
    width: 12rem;
    justify-self: center;
  }
}
