:root {
  --site-navy: #06152d;
  --site-navy-light: #0b2d59;
  --site-blue: #4ebcff;
  --site-blue-strong: #1687f3;
  --site-white: #f8fbff;
  --site-muted: #a9bdd8;
  --duration: 12s;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: transparent !important;
}

body {
  color: var(--site-white);
  font-family: Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: clamp(28px, 5.5vh, 76px) clamp(22px, 4vw, 74px);
  background: transparent !important;
}

.shoutout {
  width: min(940px, 92vw);
  opacity: 0;
  transform: translateY(92px);
  filter: blur(6px);
  pointer-events: none;
  will-change: transform, opacity, filter;
}

.shoutout.is-visible {
  animation: card-in 760ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.shoutout.is-leaving {
  animation: card-out 580ms cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

.card {
  position: relative;
  min-height: 228px;
  padding: 25px 35px 31px;
  overflow: hidden;
  border: 1px solid rgba(120, 191, 255, 0.36);
  border-radius: 28px;
  background:
    radial-gradient(circle at 91% -10%, rgba(26, 139, 249, 0.35), transparent 42%),
    linear-gradient(125deg, rgba(6, 21, 45, 0.985), rgba(7, 30, 61, 0.97));
  box-shadow:
    0 24px 70px rgba(0, 8, 28, 0.55),
    0 0 38px rgba(35, 147, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  isolation: isolate;
}

.card__wash {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(106deg, transparent 0 58%, rgba(78, 188, 255, 0.045) 58% 59%, transparent 59% 100%),
    linear-gradient(106deg, transparent 0 73%, rgba(78, 188, 255, 0.035) 73% 74%, transparent 74% 100%);
}

.card__wordmark {
  position: absolute;
  right: -25px;
  bottom: -31px;
  z-index: -1;
  color: rgba(78, 188, 255, 0.045);
  font-size: 118px;
  font-weight: 950;
  letter-spacing: -0.075em;
  line-height: 1;
  white-space: nowrap;
}

.brand-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 33px;
  margin-bottom: 19px;
}

.brand-logo {
  display: block;
  width: 70px;
  height: 31px;
  object-fit: contain;
}

.brand-divider {
  width: 1px;
  height: 18px;
  background: rgba(120, 191, 255, 0.38);
}

.brand-label {
  color: var(--site-blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 7px 11px;
  border: 1px solid rgba(120, 191, 255, 0.25);
  border-radius: 999px;
  color: #d8e5f6;
  background: rgba(4, 18, 39, 0.35);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.live-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--site-blue);
  box-shadow: 0 0 0 0 rgba(78, 188, 255, 0.55);
  animation: live-pulse 1.5s ease-out infinite;
}

.shoutout-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}

.shoutout-body.has-avatar {
  grid-template-columns: auto minmax(0, 1fr);
}

.avatar-shell[hidden],
.identity[hidden],
.display-name[hidden],
.username[hidden],
.message[hidden] {
  display: none !important;
}

.avatar-shell {
  position: relative;
  width: 104px;
  aspect-ratio: 1;
  padding: 3px;
  border: 1px solid rgba(120, 191, 255, 0.45);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(78, 188, 255, 0.26), rgba(6, 21, 45, 0.45));
  box-shadow:
    0 15px 34px rgba(0, 8, 28, 0.42),
    0 0 24px rgba(78, 188, 255, 0.13);
}

.avatar-shell::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 20px;
  height: 20px;
  border: 4px solid #082044;
  border-radius: 50%;
  background: var(--site-blue);
  box-shadow: 0 0 13px rgba(78, 188, 255, 0.78);
}

.avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  object-fit: cover;
  background: var(--site-navy-light);
}

.content {
  min-width: 0;
}

.identity {
  display: flex;
  align-items: baseline;
  gap: 13px;
  min-width: 0;
}

.display-name {
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--site-white);
  font-size: clamp(30px, 3.5vw, 45px);
  font-weight: 950;
  letter-spacing: -0.06em;
  line-height: 0.98;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.username {
  flex: none;
  color: var(--site-blue);
  font-size: clamp(13px, 1.5vw, 16px);
  font-weight: 800;
}

.message {
  max-width: 680px;
  margin: 13px 0 0;
  overflow: hidden;
  color: #d8e5f6;
  font-size: clamp(16px, 1.75vw, 20px);
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.message::before {
  content: "“";
  margin-right: 3px;
  color: var(--site-blue);
  font-size: 1.2em;
  font-weight: 900;
}

.message::after {
  content: "”";
  margin-left: 2px;
  color: var(--site-blue);
  font-size: 1.2em;
  font-weight: 900;
}

.timer {
  position: absolute;
  right: 35px;
  bottom: 16px;
  left: 35px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(120, 191, 255, 0.11);
}

.timer__bar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--site-blue-strong), var(--site-blue));
  box-shadow: 0 0 13px rgba(78, 188, 255, 0.58);
  transform-origin: left;
}

.shoutout.is-visible .timer__bar {
  animation: timer-drain calc(var(--duration) - 620ms) linear 620ms forwards;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes card-in {
  0% {
    opacity: 0;
    transform: translateY(92px);
    filter: blur(6px);
  }
  64% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes card-out {
  0% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translateY(52px);
    filter: blur(6px);
  }
}

@keyframes timer-drain {
  to {
    transform: scaleX(0);
  }
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(78, 188, 255, 0.6);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(78, 188, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(78, 188, 255, 0);
  }
}

@media (max-width: 700px) {
  .card {
    min-height: 190px;
    padding: 21px 24px 27px;
    border-radius: 23px;
  }

  .brand-row {
    margin-bottom: 15px;
  }

  .brand-label {
    font-size: 9px;
  }

  .shoutout-body {
    gap: 17px;
  }

  .avatar-shell {
    width: 82px;
    border-radius: 18px;
  }

  .avatar {
    border-radius: 15px;
  }

  .identity {
    display: block;
  }

  .username {
    display: block;
    margin-top: 4px;
  }

  .message {
    margin-top: 8px;
    font-size: 15px;
  }

  .timer {
    right: 24px;
    left: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}
