.glass-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 500px;
  box-sizing: border-box;
}

.glass-panel::before {
  background: rgba(0, 0, 0, 1);
  backdrop-filter: blur(20px);
  z-index: -1;
}

.glass-panel {
  display: flex;
  position: relative;
  flex-direction: row;  
  align-items: center;        
  justify-content: space-evenly;
  gap: 2rem;
  padding: 0 2rem;
  width: 650px;
  max-width: 999px;
  height: 150px;
  border-radius: 20px;
  box-sizing: border-box;
  margin-bottom: 15vh;
  background: linear-gradient(
    135deg,
    rgba(121, 121, 121, 0.13),
    rgba(200, 16, 47, 0.13),
    rgba(1, 32, 105, 0.13),
    rgba(39, 39, 39, 0.13)
  );
  backdrop-filter: none;
  border: 3px solid rgba(0, 0, 0, 0);
  border-top: none;
  border-bottom: none;
  z-index: 10;
  overflow: visible;
  transition: box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out, background 0.3s ease-in-out;
}

.glass-panel > * {
  position: relative;
  z-index: 3;
  margin-top: 0;
  margin-bottom: 0;
}

.glass-panel.status-online {
  border-color: #43b581;
  background: linear-gradient(
    135deg,
    rgba(121, 121, 121, 0.13),
    rgba(200, 16, 47, 0.13),
    rgba(1, 32, 105, 0.13),
    rgba(39, 39, 39, 0.13),
    rgba(67, 181, 129, 0.10)
  );
}

.glass-panel.status-idle {
  border-color: #faa61a;
  background: linear-gradient(
    135deg,
    rgba(121, 121, 121, 0.13),
    rgba(200, 16, 47, 0.13),
    rgba(1, 32, 105, 0.13),
    rgba(39, 39, 39, 0.13),
    rgba(250, 166, 26, 0.10)
  );
}

.glass-panel.status-dnd {
  border-color: #f04747;
  background: linear-gradient(
    135deg,
    rgba(121, 121, 121, 0.13),
    rgba(200, 16, 47, 0.13),
    rgba(1, 32, 105, 0.13),
    rgba(39, 39, 39, 0.13),
    rgba(240, 71, 71, 0.10)
  );
}

.glass-panel.status-offline,
.glass-panel.status-invisible {
  border-color: #747f8d;
  background: linear-gradient(
    135deg,
    rgba(121, 121, 121, 0.13),
    rgba(200, 16, 47, 0.13),
    rgba(1, 32, 105, 0.13),
    rgba(39, 39, 39, 0.13),
    rgba(116, 127, 141, 0.10)
  );
}

.avatar-wrapper {
  position: relative;
  flex-shrink: 0;
  margin: 0;
  left: 0;
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: flex;
}

.discord-status-dot {
  position: absolute;
  width: 17px;
  height: 17px;
  border-radius: 100%;
  bottom: 5px;
  right: 5px;
  z-index: 3;
}

.username-badge-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: nowrap;
  flex: 1; 
  min-width: 0;
}

.discord-username {
  font-size: 2.3rem;
  font-weight: 700;
  color: rgb(255, 255, 255);
  letter-spacing: 0.01em;
  position: relative;
  cursor: pointer;
  pointer-events: auto;
  justify-content: center;
  align-items: center;
  line-height: 1;
  flex-shrink: 0;
}

.badge-bubble {
  display: inline-flex;
  flex-wrap: wrap;
  margin-top: 0;
  gap: 8px;
  padding: 8px 16px;
  border: 2.5px solid #ffffff;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  border-top: none;
  border-right: none;
  border-left: none;
  flex-shrink: 0;
}

.badge-icons {
  position: relative;
  display: inline-block;
  align-items: center;
}

.badge-icons svg {
  position: relative;
  width: 1.3rem;
  height: 1.3rem;
  color: rgb(255 255 255);
  display: block;
  justify-content: center;
}

.textBubble {
  font-family: 'Satoshi', sans-serif;
  font-weight: bold;
  position: absolute;
  top: -25px;
  bottom: auto;
  right: auto;
  left: 10px;
  transform: translate(-50%, -60%);
  padding: 9px 15px;
  border-radius: 9px;
  display: inline-flex;
  background: #262626;
  color: rgb(255, 255, 255);
  font-size: 0.80rem;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  z-index: 3;
  text-align: center;
  white-space: nowrap;
}

#textBubble {
  font-family: 'Satoshi', sans-serif;
  font-weight: bold;
  position: absolute;
  top: -25px;
  bottom: auto;
  right: auto;
  left: 10px;
  transform: translate(-50%, -60%);
  padding: 9px 15px;
  border-radius: 9px;
  display: inline-flex;
  background: #262626;
  color: rgb(255, 255, 255);
  font-size: 0.80rem;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  z-index: 3;
  text-align: center;
  white-space: nowrap;
}

.badge-icons:hover .textBubble,
.badge-icons:focus-within .textBubble,
.badge-icons:hover #textBubble,
.badge-icons:focus-within #textBubble {
  opacity: 1;
  transform: translateX(-50%, -60%);
}

@keyframes glassPanelEntrance {
  0% {
    opacity: 0;
    transform: scaleX(0.8) scaleY(0.8);
  }
  60% {
    opacity: 1;
    transform: scaleX(1.05) scaleY(1.05);
  }
  100% {
    opacity: 1;
    transform: scaleX(1) scaleY(1);
  }
}

/* Mobile */
@media (max-width: 768px) {
  .glass-container {
    padding: 2rem 1rem;
    height: auto;
    min-height: 400px;
    width: 100%;
    box-sizing: border-box;
  }

  .glass-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: calc(100% - 2rem);
    margin: 2rem auto;
    padding: 2rem 1.5rem;
    height: auto;
    overflow: visible;
    gap: 1.5rem;
    box-sizing: border-box;
  }

  .avatar-wrapper {
    position: relative;
    margin: 0 auto 0.5rem auto; 
    width: 80px;
    height: 80px;
    transform: none;
    left: auto;
    top: auto;
    right: auto;
  }

  .discord-status-dot {
    position: absolute;
    width: 17px;
    height: 17px;
    bottom: 0;
    right: 0;
  }

  .username-badge-wrapper {
    display: flex;
    flex-direction: column;  
    align-items: center;      
    gap: 1rem;
    text-align: center;
    width: 100%;
    padding: 0 0.5rem;
  }

  .discord-username {
    font-size: 1.75rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    text-align: center;
  }

  .badge-bubble {
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0;
    padding: 6px 12px;
  }

  .badge-icons svg {
    width: 1.1rem;
    height: 1.1rem;
  }

  .textBubble,
  #textBubble {
    font-size: 0.7rem;
    padding: 6px 10px;
  }
}

@media (max-width: 540px) {
  .glass-container {
    padding: 1.5rem 0.75rem;
    width: 100%;
    box-sizing: border-box;
  }

  .glass-panel {
    width: 100%;
    max-width: calc(100% - 1.5rem);
    margin: 1.5rem auto;
    padding: 1.5rem 1rem;
    gap: 1.25rem;
  }

  .discord-username {
    font-size: 1.5rem;
  }

  .badge-bubble {
    padding: 5px 10px;
    gap: 5px;
  }

  .badge-icons svg {
    width: 1rem;
    height: 1rem;
  }
}

@media (max-width: 400px) {
  .glass-container {
    padding: 1rem 0.5rem;
    width: 100%;
    box-sizing: border-box;
  }

  .glass-panel {
    width: 100%;
    max-width: calc(100% - 1rem);
    margin: 1rem auto;
    padding: 1.25rem 0.75rem;
    gap: 1rem;
  }

  .avatar-wrapper {
    width: 70px;
    height: 70px;
  }

  .discord-status-dot {
    width: 15px;
    height: 15px;
  }

  .discord-username {
    font-size: 1.35rem;
  }

  .badge-bubble {
    padding: 4px 8px;
    gap: 4px;
  }

  .badge-icons svg {
    width: 0.95rem;
    height: 0.95rem;
  }
}

@media (max-width: 180px) {
  .badge-bubble {
    display: none;
  }
}