/* ===========================
   BASE
   =========================== */
* { box-sizing: border-box; }

.noto-color-emoji-regular {
  font-family: "Noto Color Emoji", sans-serif;
  font-weight: 400;
  font-style: normal;
}

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif, "Noto Color Emoji";
}

#app {
  width: 1080px;
  height: 1920px;
  position: relative;
  margin: 0 auto;
}

.count {
  position: absolute;
  left: 40px;
  top: 40px;
  color: #fff;
  font-size: 34px;
  font-weight: 700;
  opacity: 0.9;
}

/* ===========================
   RIGHT SIDE: TikTok-style stack (STATIC GREEN)
   ✅ bottom-first + collapse after delete
   =========================== */
.request-stack {
  position: absolute;
  right: 0;
  top: 34px;

  display: flex;
  flex-direction: column-reverse; /* ✅ bottom-first */
  gap: 6px;
  align-items: flex-end;

  background: #00ff00;
  padding: 80px;

  width: 320px;    /* static green */
  height: 1141px;  /* static green */
  overflow: visible;
}

/* ✅ Request header (must sit above top user; hidden when 0 users) */
.request-header {

  display: flex;
  justify-content: center;
  align-items: center;
}

.request-btn {
  width: 162px;
  height: 55px;
  border: none;
  border-radius: 10px;

  background: rgba(66, 66, 66, 0.89);
  color: white;

  font-size: 22px;
  font-weight: 200;

  box-shadow: 0 10px 20px rgba(0,0,0,0.25);
  user-select: none;
  pointer-events: none; /* purely visual like screenshot */
}

/* One visible line (slot label outside + card inside) */
.stack-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 160px;
}

/* hide empty rows completely */
.stack-row.is-empty { display: none; }

/* SLOT label OUTSIDE green (left side) */
.slot-label {
  position: absolute;
  left: -72px;
  top: 50%;
  transform: translateY(-50%);

  color: #000000;
  font-weight: 900;
  font-size: 30px;
  letter-spacing: 0.5px;

  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
  user-select: none;
  pointer-events: none;
}

/* ===========================
   CARD
   =========================== */
.request-card {
  width: 160px;
  height: 160px;
  position: relative;
  overflow: hidden;

  border-radius: 0;
  background: radial-gradient(circle at top, #1a1a1a 0%, #0b0b0b 60%, #050505 100%);
  border: 1px solid #111;

  display: block;
  --avatar-bg: none;
}

.request-card.is-empty { display: none; }

.request-card::before {
  content: "";
  position: absolute;
  inset: -60px;

  background-image: var(--avatar-bg);
  background-size: cover;
  background-position: center;

  filter: blur(40px) saturate(1.3);
  opacity: 0.45;

  z-index: 0;
}

.request-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 0;
}

.request-card > * { position: relative; z-index: 1; }

/* ===== MUTE ICON (bottom-right) ===== */
.mute-fixed {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 26px;
  height: 26px;
  opacity: 0.95;

  z-index: 7;
  pointer-events: none;
  display: block;
}

/* FILLED UI */
.filled-ui {
  width: 100%;
  height: 100%;
  padding: 3px;
}

/* ===========================
   TOP COUNTER PILL
   =========================== */
.top {
  position: absolute;
  left: 10px;
  top: 10px;

  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;

  background: #2c2a27;
  padding: 0 10px;
  border-radius: 999px;

  z-index: 6;
}

.coin-img { width: 18px; height: 18px; flex: 0 0 auto; }

.counter {
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  height: 22px;
  line-height: 22px;
  overflow: hidden;
}

.counter-value {
  display: inline-block;
  font-size: 18px;
  font-weight: 400;
}

.counter.anim-up .counter-value { animation: countUp 620ms ease-out; }

@keyframes countUp {
  from { transform: translateY(110%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===========================
   AVATAR
   =========================== */
.midle {
  margin: 45px auto 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;

  display: block;
  opacity: 0;
  transition: opacity 120ms ease;
}

.request-card.avatar-ready .avatar-img { opacity: 1; }

/* ===========================
   BOTTOM PILL
   =========================== */
.bottom {
  position: absolute;
  left: 10px;
  bottom: 6px;

  width: fit-content;
  max-width: calc(100% - 46px);
  height: 30px;

  background: #2c2a27;
  border-radius: 999px;
  padding: 4px 10px;

  display: flex;
  align-items: center;
  gap: 8px;

  z-index: 6;
}

.nickname {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 350;
  line-height: 1;

  max-width: 92px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plus-bubble {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #585652;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #fff;
  font-weight: 400;
  font-size: 26px;
  padding-bottom: 6px;

  flex: 0 0 auto;
  margin-right: -6px;
}

/* ===========================
   GIFT POP
   =========================== */
.request-card .lion-pop {
  position: absolute;
  top: 10px;
  right: 10px;

  width: 30px;
  height: 30px;

  opacity: 0;
  transform: scale(0.88);

  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));

  z-index: 7;
}

.request-card.lion-visible .lion-pop {
  opacity: 1;
  transform: scale(1);
}

/* ===========================
   INPUTS WRAPPER
   =========================== */
.inputs-wrapper {
  position: absolute;
  left: 36px;
  top: 100px;

  width: 640px;
  max-width: 640px;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
  align-items: start;

  z-index: 9999;
}

.api-rows {
  grid-column: 1 / -1;

  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 18px;
  row-gap: 14px;

  align-items: start;
}

.api-rows .oneperson {
  display: flex;
  gap: 8px;
  align-items: center;
}

.personone {
  width: 120px;
  height: 34px;

  border-radius: 12px;
  border: none;
  outline: none;

  text-align: center;
  font-weight: 800;

  color: #fff;
  background: #141414;
}

.btn {
  height: 34px;
  border: none;
  border-radius: 10px;
  padding: 0 12px;

  font-weight: 800;
  cursor: pointer;
}

.btn.search { background: #1f7a2e; color: #fff; }
.btn.clear { background: #a61b1b; color: #fff; }

.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===========================
   SEND LION
   =========================== */
.sendlion {
  position: absolute;
  left: 15px;
  top: 520px;

  width: 350px;
  transform: translateX(-120%);
  opacity: 0;

  pointer-events: none;
}

.sendlion.show { animation: lionIn 350ms ease-out forwards; }
.sendlion.hide { animation: lionFade 1000ms ease-out forwards; }

@keyframes lionIn {
  from { transform: translateX(-120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes lionFade {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(0) scale(1); }
}

/* ===========================
   MANUAL ADD
   =========================== */
.manual-panel {
  grid-column: 1 / -1;
  margin-top: 12px;

  padding: 10px 12px;
  border-radius: 16px;

  background: rgba(16, 16, 16, 0.88);
  border: 1px solid #1a1a1a;

  max-width: 440px;
  margin-bottom: 8px;
}

.manual-title {
  color: #fff;
  font-weight: 800;
  margin: 0 0 8px 0;
  font-size: 14px;
  opacity: 0.9;
}

.manual-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.manual-row label {
  color: #9c9c9c;
  font-size: 11px;
  font-weight: 800;
  margin-right: 2px;
}

.manual-row select,
.manual-row input {
  height: 32px;
  border-radius: 12px;
  border: none;
  outline: none;

  padding: 0 10px;
  background: #141414;
  color: #fff;

  font-weight: 800;
  font-size: 12px;
}

.manual-slot { width: 64px; }
.manual-name { width: 150px; }
.manual-avatar { width: 220px; }

.btn.manual-add {
  background: #1f7a2e;
  color: #fff;

  height: 32px;
  border-radius: 12px;
  padding: 0 12px;
}

.btn.manual-clear {
  background: #3a3a3a;
  color: #fff;

  height: 32px;
  border-radius: 12px;
  padding: 0 12px;
}

/* ===========================
   AUTO TOGGLE
   =========================== */
.auto-toggle-wrap {
  grid-column: 1 / -1;
  width: 440px;
  max-width: 440px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 10px 12px;
  border-radius: 16px;

  background: rgba(16, 16, 16, 0.88);
  border: 1px solid #1a1a1a;
}

.auto-toggle-title {
  font-size: 13px;
  font-weight: 800;
  opacity: 0.9;
  color: #fff;
  user-select: none;
}

.auto-toggle-btn {
  cursor: pointer;
  border: none;
  border-radius: 12px;

  padding: 8px 12px;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.4px;

  color: #fff;
  background: rgba(60, 180, 80, 0.95);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);

  user-select: none;
}

.auto-toggle-btn.off { background: rgba(200, 60, 60, 0.95); }

/* ===========================
   GIFT BAR
   =========================== */
.giftbar {
  grid-column: 1 / -1;
  width: 440px;
  max-width: 440px;
  height: 260px;

  padding: 12px;
  margin-top: 14px;

  display: flex;
  gap: 10px;
  flex-wrap: wrap;

  justify-content: flex-start;
  align-items: flex-start;
  align-content: flex-start;

  overflow: hidden;
  border-radius: 14px;

  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.giftbtn {
  width: 72px;
  height: 72px;
  padding: 8px;

  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.35);

  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.giftbtn:hover { transform: scale(1.03); }

.giftbtn.active {
  border-color: rgba(0, 255, 120, 0.55);
  box-shadow: 0 0 0 2px rgba(0, 255, 120, 0.18), 0 0 28px rgba(0, 255, 120, 0.18);
}

.giftbtn img {
  width: 100%;
  height: 100%;
  max-width: 56px;
  max-height: 56px;
  object-fit: contain;

  pointer-events: none;
  image-rendering: auto;
}

@media (max-width: 900px) {
  .giftbar { max-width: 100%; height: 110px; }
  .giftbtn { width: 66px; height: 66px; }
  .giftbtn img { max-width: 50px; max-height: 50px; }
}