/* The slouch snitch — shrimp meme layout */

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

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: "Arial Black", "Arial", system-ui, sans-serif;
}

body {
  background: #1e5cff url("assets/shrimp-bg.png") center / 420px repeat;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.brand {
  margin: 1.25rem 1.25rem 0.5rem;
  padding: 0.35rem 0.85rem;
  width: fit-content;
  background: #fff;
  color: #000;
  font-size: clamp(1.1rem, 3.5vw, 1.75rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
  z-index: 10;
}

.stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem 0.75rem;
  min-height: 0;
}

.video-frame {
  position: relative;
  width: min(100%, 920px);
  aspect-ratio: 16 / 10;
  max-height: calc(100dvh - 11rem);
  background: #000;
  border: 4px solid #000;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

#video,
#overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

#overlay {
  pointer-events: none;
}

.tap-start {
  position: absolute;
  inset: 0;
  z-index: 20;
  border: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease;
}

.tap-start__label {
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.tap-start.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Bottom status */
.status-bar {
  flex-shrink: 0;
  display: flex;
  align-items: baseline;
  gap: 0.35em;
  padding: 0.75rem 1.25rem 1.25rem;
  z-index: 10;
}

.status-bar__label {
  font-size: clamp(2rem, 8vw, 4.5rem);
  font-weight: 900;
  color: #fff;
  text-shadow: 3px 3px 0 #000;
  line-height: 1;
}

.status-bar__value {
  font-size: clamp(2rem, 8vw, 4.5rem);
  font-weight: 900;
  text-transform: lowercase;
  line-height: 1;
  text-shadow: 3px 3px 0 #000;
  transition: color 0.2s ease;
}

.status-bar__value--green {
  color: #4ade80;
}

.status-bar__value--yellow {
  color: #facc15;
}

.status-bar__value--red {
  color: #f87171;
  animation: status-pulse 0.5s ease-in-out infinite alternate;
}

@keyframes status-pulse {
  from { opacity: 0.85; }
  to { opacity: 1; }
}

/* Fart FX */
.flash-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #dc2626;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.flash-overlay.flash-on {
  opacity: 0.45;
}

@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6px, 3px); }
  40% { transform: translate(5px, -4px); }
  60% { transform: translate(-4px, 4px); }
  80% { transform: translate(4px, -2px); }
}

.shake {
  animation: shake 0.4s ease both;
}

.particle {
  position: fixed;
  font-size: 2rem;
  pointer-events: none;
  z-index: 30;
  animation: float-up 1.4s ease-out forwards;
}

@keyframes float-up {
  0% { transform: translate(0, 0) scale(0.6); opacity: 0; }
  15% { opacity: 1; }
  100% {
    transform: translate(var(--dx, 0), -200px) scale(1.2);
    opacity: 0;
  }
}
