@import url(https://fonts.googleapis.com/css2?family=Bangers&display=swap);

body {
  background: transparent;
  margin: 0;
  overflow: hidden;
  font-family: 'Bangers', cursive;
}

/* 🌊 Chat log container */
#log {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: 100vh;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
  display: flex;
  flex-direction: column;

  /* Hide scrollbar but keep scrolling */
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* IE 10+ */
}
#log::-webkit-scrollbar { display: none; }

/* 📌 Pinned section */
#pinned {
  margin-bottom: 10px;
  pointer-events: auto;
  user-select: none;
  border-left: 6px solid red;       /* red stripe */
  display: flex;                    /* make content hug stripe */
  align-items: flex-start;
}

/* 🧱 Pinned bubble: flat left, rounded right, flush against red bar */
#pinned .message-boxM {
  background-color: #ffffff;
  padding: 12px 15px;
  border-radius: 0 20px 20px 0;     /* flat on left, round on right */
  box-shadow: 0 0 20px -5px rgba(0,0,0,0.5);
  max-width: 80%;
  margin: 0;                        /* no gap between bar and bubble */
  position: relative;
  padding-left: 16px;               /* inner spacing */
}

/* ✨ Little pop when a new pin replaces old */
.pin-pop { animation: pinPop 180ms ease-out; }
@keyframes pinPop {
  0% { transform: scale(0.98); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

/* 💬 Normal chat bubbles */
.message-boxM {
  margin: 5px 0;
  background-color: #FFFFFF;
  padding: 15px;
  border-radius: 10px 20px 20px 0px;
  box-shadow: 0 0 20px -5px rgba(0,0,0,0.5);
  min-width: 100px;
  max-width: 80%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  display: inline-block;
  position: relative;
}

.bot-bubble { background-color: #3cd070 !important; }

/* 👤 Username */
.name {
  font-size: 18px;
  margin-left: 10px;
  filter: brightness(0.55);
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

/* 📝 Chat Message */
.message {
  font-size: 21px;
  color: #000000;
  line-height: 1.4;
}

/* 🎯 Highlighted Reward Text */
.highlighted {
  padding: 2px 6px;
  border-radius: 6px;
  text-shadow: 0 0 2px rgba(0,0,0,0.5);
}

/* 😄 Emotes */
.emote { height: 1em; vertical-align: middle; }
.medium-emote img.emote { height: 2em; }
.big-emote img.emote { height: 3em; }

/* 🖼️ Images & 🎥 Videos */
.chevereto-thumb {
  display: block;
  max-width: 100%;
  max-height: 250px;
  margin-top: 10px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  object-fit: cover;
  background: transparent;
}

/* 🖥️ Desk overlay */
.desk-overlay {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  z-index: 1;
  pointer-events: none;
  animation: fadeOutDesk 0.5s ease 14.5s forwards;
}
@keyframes fadeOutDesk { to { opacity: 0; } }

/* 🌠 Beam overlay */
.beam-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 5;
  opacity: 0.9;
  border-radius: 10px 20px 20px 0px;
  animation:
    pulseGlow 1.2s ease-in-out infinite alternate,
    fadeOutBeam 0.5s ease 14.5s forwards;
}
@keyframes pulseGlow {
  0%   { opacity: 0.6; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.04); }
}
@keyframes fadeOutBeam { to { opacity: 0; } }

/* 🎬 YouTube preview card */
.youtube-card {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
  align-items: center;
  text-align: center;
}
.youtube-thumb {
  width: 100%;
  max-width: 320px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}
.youtube-title {
  font-size: 16px;
  font-family: Arial, sans-serif;
  color: #000;
  margin-top: 4px;
}

/* ✨ Fade Animations */
@keyframes fadeInUp {
  0%   { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOutUp {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-20px); }
}
.fade-in  { animation: fadeInUp 0.4s ease forwards; }
.fade-out { animation: fadeOutUp 0.5s ease forwards; }

/* 🏷️ First message label */
.first-label {
  position: absolute;
  top: 0;
  right: 10px;
  transform: translateY(-50%);
  background-color: #ffffff;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  color: #000000;
  padding: 2px 6px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 3;
  line-height: 1;
  height: 1.2em;
  display: flex;
  align-items: center;
}

.mononoke-crowned { position: relative; }
.crown-icon {
  position: absolute;
  top: -16px;
  left: -8px;
  width: 44px;
  height: 86px;
  z-index: 4;
  pointer-events: none;
}
