/* Discord sign-in widget */
.auth-wrap {
  position: relative;
  display: inline-flex;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--fg);
  font-family: var(--font);
  font-size: 12.5px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.auth-btn:hover {
  border-color: var(--accent);
  background: rgba(180, 186, 246, 0.1);
  color: #fff;
}

.auth-avatar {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.auth-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  min-width: 220px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #14161e;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  text-align: left;
}

.auth-menu[hidden] {
  display: none;
}

.auth-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.auth-menu-head img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.auth-menu-head b {
  display: block;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}

.auth-menu-head span {
  display: block;
  margin-top: 2px;
  color: var(--accent-2, var(--muted));
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-menu-item {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--fg);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
}

.auth-menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.auth-menu-item.danger {
  color: var(--muted);
}

.auth-menu-item.danger:hover {
  color: #fff;
}

.mobile-menu .mobile-auth-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin-top: 18px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(180, 186, 246, 0.08);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.mobile-menu .mobile-auth-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-menu #auth-logout-mobile {
  margin-top: 8px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.mobile-menu .mobile-auth-item img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

.mobile-menu .mobile-auth-item[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .auth-wrap {
    display: none;
  }
}
